Repository navigation
feat(operations.files): add deploy-wide Jinja customization - #2104
Open
noirbizarre wants to merge 1 commit into
Open
noirbizarre wants to merge 1 commit into
noirbizarre wants to merge 1 commit into
Conversation
noirbizarre
force-pushed
the
feat/jinja-config
branch
from
November 21, 2026 10:55
58d02bd to
59b0ffc
Compare
5 of 6 tasks
wowi42
requested changes
Nov 30, 2026
wowi42
left a comment
Collaborator
There was a problem hiding this comment.
The feature needs two fixes before merge. Shallow Config.copy() snapshots share the Jinja mappings, so in-place changes can affect earlier operations and other hosts. Please copy each top-level Jinja mapping for the operation snapshot and add an in-place, two-host regression test. The secret-exposure issue is inline.
| create_remote_dir: bool = True, | ||
| jinja_env_kwargs: dict[str, Any] | None = None, | ||
| jinja_filters: dict[str, Callable[..., Any]] | None = None, | ||
| jinja_globals: dict[str, Any] | None = None, |
Collaborator
There was a problem hiding this comment.
Because jinja_globals is a named parameter, operation metadata stringifies the whole mapping and logs it. A value such as a password appears in plain text, unlike template **data. Please exclude these values from displayed args or apply equivalent masking, with a regression test.
This branch has not been deployed
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.
Allow deploys to configure Jinja environment options, filters, globals, and tests once through config:
Templates can then use
{{ application | shout }}and{% if count is positive %}. Registrations are also available to included and imported templates, while Jinja’s built-ins remain available.Override defaults for an individual template using matching arguments:
Each mapping is merged by name, with per-call entries taking precedence. Variables passed directly to
files.templatetake precedence over configured globals.Preserve deploy-local configuration during lazy operation execution and isolate customized templates from the filename-only cache. Includes documentation and regression coverage.