Skip to content
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

allow pipeline runs whose task/custom runs have been deleted still timeout #7557

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

gabemontero
Copy link
Contributor

@gabemontero gabemontero commented Jan 10, 2024

Fixes #7556

Changes

Back with PR 5134 Tekton started using the cancel function for cleaning up underlying TaskRuns of PipelineRuns that are timing out, though separate timeout functions were used (presumably in case the timeout behavior needed to be tweaked from the cancel behavior later on). Then, in PR 5288, improvements to the baseline cancel function were made to still complete cancel processing of a PipelineRun if the underlying TaskRuns were deleted. However, that same accomodation was not made for the timeout path. This change addresses that, but still keeps the timeout codepaths separate from the 'base' cancel codepaths.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • [n/a ] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • [/ ] Has Tests included if any functionality added or changed
  • [ /] Follows the commit message standard
  • [ /] Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • [/ ] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • [n/a ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

PipelineRuns that timeout will no longer be blocked on reaching a terminal, cancelled state if their underlying TaskRuns or CustomRuns were deleted beforehand.

@vdemeester @afrittoli @abayer PTAL - thanks

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 10, 2024
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/timeout.go 87.9% 89.7% 1.9

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/timeout.go 87.9% 89.7% 1.9

@gabemontero
Copy link
Contributor Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 10, 2024
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/timeout.go 87.9% 89.7% 1.9

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/timeout.go 87.9% 89.7% 1.9

@gabemontero
Copy link
Contributor Author

/assign @vdemeester
/assign @khrm

@tekton-robot
Copy link
Collaborator

@gabemontero: GitHub didn't allow me to assign the following users: khrm.

Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @vdemeester
/assign @khrm

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.

@gabemontero
Copy link
Contributor Author

/assign @abayer
/assign @afrittoli

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2024
Copy link
Contributor

@khrm khrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
Please review and give lgtm here.
@afrittoli

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: khrm, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…meout

Back with PR 5134 Tekton started using the cancel function for cleaning up
underlying TaskRuns of PipelineRuns that are timing out, though separate
timeout functions were used (presumably in case the timeout behavior needed to be
tweaked from the cancel behavior later on).  Then, in PR 5288, improvements to
the baseline cancel function were made to still complete cancel processing of a
PipelineRun if the underlying TaskRuns were deleted.  However, that same accomodation
was not made for the timeout path.  This change addresses that, but still keeps the
timeout codepaths separate from the 'base' cancel codepaths.
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/timeout.go 87.9% 89.7% 1.9

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/timeout.go 87.9% 89.7% 1.9

@gabemontero
Copy link
Contributor Author

rebase completed @khrm @vdemeester @afrittoli and CI clean .... PTAL

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2024
@tekton-robot tekton-robot merged commit 607eb3d into tektoncd:main Jan 29, 2024
11 of 12 checks passed
@gabemontero gabemontero deleted the fix-pr-timeout-tr-del branch January 29, 2024 16:25
@vdemeester
Copy link
Member

/cherry-pick release-v0.56.x

@tekton-robot
Copy link
Collaborator

@vdemeester: #7557 failed to apply on top of branch "release-v0.56.x":

Applying: allow pipeline runs whose task/custom runs have been deleted still timeout
Using index info to reconstruct a base tree...
M	pkg/reconciler/pipelinerun/timeout.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/reconciler/pipelinerun/timeout.go
CONFLICT (content): Merge conflict in pkg/reconciler/pipelinerun/timeout.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 allow pipeline runs whose task/custom runs have been deleted still timeout
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.56.x

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow pipeline runs whose task/custom runs have been deleted still timeout
6 participants