-
Notifications
You must be signed in to change notification settings - Fork 20
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
Grab bag of bug fixes and improvements #419
base: master
Are you sure you want to change the base?
Changes from 1 commit
4a4e500
c97da1d
42a9dd1
2fcb8b4
932e705
d7cd538
146ce76
4b29a98
74589d7
9067893
f8798ce
44df1d4
b333842
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ | |
from ..argparse import add_extended_help_flags, AppendOverwriteDefault, SKIP_AUTO_DEFAULT_IN_HELP | ||
from ..debug import debug | ||
from ..errors import UsageError, UserError | ||
from ..runner import docker, singularity | ||
from ..util import byte_quantity, runner_name, warn | ||
from ..runner import docker, singularity, aws_batch | ||
from ..util import byte_quantity, runner_name, split_image_name, warn | ||
from ..volume import NamedVolume | ||
|
||
|
||
|
@@ -306,10 +306,31 @@ def assert_overlay_volumes_support(opts): | |
""" | ||
overlay_volumes = opts.volumes | ||
|
||
if overlay_volumes and opts.__runner__ not in {docker, singularity}: | ||
if not overlay_volumes: | ||
return | ||
|
||
if opts.__runner__ not in {docker, singularity, aws_batch}: | ||
raise UserError(f""" | ||
The {runner_name(opts.__runner__)} runtime does not support overlays (e.g. of {overlay_volumes[0].name}). | ||
Use the Docker or Singularity runtimes (via --docker or --singularity) if overlays are necessary. | ||
Use the Docker, Singularity, or AWS Batch runtimes (via --docker, | ||
--singularity, or --aws-batch) if overlays are necessary. | ||
""") | ||
|
||
if opts.__runner__ is aws_batch and not docker.image_supports(docker.IMAGE_FEATURE.aws_batch_overlays, opts.image): | ||
raise UserError(f""" | ||
The Nextstrain runtime image version in use | ||
{opts.image} | ||
is too old to support overlays (e.g. of {overlay_volumes[0].name}) with AWS Batch. | ||
If overlays are necessary, please update the runtime image to at | ||
least version | ||
{split_image_name(opts.image)[0]}:{docker.IMAGE_FEATURE.aws_batch_overlays.value} | ||
using `nextstrain update docker`. Alternatively, use the Docker or | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seeing Maybe include |
||
Singularity runtime (via --docker or --singularity) instead. | ||
""") | ||
|
||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very minor nit It's a little weird to me that the overlay options (e.g. I suggest moving it to |
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.
I've wanted this! Awesome that it's happening
This'll be a nightmare to debug if it ever occurs. If I understand the code (I don't spend much time in this codebase) the behaviour of
--augur
is going to differ if it's run locally in docker (which swaps the entireaugur
out) vs aws-batch (which overlays any zipped up../augur
contents), right? Since--augur
is already special cased I think it'd be sensible to remove the (containers original)augur
directory if we see../augur
in the zip file.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.
\o/
Your understanding is correct. I think "nightmare" is overstating it—a stack trace, for example, will implicate a file that shouldn't be there—but yes, it'd certainly be aggravating.
Note that
--augur
is just one example of these development overlays, although probably the most useful one. There's also--auspice
,--fauna
, and (ha)--sacra
. (I've personally used--augur
and--auspice
about evenly.)Additional handling of these overlays in the AWS Batch entrypoint is possible, like I noted, but I don't really want to spend more time on those bits now. The overlay options have other caveats that present tripping hazards too, e.g. for Augur, it's just source code that's overlaid, not dependencies; and for Auspice you need to make sure to build it locally first. So a bit of "here be dragons" isn't unprecedented, and these are (AFAIK) rarely-used options.
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.
Well, if anything comes from this discussion we should at least remove
--sacra
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.
As a little background, it's very very rare I run a workflow using the release version of augur + the
master/main
repo branch, as that's what we have the automated stuff for in my eyes. Almost every time I'm running workflows it's because i've modified the workflow, or modified augur, or (surprisingly often) both. If we can getnextstrain run ...
working as I hope so I can farm out a job to AWS with my modified augur code & modified repo and then download the assets as a separate siloed working directory I'd save a whole lot of build time and my laptop would be happier. Is #407 at the point where this can be done / tested out?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.
This is a good reminder that although I often focus on the expected/anticipated external users of
nextstrain run
, we have internal uses for it that have different focuses. Internally we care mainly about the workdir isolation and mechanics in combination with offloading the work to AWS Batch, not the pathogen source/version management.You can totally test out #407 for your purposes!
There is not currently a supported way to use
nextstrain setup
to make an "editable install" (to use Python/Pip's lingo) of a self-managed local pathogen repo. It's on the list, but I wasn't focusing on it at first. Sounds like it should be soon/next up. In the meantime, a workaround is to do something like this: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.
Yeah, this'll always be a tension in the group - imaging a "happy path" for "most people" vs the way some of us run things. For this work I don't mind symlinking things.
P.S.
base32
not available on MacOS out of the box.