File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
plugins/nf-cws/src/main/nextflow/cws Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 11package nextflow.cws
22
33import groovy.transform.CompileStatic
4+ import nextflow.BuildInfo
45import nextflow.cws.wow.file.LocalPath
56import nextflow.cws.wow.file.OfflineLocalPath
67import nextflow.cws.wow.file.WorkdirPath
@@ -59,9 +60,28 @@ class CWSPlugin extends BasePlugin {
5960 ] )
6061 }
6162
63+ private checkForK8sPlugin () {
64+ // in 25.03.0-edge, Nextflow's Kubernetes functionality was refactored into a plugin
65+ boolean isK8sPluginVersion = getWrapper()
66+ .getPluginManager()
67+ .getVersionManager()
68+ .checkVersionConstraint(BuildInfo . version, " >=25.03.0" )
69+
70+ if ( isK8sPluginVersion ) {
71+ PluginWrapper searchResultNfK8s = getWrapper()
72+ .getPluginManager()
73+ .getPlugins()
74+ .find { it. getPluginId() == ' nf-k8s' }
75+ if ( searchResultNfK8s == null ) {
76+ throw new IllegalStateException (" The 'nf-k8s' plugin is required by nf-cws but not loaded." )
77+ }
78+ }
79+ }
80+
6281 @Override
6382 void start () {
6483 super . start()
84+ checkForK8sPlugin()
6585 registerTraceFields()
6686 KryoHelper . register( LocalPath , LocalPathSerializer )
6787 KryoHelper . register( OfflineLocalPath , LocalPathSerializer )
You can’t perform that action at this time.
0 commit comments