-
Notifications
You must be signed in to change notification settings - Fork 249
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 incomplete TaskRuns being deleted when --ignore-running=true #1708
Fix incomplete TaskRuns being deleted when --ignore-running=true #1708
Conversation
Hi @colinodell. 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. |
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.
/ok-to-test
/cc @pradeepitm12 @piyush-garg
735d3bd
to
eeac1f4
Compare
@colinodell PR looks good, can you please squash the commits into 1 /lgtm |
eeac1f4
to
ce7c499
Compare
ce7c499
to
6c2ae7a
Compare
Thanks! I've squashed the commits as requested :) |
/lgtm |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pradeepitm12 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 |
fix taskrun getting deleted of running pipelinerun tektoncd#1736 Fix incomplete TaskRuns being deleted when --ignore-running=true tektoncd#1708 Signed-off-by: Pradeep Kumar <pradkuma@redhat.com>
Changes
Fixes #1707 by replacing the logic used to determine if a TaskRun is "running".
Prior to this PR, we used an allowlist of reasons like
Running
,Pending
, andStarted
. This did not account for some states where the TaskRun is still running, like when cancellation has been requested (but not completed), or when the TaskRun encounters a non-permanent error and is still running (likeExceededResourceQuota
).This PR fixes this by instead checking for the presence of a
completionTime
which would indicate that the TaskRun is no longer in a running or about-to-run state.Additionally, to help confirm these changes work as expected in the test suite, output messages that previously said something like
All TaskRuns were deleted
were updated to include the actual number of TaskRuns deleted.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes