-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 variable interpolation on StepTemplate
#4803
Fix variable interpolation on StepTemplate
#4803
Conversation
31239f0
to
285344d
Compare
/lgtm I was actually playing around with an alternative fix, but this one's better. =) |
285344d
to
665abc1
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/lgtm |
/retest |
4 similar comments
/retest |
/retest |
/retest |
/retest |
/test pull-tekton-pipeline-alpha-integration-tests |
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.
Thanks for this, nice catch!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-tekton-pipeline-unit-tests |
1 similar comment
/test pull-tekton-pipeline-unit-tests |
665abc1
to
9cda7e9
Compare
The following is the coverage report on the affected files.
|
This changes the way we interpolate variables by using `StepTemplate` directly instead of modifying a de-referenced version of it. Dereferencing means that changes happening to it (in `ApplyStepReplacements`) are not reflected to the original object. Before this change, using variable interpolation on `StepTemplate` would only work on part of the fields they were supposed to be. For example, it works on `env` because, it is an array and the de-referenced version of `StepTemplate` would share the same pointer to it, making any changes on the array reflect to the initial object. This is now fixed. Signed-off-by: Vincent Demeester <[email protected]>
9cda7e9
to
179f349
Compare
The following is the coverage report on the affected files.
|
/test tekton-pipeline-unit-tests |
/test pull-tekton-pipeline-alpha-integration-tests |
/lgtm |
Changes
This changes the way we interpolate variables by using
StepTemplate
directly instead of modifying a de-referenced version of it.
Dereferencing means that changes happening to it (in
ApplyStepReplacements
) are not reflected to the original object.Before this change, using variable interpolation on
StepTemplate
would only work on part of the fields they were supposed to be.
For example, it works on
env
because, it is an array and thede-referenced version of
StepTemplate
would share the same pointerto it, making any changes on the array reflect to the initial object.
This is now fixed.
Signed-off-by: Vincent Demeester [email protected]
/kind bug
/cc @imjasonh @abayer @jerop
Fixes #4801
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
(if there are no user facing changes, use release note "NONE")
Release Notes