-
Couldn't load subscription status.
- Fork 1.8k
[release-v1.3.x] fix: allow finalizer updates on completed TaskRun and PipelineRuns #9025
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
[release-v1.3.x] fix: allow finalizer updates on completed TaskRun and PipelineRuns #9025
Conversation
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.
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>
|
The following is the coverage report on the affected files.
|
added strings package import to v1/pipelinerun_validation_test.go and v1beta1/pipelinerun_validation_test.go replaced all t.Context() calls with context.Background() in test files (this method doesn't exist in the testing package) removed TestPipelineRunTaskRunSpecTimeout_Validate from both v1 and v1beta1 test files as it referenced a non-existent Timeout field in PipelineTaskRunSpec
74f5af7 to
94a2010
Compare
|
The following is the coverage report on the affected files.
|
|
/retest |
1 similar comment
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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 |
1 similar comment
|
/retest |
9ba3a79
into
tektoncd:release-v1.3.x
Changes
Manual cherry pick of #9011
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