-
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
Update PipelineSpec and TaskSpec fields of PipelineRun and TaskRun Status fields #4891
Update PipelineSpec and TaskSpec fields of PipelineRun and TaskRun Status fields #4891
Conversation
/assign @jerop |
The following is the coverage report on the affected files.
|
1d7d0bb
to
a7e69c8
Compare
The following is the coverage report on the affected files.
|
/retest |
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.
@chitrangpatel please add tests 🙏🏾
Hi @jerop, its hard to (or at least I dont know how yet) produce a unit test because a task run needs to be created from the pipeline run. Do you think an example file will suffice here? |
a7e69c8
to
1f44624
Compare
…atus fields `PipelineSpec` was only stored in the `PipelineRun` `Status` field [once](https://github.com/tektoncd/pipeline/blob/6f633b2a41455c6d7cad12d51243b2d1a8716544/pkg/reconciler/pipelinerun/pipelinerun.go#L358), before any substitutions. The same thing was happening with the `TaskSpec` field of the `TaskRun's` `Status` (See [here](https://github.com/tektoncd/pipeline/blob/6f633b2a41455c6d7cad12d51243b2d1a8716544/pkg/reconciler/taskrun/taskrun.go#L310)). As a result, after execution of the `pipelinerun` or `taskrun`, the `(task/pipeline)specs` of the `status` fields were not updated leading to confusion. This commit also updates the `TaskSpec and PipelineSpec` of `Status` fields of `TaskRun` and `PipelineRun`, respectively, after application of the substitutions. As a result, the replacements are now visible in the run status.
1f44624
to
35e03c0
Compare
@jerop I managed to write an |
The following is the coverage report on the affected files.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
/lgtm |
PipelineSpec
was only stored in thePipelineRun
Status
field once, before any substitutions. The same thing was happening with theTaskSpec
field of theTaskRun's
Status
(see here). As a result, after execution of thepipelinerun
ortaskrun
, the(task/pipeline)specs
of thestatus
fields were not updated leading to confusion.This commit also updates the
TaskSpec and PipelineSpec
ofStatus
fields ofTaskRun
andPipelineRun
, respectively, after application of the substitutions. As a result, the replacements are now visible in the run status. This PR addresses issue #4849.Changes
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