-
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 cached pillar errors on state.apply
#61189
Fix cached pillar errors on state.apply
#61189
Conversation
Failing test: salt/tests/pytests/unit/modules/state/test_state.py Lines 1262 to 1267 in 584415d
The test, and I think the docstring and tests are outdated, but I'm not sure. |
e28b94e
to
ec8d467
Compare
I've now changed the doc string and updated the unit tests. Please let me know if this was the correct thing to do, or if external/internal is the correct differentiation. In the |
9ae9f39
to
2f24bec
Compare
2f24bec
to
9784815
Compare
Hey @saltstack/core-pr-reviewers, all checks are green now. It would be great if one of you could review this pull request 😃 when you have time. |
9784815
to
e624cf6
Compare
e624cf6
to
a5cbd79
Compare
re-run all |
The failure on photon looks to be related to these changes. |
state.apply request new pillar data from the server. This done to always have the most up-to-date pillar to work with. Previously, checking for pillar errors looked at both the new pillar and the in-memory pillar. The latter might contain pillar rendering errors even if the former does not. For this reason, only the new pillar should be checked, not both.
That's correct, the failing test is the new one I'm adding in this PR. In the test I have a |
9411784
to
9718bd2
Compare
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)Check Known Missing Docstrings...........................................Failed - hook id: invoke - exit code: 1 Thanks again! |
1 similar comment
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)Check Known Missing Docstrings...........................................Failed - hook id: invoke - exit code: 1 Thanks again! |
Is the debian failure a known issue? I'd be surprised if my change caused any runtime performance regression, it reduces the number of For completeness, this is the failing test
|
@agraul Yes, I've seen that fail sporadically before. Going to re-run the failed tests here, as they seem to be unrelated. |
What does this PR do?
On
state.apply
, only look for errors in the fresh pillar data. Errors in the in-memory pillar can be ignored because the in-memory pillar data is not used anyway.What issues does this PR fix or reference?
Fixes: #52354
Fixes: #59339
Fixes: #57180
Previous Behavior
When the in-memory pillar (
__pillar__
) contains_errors
,state.apply
aborts when it looks for errors in the pillar.New Behavior
Errors in the in-memory pillar are only looked for if the fresh pillar is empty.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.