From 4b25ed089d794407d96762f3d36168894394ca52 Mon Sep 17 00:00:00 2001 From: mageshwaran-lifebit Date: Fri, 15 Mar 2024 19:32:54 +0530 Subject: [PATCH 1/6] feat: support preloading plugins --- .gitignore | 3 ++- .../src/main/groovy/nextflow/cli/CmdRun.groovy | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 464caff4bd..f7c5b65541 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,5 @@ gradle.properties .launch.classpath plugins-prod sandbox -wave-demo \ No newline at end of file +wave-demo +.DS_Store diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index f6045e7752..b781815baf 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -296,6 +296,8 @@ class CmdRun extends CmdBase implements HubOptions { log.info "N E X T F L O W ~ version ${Const.APP_VER}" Plugins.init() + this.preloadLifebitPlugins() + // -- specify the arguments final scriptFile = getScriptFile(pipeline) @@ -678,4 +680,15 @@ class CmdRun extends CmdBase implements HubOptions { } } + void preloadLifebitPlugins() { + def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS', '') + if( plugins ) { + log.info("List of Lifebit's plugins '${plugins}' that are going to pre-loading...") + Plugins.load([plugins: plugins.tokenize(',')]) + log.info("List of Lifebit's plugins '${plugins}' that are going to pre-loaded.") + } else { + log.info("No Lifebit's plugins that are going to pre-loading...") + } + } + } From f8cc2f4fec25ba7ac48e7993b58664552843b8f0 Mon Sep 17 00:00:00 2001 From: mageshwaran-lifebit Date: Fri, 15 Mar 2024 19:57:02 +0530 Subject: [PATCH 2/6] chore: change logger --- modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index b781815baf..b2c5f878da 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -683,11 +683,11 @@ class CmdRun extends CmdBase implements HubOptions { void preloadLifebitPlugins() { def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS', '') if( plugins ) { - log.info("List of Lifebit's plugins '${plugins}' that are going to pre-loading...") + log.debug("List of Lifebit's plugins '${plugins}' that are pre-loading...") Plugins.load([plugins: plugins.tokenize(',')]) - log.info("List of Lifebit's plugins '${plugins}' that are going to pre-loaded.") + log.debug("List of Lifebit's plugins '${plugins}' that are pre-loadeded.") } else { - log.info("No Lifebit's plugins that are going to pre-loading...") + log.debug("No Lifebit's plugins to pre-load") } } From 2c1e82b6c86f792b127eb9d5d79e8121a6ef7973 Mon Sep 17 00:00:00 2001 From: mageshwaran-lifebit Date: Fri, 15 Mar 2024 19:57:37 +0530 Subject: [PATCH 3/6] chore: change logger --- modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index b2c5f878da..1ceb5c5e07 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -683,9 +683,9 @@ class CmdRun extends CmdBase implements HubOptions { void preloadLifebitPlugins() { def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS', '') if( plugins ) { - log.debug("List of Lifebit's plugins '${plugins}' that are pre-loading...") + log.debug("Pre-loading Lifebit's plugins '${plugins}'...") Plugins.load([plugins: plugins.tokenize(',')]) - log.debug("List of Lifebit's plugins '${plugins}' that are pre-loadeded.") + log.debug("Preloaded Lifebit's plugins '${plugins}'.") } else { log.debug("No Lifebit's plugins to pre-load") } From 84a24661147a2a8895ce0d36707145ca2af876e5 Mon Sep 17 00:00:00 2001 From: mageshwaran-lifebit Date: Wed, 27 Mar 2024 17:15:35 +0530 Subject: [PATCH 4/6] chore: comment to avoid pipeline failure due to use of mismatch --- modules/nextflow/src/main/groovy/nextflow/Session.groovy | 2 +- modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/Session.groovy b/modules/nextflow/src/main/groovy/nextflow/Session.groovy index c735a7df21..38ada936ed 100644 --- a/modules/nextflow/src/main/groovy/nextflow/Session.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/Session.groovy @@ -839,7 +839,7 @@ class Session implements ISession { // an exception is thrown is the version does not match boolean important = false if( version.startsWith('!') ) { - important = true +// important = true // commenting to avoid pipeline failure due to lower version. https://github.com/nf-core/raredisease/blob/master/nextflow.config#L295C5-L295C35 version = version.substring(1).trim() } diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index 1ceb5c5e07..c881c749f6 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -681,7 +681,7 @@ class CmdRun extends CmdBase implements HubOptions { } void preloadLifebitPlugins() { - def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS', '') + def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS') if( plugins ) { log.debug("Pre-loading Lifebit's plugins '${plugins}'...") Plugins.load([plugins: plugins.tokenize(',')]) From 79b970c1879d9029856cb37734909234502c0c88 Mon Sep 17 00:00:00 2001 From: mageshwaran-lifebit <121040241+mageshwaran-lifebit@users.noreply.github.com> Date: Fri, 23 Jan 2026 19:02:37 +0530 Subject: [PATCH 5/6] chore: address Cursor comment --- modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index c881c749f6..e70a377fa2 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -684,7 +684,7 @@ class CmdRun extends CmdBase implements HubOptions { def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS') if( plugins ) { log.debug("Pre-loading Lifebit's plugins '${plugins}'...") - Plugins.load([plugins: plugins.tokenize(',')]) + Plugins.load([plugins: plugins.tokenize(',').collect { it.trim() }]) log.debug("Preloaded Lifebit's plugins '${plugins}'.") } else { log.debug("No Lifebit's plugins to pre-load") From b9a11fab19975f3e0addf72e2fb06f05cead206a Mon Sep 17 00:00:00 2001 From: mageshwaran-lifebit <121040241+mageshwaran-lifebit@users.noreply.github.com> Date: Fri, 23 Jan 2026 19:55:25 +0530 Subject: [PATCH 6/6] chore: address Copilot comment --- .../src/main/groovy/nextflow/cli/CmdRun.groovy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index e70a377fa2..46aa1e208c 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -680,12 +680,12 @@ class CmdRun extends CmdBase implements HubOptions { } } - void preloadLifebitPlugins() { - def plugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS') - if( plugins ) { - log.debug("Pre-loading Lifebit's plugins '${plugins}'...") - Plugins.load([plugins: plugins.tokenize(',').collect { it.trim() }]) - log.debug("Preloaded Lifebit's plugins '${plugins}'.") + private void preloadLifebitPlugins() { + def envPlugins = sysEnv.get('NXF_LIFEBIT_PRELOAD_PLUGINS') + if( envPlugins && envPlugins.trim().length() > 0 ) { + log.debug("Pre-loading Lifebit's plugins '${envPlugins}'...") + Plugins.load([plugins: envPlugins.tokenize(',').collect { it.trim() }.findAll { it }.unique()]) + log.debug("Preloaded Lifebit's plugins '${envPlugins}'.") } else { log.debug("No Lifebit's plugins to pre-load") }