Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix masterless jinja imports #54780
@kiemlicz this PR adds a test which covers the proposed fix.
It seems that what you're trying to do is to "push" the fix to the minions through your state tree. That should be filed as a separate issue so we can better track it. It's not related to the change this PR is addressing.
The addition of fileclient caching in the JinjaCacheLoader has broken all jinja imports in state files, in masterless salt-call runs. This is because masterless Pillar compilation uses the `PillarClient` while regular file caching (states, etc.) use the `LocalClient`. Since Pillar is compiled first in the masterless run, the class-level attribute where the cached fileclient is stored only ever usese the PillarClient, and thus any Jinja imports will cache the templates to the wrong location (under `pillar_roots`). This expands the cached fileclient support to distinguish between pillar and non-pillar, and keep a separate cached fileclient for each.
@s0undt3ch thanks for reply, now I'm truly disappointed
I know I can override the execution modules, state modules etc. using e.g.
Overriding the local installed file: