Make plugin metadata prefetch failure non-fatal#7019
Conversation
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
|
Tested without connectivity to registry.
|
| log.warn "Failed to prefetch plugin metadata - ${e.message}" | ||
| log.debug "Plugin metadata prefetch error details", e |
|
Thanks for addressing this problem, it was indeed causing an issue for us at NGI (me) when setting up a recent Nextflow version on our HPC. Already in its current form, this will likely work perfectly for us. However, since there is already an environment variable That would introduce a 4th case: When no pinned version, but I see why allowing this may cause hard to debug issues (incompatible Nextflow/Plugin combinations?), but also reckon that few developers and almost no users will actually track the minimally required plugin version. If somebody is already keeping their |
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
|
I wonder if NXF_OFFLINE should be honoured and therefore the call to the registry skipped at all |
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
It is honored, but NXF_OFFLINE also causes local git repositories to not work: #6988 In fact it might be simpler to fix that issue. Then you could just run with |
bentsherman
left a comment
There was a problem hiding this comment.
I'm starting to think this PR is the wrong approach. I think we could standardize on the following pattern for plugins, modules, and pipelines:
- If
NXF_OFFLINE=true, use only the local cache and fail if something is not available locally - Otherwise, use the local cache but always check remote source for latest version
This already works for plugins, we just need to fix #6988 for pipelines. I think modules also effectively work this way even though they don't explicitly check NXF_OFFLINE
Summary
Fixes #7013
HttpPluginRepository.prefetch()catch exceptions and log a warning instead of aborting startupHashMapon failure so thatgetPlugin()can still attempt on-demand lazy fetches laterfetchMetadata()error behavior directlyContext
When all plugins are pinned to exact versions and pre-installed locally, Nextflow unconditionally calls the plugin registry API at startup. If the registry is unreachable, the run aborts even though the fetched metadata would never be used.
This affects users in airlocked/firewalled environments who pre-install plugins into container images.
NXF_OFFLINE=trueworks around it but also blocks remote pipeline cloning, making it unusable for environments that need to fetch pipelines from a Git server.With this fix, the prefetch error is deferred — it only surfaces later if something genuinely needs the metadata (version resolution for unpinned plugins, download URLs for missing plugins).
Test plan
HttpPluginRepositoryTest— all 9 tests passnextflow.plugin.*tests passnextflow runsucceeds🤖 Generated with Claude Code