-
Couldn't load subscription status.
- Fork 1.8k
fix: allow finalizer updates on completed TaskRun and PipelineRuns #9011
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: allow finalizer updates on completed TaskRun and PipelineRuns #9011
Conversation
|
The following is the coverage report on the affected files.
|
c9fa199 to
c1731a2
Compare
|
The following is the coverage report on the affected files.
|
|
/retest |
1 similar comment
|
/retest |
|
Your implementation is very clever, avoiding unnecessary copying. 👍 I've encountered a similar problem recently, so I can close my PR #9004 and wait for yours to be merged. 😆 |
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.
Isn't there a similar webhook validation on taskrun?
|
/retest |
56787b8 to
e48696a
Compare
fixes issue tektoncd#8824 where webhook denied finalizer updates on completed PipelineRuns. The validation webhook was blocking all updates when PipelineRun.IsDone() returned true, preventing from clearing finalizers to make sure that we don't have old obj default drift we are adding a fast path check for spec equality and are normalizing the old spec with current defaults before comparison. Then we allow updates when only finalizers differ and reject spec changes Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
Similar to issue tektoncd#8824 for PipelineRuns, the webhook was denying finalizer updates on completed TaskRuns. The validation webhook was blocking all updates when TaskRun.IsDone() returned true, preventing tools like Tekton Chains from clearing finalizers. To ensure we don't have old obj default drift, we are adding a fast path check for spec equality and are normalizing the old spec with current defaults before comparison. Then we allow updates when only finalizers differ and reject spec changes. This mirrors the fix applied to PipelineRun validation.
e48696a to
ce87dde
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.
|
|
/retest |
|
[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 |
|
/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.
/lgtm
|
@khrm: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/lgtm |
|
/cherry-pick release-v1.0.x |
|
/cherry-pick release-v1.3.x |
|
cherry pick automation hasn't been working, manually cherry picking them |
Changes
fixes #8824
the validation webhook was blocking all updates when PipelineRun.IsDone() returned true, preventing from clearing finalizers
to make sure that we don't have old obj default drift we are adding a fast path check for spec equality and are normalizing the old spec with current defaults before comparison. Then we allow updates when only finalizers differ and reject spec changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes
/kind bug