-
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
Skip sidecar deletion logic for canceled or timed-out TaskRun #3877
Skip sidecar deletion logic for canceled or timed-out TaskRun #3877
Conversation
Hi @SaschaSchwarze0. 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. |
/ok-to-test |
The following is the coverage report on the affected files.
|
Interesting! Thanks for this. I guess this must be racing because the sidecar stopping code does check if the Pod is NotFound before continuing. /approve Edit: oh wait, it doesn't guard the stop on NotFound, it returns a permanent error. Either way I can see that this process could still race. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbwsg 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 |
Does the sidecar exist at this point? If we extend the logic to not attempt to delete, how will the sidecar be deleted before ending the run? |
Sidecars are containers that run in the same pod. The pod is deleted, so is the sidecar. |
Yup, my bad, for some reason I interpreted side car running as a separate Pod 🙃 , thanks for the clarification @SaschaSchwarze0 👍 so in case of cancellation and timeout, we do delete the pod so adding these checks here are reasonable and help avoid unwanted error message. /lgtm |
You'll need to rebase on top of
|
Also applies for timed-out TaskRun. In both cases the pod has already been deleted previously.
958c120
to
4bb4b72
Compare
Done @sbwsg |
The following is the coverage report on the affected files.
|
Awesome, thank you! Re-adding Priti's lgtm as there haven't been any other code changes: /lgtm |
Changes
While a TaskRun timed out, I noticed some errors in Tekton's controller log:
They complain a non-existing pod which is reasonable as a timed out TaskRun deletes the pod. The code is inside the
stopSidecars
function that imo should not try to stop a sidecar from a pod that was deleted. I am therefore extending the logic inside that function to not do something if the TaskRun is canceled or timed out./kind bug
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes