Skip to content

Commit 5fdd2d8

Browse files
authored
upgrade to nextflow 25.10.0
Signed-off-by: Jorge Aguilera <[email protected]>
1 parent 4b1d010 commit 5fdd2d8

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ antora {
3333
}
3434

3535
nextflowPlugin {
36-
nextflowVersion = '24.10.4'
36+
nextflowVersion = '25.10.0'
3737
description = 'An Hashicorp Nomad executor plugin'
3838
provider = 'nextflow-io'
3939
className = 'nextflow.nomad.NomadPlugin'

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version= 0.4.0-edge1
2-
github_organization=nextflow-io
1+
version= 0.4.0-edge2
2+
github_organization=nextflow-io

src/main/groovy/nextflow/nomad/NomadPlugin.groovy

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import nextflow.cli.PluginAbstractExec
2323
import nextflow.nomad.secrets.NomadSecretCmd
2424
import nextflow.nomad.executor.TaskDirectives
2525
import nextflow.plugin.BasePlugin
26-
import nextflow.script.ProcessConfig
27-
import nextflow.secret.SecretsLoader
26+
import nextflow.script.dsl.ProcessBuilder
2827
import org.pf4j.PluginWrapper
2928

3029
/**
@@ -40,11 +39,10 @@ class NomadPlugin extends BasePlugin implements PluginAbstractExec{
4039
NomadPlugin(PluginWrapper wrapper) {
4140
super(wrapper)
4241
addCustomDirectives()
43-
SecretsLoader.instance.reset()
4442
}
4543

4644
private static void addCustomDirectives() {
47-
ProcessConfig.DIRECTIVES.addAll(TaskDirectives.ALL)
45+
ProcessBuilder.DIRECTIVES.addAll(TaskDirectives.ALL)
4846
}
4947

5048
@Override

src/main/groovy/nextflow/nomad/executor/NomadExecutor.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import org.pf4j.ExtensionPoint
4040
class NomadExecutor extends Executor implements ExtensionPoint {
4141

4242
private NomadService service
43-
private NomadConfig config
43+
private NomadConfig nomadConfig
4444

4545
@Override
4646
protected void register() {
@@ -49,21 +49,21 @@ class NomadExecutor extends Executor implements ExtensionPoint {
4949
}
5050

5151
protected void initNomadService(){
52-
this.config = new NomadConfig((session.config.nomad ?: Collections.emptyMap()) as Map)
53-
this.service = new NomadService(this.config)
52+
this.nomadConfig = new NomadConfig((session.config.nomad ?: Collections.emptyMap()) as Map)
53+
this.service = new NomadService(this.nomadConfig)
5454
}
5555

5656
@Override
5757
protected TaskMonitor createTaskMonitor() {
58-
TaskPollingMonitor.create(session, name, 100, Duration.of('5 sec'))
58+
TaskPollingMonitor.create(session, config, name, Duration.of('5 sec'))
5959
}
6060

6161
@Override
6262
TaskHandler createTaskHandler(TaskRun task) {
6363
assert task
6464
assert task.workDir
6565
log.trace "[NOMAD] launching process > ${task.name} -- work folder: ${task.workDirStr}"
66-
return new NomadTaskHandler(task, this.config, service)
66+
return new NomadTaskHandler(task, this.nomadConfig, service)
6767
}
6868

6969
@Override

src/main/groovy/nextflow/nomad/executor/NomadTaskHandler.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,15 @@ class NomadTaskHandler extends TaskHandler implements FusionAwareTask {
149149

150150
@Override
151151
void kill() {
152+
super.kill()
152153
nomadService.kill(this.jobName)
153154
}
154155

156+
@Override
157+
void killTask(){
158+
kill()
159+
}
160+
155161
@Override
156162
void submit() {
157163
submitTask()

src/main/groovy/nextflow/nomad/secrets/NomadSecretProvider.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class NomadSecretProvider extends LocalSecretsProvider implements SecretsProvide
3838

3939
protected boolean isEnabled(){
4040
if( !config ){
41+
if( !Global.config ){
42+
return false
43+
}
4144
config = new NomadConfig(Global.config?.nomad as Map ?: Map.of())
4245
}
4346
config?.jobOpts()?.secretOpts?.enabled

validation/run-pipeline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
NXF_ASSETS=$(pwd)/nomad_temp/scratchdir/assets \
88
NXF_CACHE_DIR=$(pwd)/nomad_temp/scratchdir/cache \
9-
nextflow run -w $(pwd)/nomad_temp/scratchdir/ "$@"
9+
nextflow ${REMOTE_DEBUG} run -w $(pwd)/nomad_temp/scratchdir/ "$@"

0 commit comments

Comments
 (0)