-
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): establish backwards bug-compatibility for kubernetes manifest files #6713
Conversation
…anifest files Template strings in Kubernetes manifest files are partially resolved for legacy reasons. The partial resolve behaviour has been changed to improve sanity in #6685 but for kubernetes manifest files, we need to have a version of the old behaviour. The expected legacy behaviour looks like this: - If template strings reference variables that do not exist there is no error - If a template string contains multiple template expressions, each expression can be partially resolved. - Template expressions are evaluated before parsing yaml, which means that valid yaml with template expressions can be resolved to invalid yaml (e.g. if variable values contain special characters) This legacy behaviour can lead to quite some surprises and UX problems, for example #5266 I would suggest that we remove this functionality in 0.14.
this commit fixes the "cannot find dockerfile" error that plagued us on macos
@@ -253,14 +253,14 @@ export async function makeTempDir({ | |||
}: { git?: boolean; initialCommit?: boolean } = {}): Promise<TempDirectory> { | |||
const tmpDir = await tmp.dir({ unsafeCleanup: true }) | |||
// Fully resolve path so that we don't get path mismatches in tests | |||
const tmpPath = await realpath(tmpDir.path) | |||
tmpDir.path = await realpath(tmpDir.path) |
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 change was needed to make it possible to run the integ tests locally on macos.
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.
Great job! 🚀
I agree that we should remove this functionality in 0.14, or at least deprecate it and log warnings when it's used. There are also problems in versioning |
If we want to deprecate this, we need to deprecate this in 0.13 and remove it in 0.14. That way users can be sure that their configuration will work with 0.14 if they eliminate the deprecation warnings. |
Would be good to have an easy to use alternative, e.g. an |
What this PR does / why we need it:
Template strings in Kubernetes manifest files are partially resolved for legacy reasons. The partial resolve behaviour has been changed to improve sanity in #6685 but for kubernetes manifest files, we need to have a version of the old behaviour.
The expected legacy behaviour looks like this:
This legacy behaviour can lead to quite some surprises and UX problems, for example #5266
I would suggest that we remove this functionality in 0.14 in favor of the
patchResources
featureWhich issue(s) this PR fixes:
Fixes #6711
Special notes for your reviewer: