Fix new plugins registry download when OCI repositories require tokens#6303
Fix new plugins registry download when OCI repositories require tokens#6303pditommaso merged 3 commits intomasterfrom
Conversation
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Are you able to test this with the real plugin registry? Even just a manual test for now would be fine |
|
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/? |
|
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")) { |
There was a problem hiding this comment.
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.
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