-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
Fix #4676 #6030
Fix #4676 #6030
Conversation
1601c9f
to
87f1a6e
Compare
add to change log please. Also can you add a unit test to cover this edge case? |
9b940c5
to
f68d8a0
Compare
…arameter is set. Currently the doesn't work for shell commands either, it relies on those commands having default parameters that would then populate the 'parameters' variable to pass that check
…we try to inherit env without any parameters
…linting working locally
f68d8a0
to
285b908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rebrowning Can you add new or point to an existing unit test where the action parameters are set and inherit environment is true?
… for some of the different parameters are not negatively impacted with the change
@guzzijones Any additional requests for this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: st2 does not have anything called a "job".
Otherwise, looks like a clean fix.
Co-authored-by: Jacob Floyd <[email protected]>
Co-authored-by: Jacob Floyd <[email protected]>
execute populating the inherited environment variables whenever the parameter is set. Currently the doesn't work for shell commands either, it relies on those commands having default parameters that would then populate the 'parameters' variable to pass that check
Closes #4676
Replicating with the steps in the issue above. It looks like if
args.parameters
is not set (an empty list as well) then the empty result is returned, however this happens even ifargs.inherit_env
is set. Movedargs.inherit_env
before the check so that even when we're running a job with no parameters, we'll still populate the environment variables.Let me know if this makes sense, or any edge cases we'd want to test here. This was working for the shell runners because they all have a "cmd" parameter, which was then passing the
args.parameters
check.This seems straight forward but I haven't been in the code base long enough to see if the original implementation is the expected approach.