New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templating: make sure only one variable results are cached #67429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solve my issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixfontein , :) what about covering the issue case by adding tests somewhere. Probably to test/integration/targets/templating_lookups/template_lookups/
would be ok
Thanks, @felixfontein! |
@Andersson007 @s-hertel thanks a lot for reviewing and merging! |
and I forgot @resmo, thanks for reviewing as well! |
* Make sure only one variable results are cached. * Add changelog. * Add test. (cherry picked from commit c520d70)
SUMMARY
Currently, it looks like all jinja2 templating results are cached, even though a comment says
# we only cache in the case where we have a single variable name, to make sure we're not putting things which may otherwise be dynamic in the cache (filters, lookups, etc.)
. This causes dynamic lookup results to be cached, which can be seen in #34144 and @resmo's example from IRC.Fixes #34144
ISSUE TYPE
COMPONENT NAME
lib/ansible/template/init.py