-
Notifications
You must be signed in to change notification settings - Fork 273
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(template): unescape escape templates when not doing partial resolution #5680
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.
LGTM
When I was trying to resolve this I had a few more test cases. Maybe it makes sense to check if those pass too?
|
@TimBeyer, yeah good catch. Also, the framework tests appear to be failing. |
const res = resolveTemplateString({ | ||
string: "$${bar}", | ||
context: new TestContext({}), | ||
contextOpts: { allowPartial: true }, |
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.
It's not really obvious to me how this fixes the end user issue – can we also add an integration test that shows how this fixes the issue in a less synthetic scenario?
All fair points, flagging as WIP for now. Btw the microk8s test failures seem unrelated. Not sure if we've been seeing those as flaky? |
@TimBeyer this isn't the current behavior, so it would be a breaking change:
|
6e38ef1
to
51d2c1b
Compare
Excluded one test case that assumed breaking chnahes in the behaviour. Co-authored-by: Tim Beyer <[email protected]>
51d2c1b
to
1eff9b0
Compare
For symmetric testing of mac/linux and win env var reference format.
Deduplicate code with parameterized tests.
FIXME: Windows-style env vars references still don't work.
Here we need to distinguish `undefined` and `false`.
…configs (#6408) * fix(template): skip un-escaping while module vars resolution Patches commit 8df3a4f from #5680. Module variables are resolved in a standalone function `resolveVariables`. That function should also skip un-escaping. * fix(template): fix function definition Use its own argument instead of a closure. * refactor(template): pull function `shouldUnescape` up * fix(template): fix too greedy pattern for escaped string
Fixes: #3989