-
Notifications
You must be signed in to change notification settings - Fork 5.6k
cmd state module fixes #68301
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
base: 3006.x
Are you sure you want to change the base?
cmd state module fixes #68301
Conversation
|
Reverted the change to disable shell functionality by default when running commands via the state module. It can be disabled manually if required. |
| args=["foo bar", "baz qux"], | ||
| ) | ||
| self.assertSaltTrueReturn(ret) | ||
| self.assertSaltStateChangesEqual(ret, expected, "stdout") |
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.
We need to either migrate this file to pytests or create these tests in pytest.
| @@ -0,0 +1,2 @@ | |||
| Expose paramter python_shell to allow disabling shell functionality for the cmd state module. | |||
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.
parameter python_shell
|
Just adding some information that may be relevant to the scope of these changes. Currently, according to the documentation for the However, the stateful argument can complicate things further in that it accepts an optional key One might even see a rationale for a parallel to the |
@dwoz Everything in this PR appears to be fixing the non-backwards compatible changes (and bug) from the previous PR which did add changes to existing functionality that should have gone to master. There were several issues written shortly after the previous as a result so I think it would be good to get fixes in before even more people run into it. @xsmile appears to have disappear though. |
What does this PR do?
Change the behavior of the cmd state module.
What issues does this PR fix or reference?
#68156
#68298
Previous Behavior
cmd.runNew Behavior
python_shellparameter and is disabled by default forcmd.script(handled in the execution module)cmd.runsupports theargsparameter to avoid quoting and escaping issues when running programsMerge requirements satisfied?
Commits signed with GPG?
No