(bug) Fix params quoting when using quotes on value #602
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue with yaml key
params
where it results in different behavior than if the key was passed through env key.Takes an approach that does not require backwards
incompatible changes nor does it require changing
the schema of yaml files.
Fixes #601
Result with this patch:
Expectation: using params or env vars would both inject environmental variables into any subprocesses executed in the DAG.
Actual: they both inject env vars but differ in how they treat quotes.
Test dag:
Results in output:
Which is interpreted subtly differently in the inner script and caused me to debug and workaround it for a dag.
What I expect as output is:
Note the difference for TEST_PARAM and ENV_PARAM. We can't leave off the quote marks for params, otherwise the arguments are parsed incorrectly by splitting on whitespace.
Because some users could rely on this behavior, one solution is to enable
params
key to take more structured data, likeenv:
key.Like this: