Skip to content

Add pre_versions to chocolatey.installed - #37762

Merged
cachedout merged 2 commits into
saltstack:2016.3from
twangboy:fix_chocolatey_state
Nov 24, 2016
Merged

cachedout merged 2 commits into
saltstack:2016.3from
twangboy:fix_chocolatey_state

Conversation

@twangboy

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds pre_version argument to the chocolatey.installed state. It looks like this was an oversight.

What issues does this PR fix or reference?

https://github.com/saltstack/zh/issues/1061

Previous Behavior

This parameter was not available. Additionally, the call to chocolatey.install used positional arguments and didn't account for the pre_versions parameter between force and install_args, so the chocolatey.install paramaters were being shifted down one after force, pre_versions was getting install_args, install_args was getting override_args, etc.

New Behavior

Parameter now available. Arguments line up correctly.

Tests written?

No

Comment thread salt/states/chocolatey.py
override_args,
force_x86,
package_args)}
ret['changes'] = {name: __salt__['chocolatey.install'](

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.

This is a very tight coupling between the ordering of the keyword arguments in the execution module and the ordering here. It would be better to use the keywords themselves instead of relying on the ordering.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe that would have avoided the problem in the first place.

@cachedout cachedout added the pending-discussion The issue or pull request needs more discussion before it can be closed or merged label Nov 18, 2016
@cachedout
cachedout merged commit f7c7109 into saltstack:2016.3 Nov 24, 2016
@twangboy
twangboy deleted the fix_chocolatey_state branch December 12, 2017 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-discussion The issue or pull request needs more discussion before it can be closed or merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants