-
Notifications
You must be signed in to change notification settings - Fork 191
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
Template: Add a Github Action workflow to test a successful download of the pipeline #2618
Template: Add a Github Action workflow to test a successful download of the pipeline #2618
Conversation
…ccessful download.
20909b2
to
6ea4d62
Compare
nf_core/pipeline-template/.github/workflows/download_pipeline.yml
Outdated
Show resolved
Hide resolved
FYI, you can ignore the failing cirun action. |
…sted runners (large container downloads).
…e a trigger as well. This only applies to last-minute fixes prior to a pipeline release.
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.
LGTM!
nf_core/pipeline-template/.github/workflows/download_pipeline.yml
Outdated
Show resolved
Hide resolved
nf_core/pipeline-template/.github/workflows/download_pipeline.yml
Outdated
Show resolved
Hide resolved
Thanks @mirpedrol ! Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
env: | ||
NXF_SINGULARITY_CACHEDIR: ./ | ||
NXF_SINGULARITY_HOME_MOUNT: true | ||
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results |
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.
What's to stop Nextflow from downloading any missing singularity containers during run time here? eg. if the singularity image has been downloaded with an incorrect filename?
Tagging @mirpedrol @mashehu
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.
That is a valid point, although the case of an incorrect filename should be caught by the respective tests in the tools repo.
Do you think that setting NXF_OFFLINE
would help? Or should we count the files in the NXF_SINGULARITY_CACHEDIR
before and after the pipeline run to corroborate that they are still the name number?
Generally, though, I am already very happy that there is now a download test in the first place, because we had multiple new releases for which nf-core download
unexpectedly raised exceptions because some odd declaration slipped through the module linting and review. (Such things like arbitrarily mixing single and double quotes). If we can avoid publishing some crooked module as part of a pipeline release like this, I am already very happy!
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.
That is a valid point, although the case of an incorrect filename should be caught by the respective tests in the tools repo.
Good point 👍🏻
Do you think that setting
NXF_OFFLINE
would help?
We were chatting about that in the meeting where I added the comment. I'm not confident that it would 👀 😅 We were playing with the idea of cutting off networking access on the custom runner and stuff, but I think it's almost certainly overkill.
No need to do anything here, as you say - invalid container names is something that we should be testing in other tests. Testing for syntax errors / weirdness here is a good addition as it is 👍🏻
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.
If you cut networking access entirely, then the most likely test failure will be some issue with the plugins rather than the actual test subject, namely container images. 😅
I already searched a bit and there seems to be ways to block network traffic selectively, but only on a per job and not on a per-step basis. So if one disallows the registries, the containers would not download successfully beforehand either.
Motivation
When refactoring the 'nf-core download' functionality, I had to account frequently for edge cases in the container declarations. A particular revision of a single pipeline disrupted an otherwise functional solution. Peculiarities like arbitrarily mixed single and double quotes in the code had to be addressed, and often enough, fixing it for one case would render it defunct for another.
Up until now, the only safeguard against a growing heterogeneity was linting the pipeline code. However, if an unconventional module ever slipped through linting and became part of a released pipeline, nf-core download had to adapt. For this reason, the
test_find_container_images_modules()
andtest__find_container_images_config_nextflow()
were included intest_download.py
.As a companion to those tests, I propose integrating a Github Action workflow into the pipeline template. This way, every developer can ensure their new pipeline downloads smoothly. If not, developers have the option to modify tools instead of the pipeline. This is why I am using the
dev
branch of tools in the Action.Since this test uses a lot of resources, it is only run when a new PR is opened to dev and master or manually triggered. Initially, I also wanted to rerun it with new pushes to open PRs, but I realized that this might be too exhaustive. A downside of this test is, that it downloads all containers, which may exceed the available 2GB space on the GitHub provided runners.
A working version of this has been added to my fork of the Testpipeline. Unfortunately, you might not have permissions to view the run details.
PR checklist
CHANGELOG.md
is updateddocs
is updated