-
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 PipelineRunStatus Reconciler for EmbeddedStatus Switch #5989
Conversation
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
I also thought https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/pipelinerun.go#L207-L214 shall be wrapped in a condition check of Full or Both embeddedStatus according to the comments at https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/pipelinerun.go#L826 But that doesn't seem to be the fix,
Would you mind helping to take a look @abayer ? |
7508976
to
725fc05
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Aaaah, right - so with Lemme try your PR out locally and see if I can figure out what's wrong. |
Ah-ha! It's test fixtures with |
725fc05
to
b0c227f
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/approve |
b0c227f
to
67edbf5
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
39d4a9f
to
1446811
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
@JeromeJu can you please add code comments that explain the reasons for the change and link to the TODO? That way, people don't have to context switch to the pull request when they're looking at the code in order to find the reason for the change (although we still want to keep this info in the pull request description) |
1446811
to
3e8cb22
Compare
Thanks Lee! That way makes more sense, updated. |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abayer, chitrangpatel, lbernick 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 |
… Switch This commit fixes the updates for reconciling PipelineRunStatus when switching the EmbeddedStatus feature flag. It resets the status.runs and status.taskruns to nil with minimal EmbeddedStatus and status.childReferences to nil with full EmbeddedStatus. Prior to this change, the childReferences runs and taskruns in pipelineRunStatus would not have been reset to nil and could have led to validation error when the feature flag is being switched. The following issue could help prevent such bugs in the future: Integration tests for changing feature flags tektoncd#5999
3e8cb22
to
2bb4f14
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/lgtm |
@JeromeJu can you please update the release notes with details of the bug fix? |
Updated. Thanks for reminding:) |
Changes
This commit fixes the updates for reconciling PipelineRunStatus when switching
the EmbeddedStatus feature flag. It resets the
status.runs
andstatus.taskruns
to
nil
withminimal
EmbeddedStatus andstatus.childReferences
tonil
withfull
EmbeddedStatus.Prior to this change, the
childReferences
runs
andtaskruns
in pipelineRunStatuswould not have been reset to nil and could have led to validation error when the feature
flag is being switched. The following issue could help prevent such bugs in the future:
/kind bug
fixes: - #5991
part of: #4954 #5833
Thanks to @abayer @XinruZhang @lbernick
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes