Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

secrets extension not supported in EnvVarRequirement #145

Open
fabricebrito opened this issue Mar 28, 2023 · 0 comments
Open

secrets extension not supported in EnvVarRequirement #145

fabricebrito opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fabricebrito
Copy link
Collaborator

fabricebrito commented Mar 28, 2023

Calrissian version

0.12.0

Current behaviour:
Parameter pw is a secret. using it in an EnvVarRequirement with e.g.:

EnvVarRequirement:
        envDef:
          AWS_ACCESS_KEY_ID: $(inputs.pw)

will not take the parameter value.

Expected behaviour

Secret parameter values used for setting environment variables must have the correct value.

To reproduce

$namespaces:
  cwltool: http://commonwl.org/cwltool#

$graph:

- class: Workflow
  id: main
  hints:
    "cwltool:Secrets":
      secrets: [pw]
    DockerRequirement:
      dockerPull: docker.io/debian:stable-slim
  inputs:
    pw: string
  outputs:
    out:
      type: File
      outputSource: step1/out
  steps:
    step1:
      in:
        pw: pw
      out: [out]
      run: 
        "#secret_job"


- class: CommandLineTool
  id: secret_job
  hints:
    "cwltool:Secrets":
      secrets: [pw]
  requirements:
    InitialWorkDirRequirement:
      listing:
      - entryname: stagein.sh
        entry: |-
          #!/bin/bash
          env
    EnvVarRequirement:
        envDef:
          AWS_ACCESS_KEY_ID: $(inputs.pw)
  inputs:
    pw: string
  outputs:
    out: stdout
  baseCommand: ['/bin/bash', 'stagein.sh']

Run with:

calrissian --tmp-outdir-prefix /calrissian-tmp/bbtest/ --outdir /calrissian-output --stdout /calrissian-output/out.json --max-ram 8Gi --max-cores 4 --debug --enable-ext /calrissian-input/secrets.cwl#main --pw aaa
@emmanuelmathot emmanuelmathot added the enhancement New feature or request label Jun 19, 2023
@emmanuelmathot emmanuelmathot added this to the 0.15.0 milestone Jun 22, 2023
@emmanuelmathot emmanuelmathot removed this from the 0.15.0 milestone Nov 23, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants