-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix #38558 - pillar.get with default= ...,merge=true influence subsequent calls of pillar.get #38579
Conversation
@terminalmage I believe you've been involved in this area recently? |
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.
This looks good. I can see another unrelated issue, but I'll open a separate PR to take care of it.
@rallytime This needs a backport to 2016.3. |
#38601 fixes the unrelated issue I mentioned above, where using |
I added some more commits containing unit tests for this bug in https://github.com/multani/salt.git , branch That would be cool if the could be merged as part of this PR as well. |
@terminalmage Oh yes, right, I didn't thought about that! It's done now! |
Improvements over saltstack#38579
@multani Thx for writing the tests. You are right about the position of the deepcopy. |
Very nice! When the tests finish, I will get this in. |
When will you update packages in your apt repository ? What does it trigger the update for the os packages ? I tried to compare the default_settings and formula_settings, and the default_settings got identical values to the formula_settings. {% set formula_settings = salt['pillar.get']( I tried your master branch, and it fixes the problem. Thanks. FL |
What does this PR do?
Fixes the unexpected behavior when calling
pillar.get
withmerge=true
described in #38558 by creating a copy of givendefault
before callingsalt.utils.dictupdate.update(default, ..)
What issues does this PR fix or reference?
#38558
Previous Behavior
If a pillar.get with a default and merge=true was called, subsequent calls of pillar.get will be return wrong results (depending on the previous merge)
Tests written?
No