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

fix(MPTv1): Fix template expansion #2918

Merged
merged 1 commit into from
May 16, 2019

Conversation

marchello2000
Copy link
Contributor

With kork-bom, we have picked up a new version of jinjava (despite the force=true
directive to gradle which doesn't work in bom scenarios where first one wins)
Anyway, old jinjava would handle missing variables by evaluating the expression to false;
new jinjava throws.
When a stage has a {when} condition that uses a variable that was part of the stage config
that variable doesn't get added to the context until we process the stage the second time!
Add those variables to the context on the first time round to make template expansion happy

With kork-bom, we have picked up a new version of jinjava (despite the force=true
directive to gradle which doesn't work in bom scenarios where first one wins)
Anyway, old jinjava would handle missing variables by evaluating the expression to false;
new jinjava throws.
When a stage has a `{when}` condition that uses a variable that was part of the stage config
that variable doesn't get added to the context until we process the stage the second time!
Add those variables to the context on the first time round to make template expansion happy
@marchello2000
Copy link
Contributor Author

going to merge this as it's blocking a few folks, please give feedback and I will address it

@marchello2000 marchello2000 merged commit 99a42c4 into spinnaker:master May 16, 2019
marchello2000 added a commit to marchello2000/orca that referenced this pull request May 16, 2019
@marchello2000 marchello2000 deleted the mark/fix_for_jinjava branch March 11, 2020 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants