Skip to content

Commit

Permalink
rename enable -> enabled to comply with standard
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi18av committed Jul 29, 2024
1 parent ccb80bd commit 95e35c2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion validation/secrets/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
11 changes: 6 additions & 5 deletions validation/sun-nomadlab/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -38,8 +38,9 @@ nomad {
jobs {
namespace = 'nf-nomad'
secrets {
enable = true
enabled = false
}

deleteOnCompletion = false

volume = { type "host" name "scratch" }
Expand Down

0 comments on commit 95e35c2

Please sign in to comment.