Merged
Conversation
1601c9f to
87f1a6e
Compare
Contributor
|
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
m4dcoder
reviewed
Oct 31, 2023
Contributor
m4dcoder
left a comment
There was a problem hiding this comment.
@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
m4dcoder
approved these changes
Nov 1, 2023
Contributor
Author
|
@guzzijones Any additional requests for this PR? |
arm4b
approved these changes
Nov 14, 2023
cognifloyd
approved these changes
Nov 15, 2023
Member
cognifloyd
left a comment
There was a problem hiding this comment.
Minor nit: st2 does not have anything called a "job".
Otherwise, looks like a clean fix.
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.parametersis not set (an empty list as well) then the empty result is returned, however this happens even ifargs.inherit_envis set. Movedargs.inherit_envbefore 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.parameterscheck.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.