Open brianthelion opened 6 years ago
It appears that non-determinism in the pillar is a classic salt "feature" that may or may not have been removed. My code shows that it's still lurking. In many of these cases, the answer seems to be, "It will be OK when OrderedDict comes." But that's not what we're seeing now, so I turned to the documentation and found mixed messages about if/how the non-determinism can be avoided:
Note! Prior to the 2017.7.0 release, remotes would be evaluated in a non-deterministic order.
Note! Remember: conflicting keys will be overwritten in a non-deterministic manner!
@brianthelion thanks for the effort to document this!
@terminalmage can you take a look at this when you get a chance. It looks like you are working on some of this for Fluorine.
Thanks! Daniel
ZD-2198
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
this is not stale
Thank you for updating this issue. It is no longer marked as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
This is not stale.
Thank you for updating this issue. It is no longer marked as stale.
Bumped into this and pushed a non-complete PR... #59918
The PR assumes cpython>=3.6
and retains non-deterministic behavior for older pythons. I could change it to support order pythons by not assuming defaultdict
is ordered, but the patch would not be as elegant.
We are aware that the insertion-order preservation nature of dict objects has been declared to be an official part of the Python language spec; however, this is not necessarily true in Salt.
FWIW, I have been using the patch from the PR above on a dozen machines for a few weeks now and the problem has not re-emerged for me. The pillar roots are always scanned in the order in which they appear in the config.
@tj90241 I have unlinked the PR your closed PR mostly for GitHub syntax searching on linked issues to PRs. Leaving this open until it can get picked up, again. Thank you!
Description of Issue/Question
Without explicitly setting the
pillarenv
, pillar rendering is non-deterministic undersalt-call --local
.Setup
Steps to Reproduce Issue
Run the script. Example output:
Versions Report