-
Notifications
You must be signed in to change notification settings - Fork 791
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
AWS Batch decorator: EFS volumes support (and custom mount point) #1650
Conversation
Actually, I just realised that two tests failed locally:
But I can't see any connection with my changes... 🤷 |
Any luck reviewing this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks a lot for this.
Please allow me to check it manually once from my side and then I can approve...
@enricomarchesin Thanks, I have manually tested it by creating an EFS volume and can confirm that it does get mounted... My only question is (just out of curiosity) -- does the task switch from |
Checked custom mount paths and the step-functions scheduler as well... |
Testing[594] @ 3c511cc |
That happens to me all the time, using the standard Metaflow release, with when I run my flows using AWS Batch, both EC2 and Fargate clusters. Depending on the actual availability of the provisioned machines, for EC2 clusters I can see RUNNABLE many times (5+) before it moves to the RUNNING state. 🤷 |
Thanks for accepting the PR! 🙏 |
…tflix#1650) * AWS plugin: support for mounting EFS volumes * Support custom mountpoint for volumes
…tflix#1650) * AWS plugin: support for mounting EFS volumes * Support custom mountpoint for volumes
Add support to mount EFS volumes in batch containers by adding a new parameter to the decorator,
efs_volumes
, that works exactly like the recently addedhost_volumes
one, and just needs the EFS volume ID.For example one can use something like:
By default the volume is mounted in
/mnt/
, in a folder named like the EFS volume id. In the example above that means in/mnt/fs-000a90e5f7dc01234
.This PR also adds a little improvement that allows to specify the mountpoint of the volume, which I backported also for the
host_volumes
parameter: just add a semicolon (:
) after the EFS volume ID (or the host folder), followed by where the volume will be mounted inside the container.For example:
As I said, I backported it also for host volumes, so one can use something like:
host_volumes=/home:/mnt/host-homedir
.I've extensively tested it for my use case, and it worked like a charm, and given this was mentioned in a few issues at least (for example #441), plus considering it's really a ridiculous change, I though it might be worth trying to give something back to this awesome community that's maintaining such a great product.
I beliene someone else can find it useful, and I'd love for this little tweak to be accepted upstream.
Note: I wanted to add a couple simple tests, but I can't find where the other parts of the AWS Batch plugin test suite are... Anyway I've run locally the basic set of tests (
run_tests.py --debug --contexts dev-local
) against my branch, and they all succeeded.