Refresh pillar cache when saltutil.refresh_pillar is run#60975
Refresh pillar cache when saltutil.refresh_pillar is run#60975Ch3LL merged 3 commits intosaltstack:masterfrom
Conversation
terminalmage
left a comment
There was a problem hiding this comment.
Couple docs nitpicks and one question.
changelog/60897.fixed
Outdated
There was a problem hiding this comment.
Should be "affects" here.
doc/topics/pillar/index.rst
Outdated
There was a problem hiding this comment.
s/your/you/
Also, probably don't need to say "to be True", "to True" is probably OK.
salt/minion.py
Outdated
There was a problem hiding this comment.
force_refresh is passed through elsewhere, should it really be hardcoded here rather than passing it through?
There was a problem hiding this comment.
This is a good point, I will make it configurable, so the user can choose not to refresh the pillar cache. I also think I am going to rename force_refresh, since this is a kwarg already used in saltutil.refresh_pillar used for refreshing modules.
22ac03f to
681d2cc
Compare
|
@terminalmage ready for re-review |
waynew
left a comment
There was a problem hiding this comment.
👍 looks good. Checked tests against the current salt/main pillar and they just got stuck, and they pass with the current code.
What does this PR do?
When a user has
pillar_cacheset to True, the cache will not be refreshed when runningsalt \* saltutil.refresh_pillar. This PR adds the ability for the cache to be udpated when this is run. This PR still ensures when running a state or pillar.items for example it will not update the cache. When a user is running saltutil.refresh_pillar this would be intentional and would expect the cache to be updated.What issues does this PR fix or reference?
Fixes: #60897
Previous Behavior
salt \* saltutil.refresh_pillarwould not update the pillar cache.New Behavior
refresh_pillarno updates the pillar cache.Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.