Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialise ICAv2 Data Copy Manager #788

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexiswl
Copy link
Member

Centralised service for copying data around with ICAv2 Jobs, uses taskTokens for 'synced' events (inside AWS Step Functions).

For example an event might look like

{
  "EventBusName": "OrcaBusMain",
  "Source": "Whatever",
  "DetailType": "ICAv2DataCopySync",
  "Detail": {
    "payload": {
      "sourceUriList": [
        "icav2://project-id-or-name/path-to-data.txt",
        "icav2://project-id-or-name/path-to-folder/"
      ],
      "destinationUri": "icav2://project-id-or-name/path-to-destination/"
    },
    "taskToken": "your-task-token"
  }
}

Or

{
  "EventBusName": "OrcaBusMain",
  "Source": "Whatever",
  "DetailType": "ICAv2DataCopy",
  "Detail": {
    "payload": {
      "sourceUriList": [
        "icav2://project-id-or-name/path-to-data.txt",
        "icav2://project-id-or-name/path-to-folder/"
      ],
      "destinationUri": "icav2://project-id-or-name/path-to-destination/"
    }
  }
}

One can generate the Detail from the source with the following AWS StepFunctions Code

{
  "QueryLanguage": "JSONata",
  ...
  "States": {
    "Copy Files to Destination": {
      "Type": "Task",
      "Resource": "arn:aws:states:::events:putEvents.waitForTaskToken",
      "Arguments": {
        "Entries": [
          {
            "Detail": "{% $merge(\n  [\n    {\n      \"taskToken\": $states.context.Task.Token\n    }, \n    $copy_event_detail\n  ]\n) %}",
            "DetailType": "ICAv2DataCopy",
            "EventBusName": "OrcaBusMain",
            "Source": "Whatever"
          }
        ]
      },
      "Next": ...
    }
  }
}

@alexiswl alexiswl added the feature New feature label Dec 19, 2024
@alexiswl alexiswl self-assigned this Dec 19, 2024
@victorskl
Copy link
Member

Please on hold merge this PR until 0.3.0 release wrap up.

@victorskl victorskl removed the on hold label Jan 3, 2025
@victorskl
Copy link
Member

Depends on task token that implemented in #789

@alexiswl
Copy link
Member Author

Depends on task token that implemented in #789

Ah not quite, this one would have its own task token management system, #789 was for workflow events specifically

@victorskl
Copy link
Member

Similarly to this PR as well. ditto related conclusion comment here.

Please set PR Ready; once finalised. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants