-
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
Download: Trim explicit registries #2403
Conversation
dcddd08
to
d194033
Compare
Codecov Report
@@ Coverage Diff @@
## dev #2403 +/- ##
==========================================
- Coverage 71.23% 71.07% -0.17%
==========================================
Files 87 87
Lines 9415 9431 +16
==========================================
- Hits 6707 6703 -4
- Misses 2708 2728 +20
|
Also, can we mix and match registries? [edit] Oh I see, by running twice. |
What do you mean by mix and match registries? An absolute URI is not automatically tried (unless that registry was anyway specified with e.g. |
I would personally prefer option 1 because this is consistent with the docker API, but then again I don't use Singularity. The code itself looks fine. |
@mirpedrol @mashehu - do you have a preference for either of the two? |
Option 1 looks more intuitive to me, modules with absolute URIs will usually be from a registry different from |
…he registries to test.
…lute URIs instead of trimming explicit registries.
db04dd6
to
976ddf4
Compare
So, I have now implemented the requested changes to Additionally, I have also added the |
Nice work (again!) |
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! Thank you!
Co-authored-by: Júlia Mir Pedrol <[email protected]>
Issue
Some pipelines respectively modules use full-length URIs such as
quay.io/qiime2/core:2022.11
when referencing the Docker container image.Such URIs were not properly accounted for when the new
-l
/--container-library
feature for tools 2.9 was devised. This prevented the user from successfully pulling the images, because the registry was duplicated in the final URI as is exemplified withnf-core download ampliseq -r '2.6.1' -s 'singularity' -t
:Approach
In general, three possible solutions to this problem exist:
-l
/--container-library
arguments for full length URIs.-l
/--container-library
arguments while ignoring any module-specified registry.-l
/--container-library
provided ones.All in all, option 2 was chosen.
If changes were required after pipeline publication, for example due to the migration to another registry, option 1 would have prevented any. Option 3 would have posed the challenge of interfering with the items to loop over during the loop execution itself, with merely questionable benefits for the UX. Although it would have allowed for more instant successful downloads than any other approach, silently adding another container registry would also have been dangerous, as it would have enabled URI hijacking for other modules in a pipeline.
Therefore, option 2 was ultimately implemented. It eliminates a possible registry automatically to avoid duplications and fixes most download issues, since far the most explicit registries in nf-core modules are
quay.io
anddocker.io
. An INFO message with the module-specified registry is printed to the screen, so that a user can retry the download with said registry as explicit argument.PR checklist
CHANGELOG.md
is updateddocs
is updated