-
Notifications
You must be signed in to change notification settings - Fork 20
Description
based on nextstrain/.github#51 (comment)
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 buildwrites a JSON file when requested, e.g. by--aws-batch-info job.json(exact spelling TBD). -
nextstrain buildemits delimited YAML in its normal output, always, which can be easily extracted and parsed, e.g.Submitting job AWS Batch Job ID: 2ad078eb-630b-4ad2-80d0-bb898f5b6c48 --- nextstrain-build-id: … aws-batch-job-id: … workdir-url: s3://… ... Watching job status -
As part of [aws batch] Attach to builds no longer in the job queue #113 and/or List previously submitted AWS Batch jobs in the job queue #125,
nextstrain buildinternally tracks job details and a new command provides subsequent access to them, e.g.nextstrain build-info most-recentor something.
(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).