-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
env config not working with GCP Batch #5623
Comments
I'm unable to replicate this. Can you please provide a test case ? |
My reproducible example:
|
Shouldn't the bash version be this? script:
"""
echo "\$my_env_var" > out.txt
""" If you don't escape the $ then it will use the global variable So the issue seems to be that the config env is not being added to the task environment with Google Batch. And indeed when I check the set -u
# config env should be here
[[ $NXF_SCRATCH ]] && cd $NXF_SCRATCH
export NXF_TASK_WORKDIR="$PWD"
nxf_stage |
Yeah, that must be it. I'd have to go back and check on whether I just forgot the escape for |
Bug report
My
nextflow.config
contains:When the executor is
local
, the process usingMY_ENV_VAR
viaos.environ["MY_ENV_VAR"]
runs successfully.However, when the executor is
google-batch
, the process throwsKeyError: 'MY_ENV_VAR'
.https://www.nextflow.io/docs/latest/reference/config.html#env does not state that
env
is not supported forgoogle-batch
, so I'm assuming that there is either a bug or a lack of docs.Expected behavior and actual behavior
Environmental variables set via the
env
config scope should be available for GCP Batch jobs... or the docs should explicitly state thatenv
is not supported for GCP Batch.Steps to reproduce the problem
env
scopeEnvironment
The text was updated successfully, but these errors were encountered: