From 95e35c2aa4756ade2205cb678939cd81dc9e3080 Mon Sep 17 00:00:00 2001 From: Abhinav Sharma Date: Mon, 29 Jul 2024 09:04:29 +0200 Subject: [PATCH] rename enable -> enabled to comply with standard --- .../main/nextflow/nomad/config/NomadSecretOpts.groovy | 4 ++-- .../main/nextflow/nomad/executor/NomadService.groovy | 2 +- .../nextflow/nomad/secrets/NomadSecretProvider.groovy | 2 +- validation/secrets/nextflow.config | 2 +- validation/sun-nomadlab/nextflow.config | 11 ++++++----- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/plugins/nf-nomad/src/main/nextflow/nomad/config/NomadSecretOpts.groovy b/plugins/nf-nomad/src/main/nextflow/nomad/config/NomadSecretOpts.groovy index 5f0bfb2..ee6749e 100644 --- a/plugins/nf-nomad/src/main/nextflow/nomad/config/NomadSecretOpts.groovy +++ b/plugins/nf-nomad/src/main/nextflow/nomad/config/NomadSecretOpts.groovy @@ -2,11 +2,11 @@ package nextflow.nomad.config class NomadSecretOpts { - final Boolean enable + final Boolean enabled final String path NomadSecretOpts(Map map){ - this.enable = map.containsKey('enable') ? map.get('enable') as boolean : false + this.enabled = map.containsKey('enabled') ? map.get('enabled') as boolean : false this.path = map.path ?: "secrets/nf-nomad" } diff --git a/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy b/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy index 2b54f87..080e172 100644 --- a/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy +++ b/plugins/nf-nomad/src/main/nextflow/nomad/executor/NomadService.groovy @@ -284,7 +284,7 @@ class NomadService implements Closeable{ } protected Task secrets(TaskRun task, Task taskDef){ - if( config.jobOpts()?.secretOpts?.enable) { + if( config.jobOpts()?.secretOpts?.enabled) { def secrets = task.processor?.config?.get(TaskDirectives.SECRETS) if (secrets) { Template template = new Template(envvars: true, destPath: "/secrets/nf-nomad") diff --git a/plugins/nf-nomad/src/main/nextflow/nomad/secrets/NomadSecretProvider.groovy b/plugins/nf-nomad/src/main/nextflow/nomad/secrets/NomadSecretProvider.groovy index 815c8d5..80d4196 100644 --- a/plugins/nf-nomad/src/main/nextflow/nomad/secrets/NomadSecretProvider.groovy +++ b/plugins/nf-nomad/src/main/nextflow/nomad/secrets/NomadSecretProvider.groovy @@ -25,7 +25,7 @@ class NomadSecretProvider extends LocalSecretsProvider implements SecretsProvide if( !config ){ config = new NomadConfig(Global.config?.nomad as Map ?: Map.of()) } - config?.jobOpts()?.secretOpts?.enable + config?.jobOpts()?.secretOpts?.enabled } @Override diff --git a/validation/secrets/nextflow.config b/validation/secrets/nextflow.config index 924ee98..93e1219 100644 --- a/validation/secrets/nextflow.config +++ b/validation/secrets/nextflow.config @@ -18,7 +18,7 @@ nomad { namespace = 'nf-nomad' secrets { - enable = true //if false then use LocalSecretsProvider implementation + enabled = true //if false then use LocalSecretsProvider implementation } } diff --git a/validation/sun-nomadlab/nextflow.config b/validation/sun-nomadlab/nextflow.config index c13a897..7c3e535 100644 --- a/validation/sun-nomadlab/nextflow.config +++ b/validation/sun-nomadlab/nextflow.config @@ -8,12 +8,12 @@ process { aws { // From Nomad variables secret store -// accessKey = secrets.SUN_NOMADLAB_MINIO_ACCESS_KEY -// secretKey = secrets.SUN_NOMADLAB_MINIO_SECRET_KEY + accessKey = secrets.SUN_NOMADLAB_MINIO_ACCESS_KEY + secretKey = secrets.SUN_NOMADLAB_MINIO_SECRET_KEY // From local Nextflow secret store - accessKey = secrets.SUN_NOMADLAB_ACCESS_KEY - secretKey = secrets.SUN_NOMADLAB_SECRET_KEY +// accessKey = secrets.SUN_NOMADLAB_ACCESS_KEY +// secretKey = secrets.SUN_NOMADLAB_SECRET_KEY client { endpoint = 'http://100.119.165.23:9000' @@ -38,8 +38,9 @@ nomad { jobs { namespace = 'nf-nomad' secrets { - enable = true + enabled = false } + deleteOnCompletion = false volume = { type "host" name "scratch" }