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

Avoid retry on permanent errors in pipelinerun #6297

Conversation

l-qing
Copy link
Contributor

@l-qing l-qing commented Mar 5, 2023

fixes #6298

When creating taskrun and other run resources in pipelinerun,
if a permanent error occurs due to missing workspace configuration,
it will fail immediately instead of continuously retrying until timeout.

Changes

Submitter Checklist

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

  • Has Docs included if any changes are user facing
  • 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)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

When encountering a permanent error during the creation of run resources in pipelinerun, stop retrying and set the failure reason to "CreateRunFailed".

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 5, 2023
@tekton-robot
Copy link
Collaborator

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@tekton-robot tekton-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 5, 2023
@l-qing
Copy link
Contributor Author

l-qing commented Mar 5, 2023

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 5, 2023
@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from 6c0d364 to 1f24ea6 Compare March 5, 2023 09:19
@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/pipelinerun.go 87.4% 87.7% 0.3

@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from 1f24ea6 to c4b8873 Compare March 5, 2023 09:26
@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/pipelinerun.go 87.4% 87.7% 0.3

@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/pipelinerun.go 87.4% 87.7% 0.3

@chengjoey
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 6, 2023
@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/pipelinerun.go 87.4% 87.7% 0.3

@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from c4b8873 to d7fa1d3 Compare March 7, 2023 01:12
@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/pipelinerun.go 87.4% 87.7% 0.3

@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/pipelinerun.go 87.4% 87.7% 0.3

@tekton-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 8, 2023
@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from d7fa1d3 to ca9c22f Compare March 9, 2023 15:44
@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/pipelinerun.go 88.3% 88.6% 0.3

@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/pipelinerun.go 88.3% 88.6% 0.3

@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from ca9c22f to 606be64 Compare March 10, 2023 13:25
@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/pipelinerun.go 88.3% 88.6% 0.3

@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/pipelinerun.go 88.3% 88.6% 0.3

@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from 606be64 to f4618ca Compare March 11, 2023 03:12
@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from 9f0c3c7 to efc7799 Compare March 17, 2023 02:33
@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/pipelinerun.go 88.4% 88.7% 0.3

@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/pipelinerun.go 88.4% 88.7% 0.3

@l-qing
Copy link
Contributor Author

l-qing commented Mar 18, 2023

Hi, @wlynch @dibyom.

Could you help review this PR?
It's been ten days since the last approval, and there hasn't been an /lgtm tag, so I can't merge it.

@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from efc7799 to 4a3ddd6 Compare March 18, 2023 15:00
@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/pipelinerun.go 88.4% 88.7% 0.3

@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/pipelinerun.go 88.4% 88.7% 0.3

@chitrangpatel
Copy link
Member

Thanks for this PR @l-qing!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2023
@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from 4a3ddd6 to a387b0f Compare March 20, 2023 13:59
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2023
@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from a387b0f to 3a360b6 Compare March 20, 2023 14:05
@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/pipelinerun.go 88.4% 88.7% 0.3

@l-qing
Copy link
Contributor Author

l-qing commented Mar 20, 2023

Thanks for this PR @l-qing! /lgtm

Thanks!

Can you add a tag again?
I found that the code was conflicting, so I rebase it to the new main.
I should have used merge instead. 🤦‍♂️

@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/pipelinerun.go 88.4% 88.7% 0.3

@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/pipelinerun.go 88.4% 88.7% 0.3

@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from 3a360b6 to b2f9795 Compare March 21, 2023 06:47
@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/pipelinerun.go 88.4% 88.7% 0.3

@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/pipelinerun.go 88.4% 88.7% 0.3

fixes tektoncd#6298

When creating taskrun and other run resources in pipelinerun,
if a permanent error occurs due to missing workspace configuration,
it will fail immediately instead of continuously retrying until timeout.
@l-qing l-qing force-pushed the fix/avoid-retry-pipelinerun-on-permanent-errors branch from b2f9795 to 6758c03 Compare March 21, 2023 15:17
@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/pipelinerun.go 88.4% 88.7% 0.3

@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/pipelinerun.go 88.4% 88.7% 0.3

@l-qing
Copy link
Contributor Author

l-qing commented Mar 21, 2023

@chitrangpatel Hi, could you help me review again? I have already rebased onto the latest main branch.
Yesterday when you gave the LGTM, my PR had conflicts. After I rebased, the LGTM comment disappeared. 😂

@chitrangpatel
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2023
@l-qing
Copy link
Contributor Author

l-qing commented Mar 21, 2023

/retest

@tekton-robot tekton-robot merged commit 0f12b78 into tektoncd:main Mar 22, 2023
@l-qing l-qing deleted the fix/avoid-retry-pipelinerun-on-permanent-errors branch March 22, 2023 00:46
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Pipelinerun keeps retrying even when encountering a permanent error until it times out.
5 participants