nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Pin only major/minor plugin version with `+` suffix

Open bentsherman opened this issue 9 months ago • 19 comments

Close #4329

This PR changes the plugin system to not download plugins in offline mode (NXF_OFFLINE). Instead, Nextflow will search the plugins directory for the latest plugin version and use that one.

This change makes it possible to run a pipeline in offline mode without pinning the version of each plugin, which allows the pipeline to automatically receive plugin updates. The assumption is that users will download all the plugins they need beforehand and transfer them to the offline system, using these plugins as a local cache.

I tested this PR by installing nf-validation 0.3.0 (nextflow plugin install [email protected]) and running a script with the following config:

plugins {
  id 'nf-validation'
}

Normally, Nextflow would automatically download the newest plugin version (currently 0.3.2), but now if you run Nextflow with NXF_OFFLINE=true, it will use the already downloaded version 0.3.0 and not download anything new. I even disabled my internet connection just to be sure 😉

One limitation however is that the offline version checker doesn't verify that a plugin version is compatible with the current Nextflow version. We can get the version range from the plugin manifest file, but maybe there is some code somewhere that already does this?

bentsherman avatar Sep 25 '23 20:09 bentsherman