Skip to content
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

[Resolves #937] Reset Jinja2 variable cache between config files #938

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NathanWilliams
Copy link

Fix for: #937

This resets the Jinja2 templating_vars in config/reader.py to prevent variables leaking across StackGroups.

PR Checklist

  • Wrote a good commit message & description [see guide below].
  • Commit message starts with [Resolve #issue-number].
  • Added/Updated unit tests.
  • Added/Updated integration tests (if applicable).
  • All unit tests (make test) are passing.
  • Used the same coding conventions as the rest of the project.
  • The new code passes flake8 (make lint) checks.
  • The PR relates to only one subject with a clear title.
    and description in grammatically correct, complete sentences.

Approver/Reviewer Checklist

  • Before merge squash related commits.

Other Information

Guide to writing a good commit

While reading config files, Sceptre caches the variables used by Jinja.
If a template is missing a variable, one from a different StackGroup
is used instead.
Copy link
Contributor

@ngfgrant ngfgrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @NathanWilliams this has been a really subtle one that is catching folk out.

I think this resolves #813 and #889

I wonder if we could structure a test with this so that we can be sure it fixes the issue?

@NathanWilliams
Copy link
Author

@ngfgrant Sure. I have been on a break, so I'll try and fit it in in the next day or so

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.

None yet

3 participants