-
Notifications
You must be signed in to change notification settings - Fork 274
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): parse template strings in varfiles #6844
Conversation
705e517
to
f96c3dd
Compare
f96c3dd
to
e35abb4
Compare
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.
Looks good to me!
configRoot: projectConfig.path, | ||
path: environmentConfig.varfile, | ||
defaultPath: defaultEnvVarfilePath(environment), | ||
}) | ||
const envVarfileVars = parseTemplateCollection({ | ||
value: rawEnvVarfileVars, | ||
source: { path: ["varfile"], yamlDoc: projectConfig.internal.yamlDoc }, |
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.
@thsig @vvagaytsev the source path and yamlDoc are incorrect; This will lead to confusing error messages when varfiles contain invalid template strings.
The minimum correct value here is source: { path: [] }
if it's not yaml; to get correct source mapping for yaml varfiles we need to call parseTemplateCollection
in loadVarfile
, so we can pass the yaml document.
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.
Good catch! Thanks for fixing this in the follow-up PR.
What this PR does / why we need it:
A follow-up fix for #6745
Which issue(s) this PR fixes:
Fixes #6843
Special notes for your reviewer: