Skip to content

Ensure errors are returned for missing pillars - #57208

Merged
dwoz merged 1 commit into
saltstack:masterfrom
lnattrass:master
May 12, 2020
Merged

dwoz merged 1 commit into
saltstack:masterfrom
lnattrass:master

Conversation

@lnattrass

@lnattrass lnattrass commented May 11, 2020

Copy link
Copy Markdown
Contributor

What does this PR do?

Ensures that errors are returned when including from a pillar like this:

include:
- pillar_name

What issues does this PR fix or reference?

Fixes: This PR

Previous Behavior

Salt 2018.3.5 returns errors when a pillar is not found.
Newer versions currently do not.

New Behavior

Salt returns errors when pillars fail to render

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@lnattrass
lnattrass requested a review from a team as a code owner May 11, 2020 18:03
@ghost
ghost requested review from garethgreenaway and removed request for a team May 11, 2020 18:03
@garethgreenaway

Copy link
Copy Markdown
Contributor

@lnattrass Thanks for the PR! Looks like there are some small lint issues with the new tests you added, extra white space at the end of the lines.

@lnattrass

Copy link
Copy Markdown
Contributor Author

There sure are!
I'll sort it out.

@lnattrass

lnattrass commented May 11, 2020

Copy link
Copy Markdown
Contributor Author

Ok, I've resolved the lint issues (pending what the tests say..)
Sorry for the hassle!
edit :And they failed.

This will cause render_pstate to return an error when the pillar is not found.
Currently, missing pillars are silently continued, which may lead to unexpected pillar states (and makes testing the existence of pillars difficult.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ZRelease-Sodium retired label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants