-
Notifications
You must be signed in to change notification settings - Fork 15
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
Duplicate list entries after default merge-last #54
Comments
This is expected behavior: items are appended to lists when merged. |
mmm ok, thanks. Now that you mention the other lists i mentioned are separate Pillars, not managed by PillarStack. So we need to pick one with |
No, there is no other way for the moment. |
I saw that one, but globally we cannot use overwrite and do need merge-last. Looking at the code it would be a minor change to support specifying strategy on either side. Would you accept a PR for that? It may break environments where strategy is wrongly specified on the stack side and is currently just ignored. Other than that i don't see any downsides. |
I'm not sure I understand what you mean when you say: " support specifying strategy on either side". |
Basically instead of the following:
Also allow:
However, it would also need to support specifying strategy in either As i don't think there will be that many use-cases for this feature, i'll use a modified version for now, which currently only takes a strategy defined in the stack (but is applied to the data merged in) |
thanks so far. |
output of
salt --versions
:Using the default merge-last, on some nested lists we get duplicate entries in final merged Pillar like:
Where "stack" is yaml:
and JSON merged on top:
This only seems to happen on deeply nested lists, lists entries higher up the chain do not seem to result in duplicates.
The text was updated successfully, but these errors were encountered: