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

Added feature icav2 copy batch state machine #143

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

alexiswl
Copy link
Member

@alexiswl alexiswl commented Mar 10, 2024

Summary

This ICAv2 Copy Batch Utility wraps an AWS Step Function over the ICAv2 CopyBatch API.
This api is designed to copy a list of illumina file ids into a directory.

We exploit this API by taking in a manifest (a list of key values of source ids with their respective destinations) ( a source may have multiple destinations if it needs to be copied into a few different places ), and then monitor a set of API jobs to completion.

These CopyBatch API jobs have about a 20% fail rate, so we sometimes need to resubmit, this is built into the step function.

A 20% fail rate seems quite high, but when they work, these jobs can transfer 80 Gb of data in under 10 seconds so it's worth persisting with.

When working with the ICAv2 CopyBatch API, we need to provide a unique identifier for the run, and a unique location for the outputs.

Once all jobs are deployed we monitor their status (redeploy if failed - up to five times) and wait for all jobs to complete.

This process will transfer an entire BCLConvert process from one ICAv2 project to another in under 10 minutes!

Note that a current limitation prevents using this API within the same project.

TODO List

  • Harmonise cdk deployment with the rest of the orcabus cdk deployment - versions, yaml.locks etc.
  • Discuss whether this needs its own stateful component
  • Refactor so that each job runs in its own step function

@alexiswl alexiswl self-assigned this Mar 10, 2024
@alexiswl alexiswl added the feature New feature label Mar 10, 2024
@alexiswl alexiswl linked an issue Mar 11, 2024 that may be closed by this pull request
Copy link
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.! Yup, just needa hook up with outer CDK code would be good.

@victorskl victorskl marked this pull request as draft April 19, 2024 00:13
@victorskl
Copy link
Member

Put this branch into draft mode until we finalise

@alexiswl alexiswl force-pushed the feature/icav2-copy-batch-utility branch from b7e2984 to b453395 Compare April 22, 2024 12:17
@alexiswl alexiswl marked this pull request as ready for review April 22, 2024 12:21
@alexiswl
Copy link
Member Author

@victorskl this one is now ready for review

@victorskl
Copy link
Member

thanks Alexis for update, will review today.

Copy link
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from me.

]
}
]
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Flip Manifest" Very creative concept, Alexis.! 👍

DEFAULT_WAIT_TIME_SECONDS = 10


def handler(event, context):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocker comment (due to time constraint).

One fine day down the track, we should unit test this handler to guardrail couple of if branching statements down under. Need to make sure these branching logics maintain throughout the system SDLC and, retain it when refactoring happens.

@alexiswl alexiswl merged commit 16bba86 into main Apr 23, 2024
2 checks passed
@alexiswl alexiswl deleted the feature/icav2-copy-batch-utility branch April 23, 2024 02:59
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.

Implement ICAv2 Copy Batch Utility Service
3 participants