-
Notifications
You must be signed in to change notification settings - Fork 67
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
output viral-ngs version as string in WDL workflows #928
Conversation
This calls `reports.py --version` in a new WDL task at the end of each workflow.
For workflows run on DNAnexus, the version can be baked into the workflow as a constant, the way the docker tag is. It is also currently possible to determine the version from 'dx describe analysis-xxxxx' output. It might also make sense to attach the viral-ngs version to the created workflows and apps as DNAnexus properties, and/or to create global workflows which are explicitly versioned. One other option is to use git smudge filters to bake the git hash as a constant into the WDL files. Not sure if dxWDL would be smart enough to avoid spinning up an extra job in that case. |
Yeah been thinking about this a little... agree with the need to have this version more clearly stamped in a way we can access. A few thoughts:
Just a note that I still often ponder a future in which we don't need to have the exact same docker image for each WDL task (we could then strip the images down quite a bit since they don't have to be so monolithic), but I'm not sure if that future is compatible with retaining compatibility with Snakemake... anyway, a bit off-topic. |
Switching to containers may not break Snakemake after all: |
Besides slimming down the images, per-task Docker images would enable much more reuse of past results when re-running old analyses with newer viral-ngs versions. E.g. assemble_denovo_with_deplete could reuse the deplete part if only the assemble code changed. |
Thanks for the review, everyone. The latest commit switches to a sed-replaced string replacement per-task. Here's an example CI execution of a workflow, with the output string shown. There's some redundancy since each task outputs the same value, but that would allow us to mix-and-match task versions in workflows while keeping track of their source versions. |
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.
Thanks, I don't mind the task output redundancy (in its current form, potentially not redundant in the future) and I think this uses existing versioning machinery well and keeps runtime efficient. Only one cosmetic change requested.
travis/version-wdl-runtimes.sh
Outdated
@@ -7,5 +7,11 @@ OLD_TAG="quay.io/broadinstitute/viral-ngs" | |||
echo Replacing $OLD_TAG with $NEW_TAG in all task WDL files | |||
sed -i -- "s|$OLD_TAG|$NEW_TAG|g" pipes/WDL/workflows/tasks/*.wdl | |||
|
|||
CURENT_VERSION=`travis/list-docker-tags.sh | tail -1 | cut -d\: -f2` |
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.
Not functionally important, but just to avoid another cosmetic PR later (also in line 13&14 below)
CURENT_VERSION=`travis/list-docker-tags.sh | tail -1 | cut -d\: -f2` | |
CURRENT_VERSION=`travis/list-docker-tags.sh | tail -1 | cut -d\: -f2` |
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.
Oh also, maybe just to avoid multiple invocations of list-docker-tags.sh
, could we make this more like
CURRENT_VERSION=`echo $NEW_TAG | cut -d\: -f2`
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.
Thanks for catching the typo!
This calls
reports.py --version
in a new WDL task at the end of each workflow so the viral-ngs version is reported among workflow outputs as a WDL string. It would be more efficient to callreports.py --version
within all of the existing tasks to avoid the extra startup overhead of a new task call, but that would add quite a bit of repetition among all of the tasks.