-
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
avoid requeuing taskrun in case of permanent error #3068
Conversation
The following is the coverage report on the affected files.
|
/test pull-tekton-pipeline-integration-tests |
ad91dbf
to
de57ce1
Compare
The following is the coverage report on the affected files.
|
de57ce1
to
3181cfa
Compare
The following is the coverage report on the affected files.
|
3181cfa
to
8d5d3f1
Compare
The following is the coverage report on the affected files.
|
/test pull-tekton-pipeline-integration-tests |
/test all |
The following is the coverage report on the affected files.
|
8d5d3f1
to
5759a85
Compare
The following is the coverage report on the affected files.
|
When a taskrun is rejected with permanent error, reconciler should not try to requeue the taskrun. After a permanent error is raised in prepare function call, reconciler enters the tr.IsDone block. In that block, sidecars were being terminated without any check on pod name. Such rejected taskrun has no pod name associated with it since a pod is never created. Reconciler fails to run such Get command and returns a normal error. Next reconciler cycle runs with this normal error instead of permanent error and tries to requeue the taskrun until reconciler exhausts the allowed retries. These changes are introduced to add a check if pod was created for a taskrun before cleaning up the sidecars. Most of the changes in this PR are introduced based on the pipelinerun.go
5759a85
to
12e08b0
Compare
The following is the coverage report on the affected files.
|
Its ready for review, PTAL 🙏 |
[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 |
thank you @pritidesai! /lgtm |
/hold |
Sorry about the hold @pritidesai I just wanted to clarify one bit as I was reviewing this PR. |
_, updateErr := c.updateLabelsAndAnnotations(ctx, tr) | ||
merr = multierror.Append(cloudEventErr, updateErr) |
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.
I was confused by the removal of this one, but I think it may not be needed indeed?
It's not clear to me how this change is related to this PR though
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.
never mind, I was confusing myself
/hold cancel |
Sorry about the confusion 🙏 I was in the middle of reviewing and I though I saw an issue but I was wrong. |
no worries @afrittoli, thanks a bunch for the review @sbwsg @afrittoli @jerop 🙏 |
Changes
When a taskrun is rejected with permanent error, reconciler should not requeue that taskrun.
After a permanent error is raised in prepare function call, reconciler enters the tr.IsDone block. In this block, sidecars were being terminated without any check on pod name. The rejected
taskrun
has no pod name associated with it since pod was never created. Reconciler fails to run this Get command and returns a normal error. Next reconciler cycle runs with this normal error instead of permanent error and tries to requeue thetaskrun
until reconciler exhausts the allowed retries.These changes are introduced to add a check if pod was created for a taskrun before cleaning up the sidecars.
Most of the changes in this PR are implemented based on the
pipelinerun.go
.I have recorded logs for the following
taskrun
on master and with this PR so that its easy to compare.Note that the reconciler exhausts the number of retries for the following
TaskRun
even though its declared failure with permanent error. After introducing these changes, the reconciler exits after seeing the permanent error and does not requeue thatTaskRun
.Closes #3045
/kind bug
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes