You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[aws batch] Structured output of AWS Batch job id for programmatic use #426
We've found ourselves extracting the AWS Batch job id from nextstrain build logs using pattern matching/text manipulation. Use cases include programmatic job attachment at a later point and templating of developer messaging.
The job id is the critical piece of information, but the S3 paths for the job and maybe other bits and bobs could be useful too.
Options for emitting this information:
nextstrain build writes a JSON file when requested, e.g. by --aws-batch-info job.json (exact spelling TBD).
nextstrain build emits delimited YAML in its normal output, always, which can be easily extracted and parsed, e.g.
(1) probably makes the most sense, especially as a starting point. (3) might be where we go eventually, but there's a lot more design considerations that we probably don't want/need to tackle now. (2) is kinda nice in some ways but annoying in others. And it's accomplishable with (1) anyway (well, assuming there's a YAML output option).
While not regarding this specific aim, I've long pushed for jobs within GitHub Actions to use structured output, either via a file (1) or normal output (2). The most recent discussion on this (that I remember, at least) was in the context of ingest-to-phylo workflows where we use a cache hit/miss rather than structured output from a check-new-data program. I remember earlier conversations too, although not the details.
Activity
jameshadfield commentedon Mar 31, 2025
👍
While not regarding this specific aim, I've long pushed for jobs within GitHub Actions to use structured output, either via a file (1) or normal output (2). The most recent discussion on this (that I remember, at least) was in the context of ingest-to-phylo workflows where we use a cache hit/miss rather than structured output from a check-new-data program. I remember earlier conversations too, although not the details.
victorlin commentedon Jul 1, 2025
Another option that was suggested years ago: Add
nextstrain build --quietoption which spits out Job ID when combined with--detatch(#61)