Closed anderbubble closed 3 years ago
@anderbubble ping?
I'm here; just busy. I expect I can perform the additional changes you suggested; it just might take me a bit to get to it.
edit: I've put it on my agenda for Friday.
@anderbubble wonderful! I'll wait for your changes to merge this.
1. Add a similar fix in the [snippets.sls](https://github.com/saltstack-formulas/nginx-formula/blob/master/nginx/snippets.sls#L11-L12) file 3. Amend the commit message to something like `fix(config): ignore missing servers or snippets` so our automated versioning does not complain (check [here](https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst#relationship-between-commit-type-and-version-bump) for more details)
Updated this PR to complete the above steps requested by @javierbertoli. Includes resolving this review comment:
Thanks you @anderbubble & @myii for this!
:tada: This PR is included in version 2.7.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
nginx.servers_config wants a lightened copy of the nginx map to render as json; but, when it was trying to remove the servers and snippets keys from the map it assumed their presence, causing a KeyError if they were not present by its use of .pop().
While wrapping these in an "if" clause would likely be more correct, along with replacing .pop() with del (if jinja even supports that) the simplest change here is to just specify a default value for .pop(), which obviates the KeyError.
Fixes #274
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context