Fixed sanitize_config_jinja to use an explicit opt-in boolean - #914
Merged
Merged
Conversation
joewesch
requested review from
itdependsnetworks and
jeffkala
as code owners
September 22, 2026 20:39
jeffkala
reviewed
Sep 22, 2026
jeffkala
reviewed
Sep 22, 2026
jeffkala
self-requested a review
September 23, 2026 13:35
jeffkala
approved these changes
Sep 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up to fix a breaking change bug introduced in #846 and nautobot/nornir-nautobot#298. I inadvertently triggered the the
sanitize_config_jinjafunction when users in Golden Config were replacing their config with post-processing jinja templates.The solution, to be both backwards compatible and add the feature so they can co-exist, is to change the "jinja awareness" to be explicitly opt-in instead of automatic. This PR adds a new key/value pair that is expected to be a part of the filters list rather than solely relying on the presence of
{{. This makes it so they can opt-in to the feature while still using{% raw %}...{% endraw %}tags to surround any post-processing they want to use together with other jinja filters.Once this is merged, I will make a similar change in
nornir-nautobotto remove the automatic inclusion as well. Luckily, this has not been fully adopted or forced out to Golden Config users yet and they only get this breaking change if they had updated thenornir-nautobotdependency to v4.4.0+.