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

Enhance defaults.merge function. #44850

Merged
merged 7 commits into from Dec 9, 2017

Conversation

Projects
None yet
3 participants
@AAbouZaid
Copy link
Contributor

commented Dec 6, 2017

What does this PR do?

In defaults.merge function:

  • Add merge_lists option.
  • Add in_place option.
  • Write unit tests.

Previous Behavior

Lists were not merged, and no unit test for merge function.

New Behavior

  • Allow to merge lists.
  • Allow to keep original dicts untouched and create new dict.
  • Unit test.

Tests written?

Yes

Commits signed with GPG?

Not yet

@rallytime

This comment has been minimized.

@AAbouZaid

This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2017

@rallytime Akh, a typo 🤕
Fixed :-)

@AAbouZaid

This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2017

I also added an arg to don't copy in place, so it keeps the orig dicts untouched.
The original behavior still the same (in_place=True by default).

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Dec 8, 2017

@AAbouZaid Looks like there are still a couple more lint errors. Would you mind taking care of those?

AAbouZaid and others added some commits Dec 8, 2017

@AAbouZaid

This comment has been minimized.

Copy link
Contributor Author

commented Dec 9, 2017

@garethgreenaway Fixed :-)

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Dec 9, 2017

@AAbouZaid Awesome! Thanks! Just waiting for automated tests to finish then we should be good to go.

@garethgreenaway garethgreenaway merged commit 374d1ef into saltstack:develop Dec 9, 2017

6 of 9 checks passed

jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #14182 — ABORTED
Details
default Build finished.
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #4488 — FAILURE
Details
WIP ready for review
Details
codeclimate All good!
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #20066 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #12604 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #17445 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #17185 — SUCCESS
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.