Skip to content
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

publish.publish trim mods after comma split #49634

Merged
merged 2 commits into from
Oct 4, 2018
Merged

publish.publish trim mods after comma split #49634

merged 2 commits into from
Oct 4, 2018

Conversation

bmiguel-teixeira
Copy link
Contributor

@bmiguel-teixeira bmiguel-teixeira commented Sep 12, 2018

What does this PR do?

Fixes a bug I found when applying states via publish.publish.
salt['publish.publish'](......fun='state.apply', arg='["mods=state1.latest,state2.latest"]'...)
If the mods inside the arg contains spaces, the process will fail.

What issues does this PR fix or reference?

Did not open a bug report.

Previous Behavior

Salt publish.publish fails if the mods inside arg contains white spaces after the comma split.
This Fails: "state1.latest, state2.latest"

New Behavior

Salt publish.publish works as expected since the state names are now trimmed.
This now works: "state1.latest, state2.latest"
Also generalized the trim for other mods splits

Tests written?

No

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@ghost ghost requested review from a team September 12, 2018 22:16
Copy link
Contributor

@brejoc brejoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - and thanks for the catch, @bmiguel-teixeira!

Copy link
Contributor

@dwoz dwoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment

salt/client/ssh/wrapper/state.py Outdated Show resolved Hide resolved
salt/client/ssh/wrapper/state.py Outdated Show resolved Hide resolved
@bmiguel-teixeira
Copy link
Contributor Author

Had to forgo filter method due to linter reporting invalid code for python3

@rallytime rallytime merged commit c85654b into saltstack:develop Oct 4, 2018
garethgreenaway added a commit to garethgreenaway/salt that referenced this pull request Sep 19, 2019
saltybaker pushed a commit to saltybaker/salt that referenced this pull request Nov 21, 2019
@waynew waynew added the has master-port port to master has been created label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has master-port port to master has been created
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants