Skip to content

Fix new plugins registry download when OCI repositories require tokens#6303

Merged
pditommaso merged 3 commits intomasterfrom
fix-plugins-registry-download
Jul 24, 2025
Merged

Fix new plugins registry download when OCI repositories require tokens#6303
pditommaso merged 3 commits intomasterfrom
fix-plugins-registry-download

Conversation

@jorgee
Copy link
Contributor

@jorgee jorgee commented Jul 23, 2025

Some OCI repositories despite artifact are public they do not allow direct HTTP downloads. They require to acquire a temporal token to preform the download.

This PR extends the pf4j simple file download to allow this type of downloads

jorgee added 2 commits July 23, 2025 12:01
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
@netlify
Copy link

netlify bot commented Jul 23, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit e5dd078
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68825c26d72b66000a0df59c
😎 Deploy Preview https://deploy-preview-6303--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jorgee jorgee changed the title Fix new plugins registry download when OCI repository requires tokens Fix new plugins registry download when OCI repositories require tokens Jul 23, 2025
@bentsherman
Copy link
Member

Are you able to test this with the real plugin registry? Even just a manual test for now would be fine

@jorgee
Copy link
Contributor Author

jorgee commented Jul 24, 2025

Yes, tested with https://cr.stage-seqera.io/ and https://public.cr.stage-seqera.io/. I was thinking to add a test with a real blob but I finally did it with wiremock because I was afraid that the blob could be removed and tests could start to fail and cause problems in the future. I could add it if there is an stable artifact. Maybe one of the core plugins added in https://cr.stage-seqera.io/?

@pditommaso
Copy link
Member

Let's add an integration test using the current dev registry, truth that's a bit unstable but a good reminder to close it asap

Signed-off-by: jorgee <jorge.ejarque@seqera.io>

if (conn.responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
def wwwAuth = conn.getHeaderField("WWW-Authenticate")
if (wwwAuth?.contains("Bearer")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this may also be Basic. It may be worth considering adopting the ORAS client to avoid to maintain all this burden. My initial assumption was to avoid that because the registry it was expected to not require any auth.

@pditommaso pditommaso merged commit 12fbef3 into master Jul 24, 2025
22 checks passed
@pditommaso pditommaso deleted the fix-plugins-registry-download branch July 24, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants