-
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(pipelinerun): resolve issue where canceling active pipelinerun fails #8173
fix(pipelinerun): resolve issue where canceling active pipelinerun fails #8173
Conversation
Hi @l-qing. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
The following is the coverage report on the affected files.
|
a5d5378
to
2c95d1f
Compare
The following is the coverage report on the affected files.
|
/ok-to-test |
The following is the coverage report on the affected files.
|
/retest-required |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/auto-cc |
[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 |
Thanks for the quick fix @l-qing! Can someone help get this merged? Thanks! |
fix tektoncd#8172 When canceling a PipelineRun, validation errors returned when canceling a completed TaskRun should be ignored.
4769159
to
de36eab
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/lgtm |
/lgtm |
fix #8172
When canceling a PipelineRun, validation errors returned when canceling a completed TaskRun should be ignored.
The fix needs to be synchronized to
v0.62.x
.Solution
I have considered these solutions, but ultimately chose the current approach.
1. Avoid modifying the
spec.status
of completed TaskRuns in the defaults of TaskRun.This does not make sense; business logic should not be handled in setdefaults.
2. Change the validation of TaskRun to also allow the
spec.status
of completed TaskRuns to be modified.This also does not comply with the agreement. The
*Run
resource has been completed, and modifying the spec is indeed not advisable.3. When canceling taskRun in PipelineRun, only cancel unfinished taskRuns.
This approach does not completely solve the problem because it is possible that TaskRun was incomplete when it was retrieved but had already completed by the time it was modified.
4. Ignore a certain type of error when canceling TaskRun.
Similar to ignoring not found errors with the current approach, this is quite reasonable.
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