Pass all data to batch.run() call when using --failhard #33048
Merged
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.
What does this PR do?
Passes more data to batch.run when specifying
--failhard
. This allows salt.py to look for the function's retcode and stop the batch run when using--failhard
.What issues does this PR fix or reference?
Fixes #24996
Previous Behavior
Without this change, cmd_run worked as expected (because the retcode is passed automatically), but when using cmd.run, the failhard was honored and the batch run would continue instead of exiting:
New Behavior
With this change, the retcode of the failed cmd.run command is recognized at the process exits:
Tests written?
No