Skip to content

event.send add option for return to not show as change#47391

Merged
rallytime merged 16 commits intosaltstack:developfrom
twellspring:patch/43914
May 31, 2018
Merged

event.send add option for return to not show as change#47391
rallytime merged 16 commits intosaltstack:developfrom
twellspring:patch/43914

Conversation

@twellspring
Copy link
Copy Markdown
Contributor

@twellspring twellspring commented Apr 29, 2018

What does this PR do?

Adds a show_changed option to the event.send state. The default ( true ) has same behavior as before ( putting the data parameter into the changes return value). Setting to false sets the changes return value to {} so that the state does not show as a change.

Using this parameter allows for cleaning up the highstate return so it is easier to see the actual changes on the minion.

What issues does this PR fix or reference?

#43914

New Behavior

show_change: False changes the event.send return from True with changes to True no changes

Tests written?

No

Commits signed with GPG?

No

@cachedout
Copy link
Copy Markdown
Contributor

If we're going to do this we need to modify this PR so that information about this change is added to the release notes first, please.

@twellspring twellspring changed the title Patch/43914 event.send add option for return to not show as change May 1, 2018
@cachedout
Copy link
Copy Markdown
Contributor

Hi @twellspring. We need the release notes modified and also these lint errors fixed before we can merge this. Thanks!

https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/21472/violations/file/salt/states/event.py/

@cachedout
Copy link
Copy Markdown
Contributor

@twellspring Will you be able to make the requested changes to this? If not we'll go ahead and close it. Thanks.

@twellspring
Copy link
Copy Markdown
Contributor Author

Just getting back to this PR. I'll update it soon

@twellspring
Copy link
Copy Markdown
Contributor Author

Took care of the linting problems I could. Added release notes. I could not find any document saying best practices for the release notes, so made my best guess.

Comment thread doc/topics/releases/2018.3.1.rst Outdated
create a LocalClient connection to the master ipc sockets to control
environments.

Sent events can return as unchanged
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this addition is going into develop, this release note change should go into the Fluorine.rst file instead of 2018.3.1.

@twellspring
Copy link
Copy Markdown
Contributor Author

@rallytime moved the release notes per your request. These commits were by me and not jenniparcell ... I was testing how easy it was to spoof another user and forgot to remove it. Fixed that and detting up GPG for myself.

Comment thread salt/states/event.py Outdated
**kwargs):
data=None,
preload=None,
show_changed=True,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we calling this function positionally anywhere in salt? It'd probably be better to move this to the bottom of the list, just in case?

@twellspring
Copy link
Copy Markdown
Contributor Author

@rallytime done

@rallytime rallytime merged commit dc5e2b4 into saltstack:develop May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants