Skip to content

Fixed sanitize_config_jinja to use an explicit opt-in boolean - #914

Merged
joewesch merged 3 commits into
developfrom
u/joewesch-fix-sanitize-jinja
Sep 23, 2026
Merged

joewesch merged 3 commits into
developfrom
u/joewesch-fix-sanitize-jinja

Conversation

@joewesch

Copy link
Copy Markdown
Collaborator

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_jinja function 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-nautobot to 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 the nornir-nautobot dependency to v4.4.0+.

Comment thread netutils/config/clean.py Outdated
Comment thread netutils/config/clean.py Outdated
@jeffkala
jeffkala self-requested a review September 23, 2026 13:35
@joewesch
joewesch merged commit 0c0118a into develop Sep 23, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants