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

Don't mark done PipelineRuns as timed out #6622

Conversation

SaschaSchwarze0
Copy link
Contributor

Changes

This PR fixes a bug that causes all completed PipelineRuns to eventually go into PipelineRunTimeout status. This was imo introduced by Fix for PipelineRuns getting stuck in the running state in the cluster #6095 in v0.47.0 @RafaeLeal @lbernick @jerop

To reproduce the issue, perform these three steps:

(1) Create a simple Pipeline

apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: noop
spec:
  tasks:
    - name: noop
      taskSpec:
        steps:
          - name: noop
            image: busybox
            command:
              - sleep
            args:
              - "1"
      timeout: 1m

(2) Create a simple PipelineRun

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  generateName: noop-
spec:
  pipelineRef:
    name: noop
  timeouts:
    pipeline: 1m

(3) The PipelineRun will complete successfully within a few seconds. Now wait three minutes.

(4) Restart the tekton-pipelines-controller. This will cause all PipelineRuns in the system to get reconciled.

And now the PipelineRun is moved into PipelineRunTimeout status.

Submitter Checklist

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

  • 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.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

/kind bug

Release Notes

Completed PipelineRuns are not anymore changed to PipelineRunTimeout status

@tekton-robot tekton-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 4, 2023
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 4, 2023
@tekton-robot
Copy link
Collaborator

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 /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.

@wlynch
Copy link
Member

wlynch commented May 4, 2023

/uncc @wlynch
/cc @lbernick @jerop

@tekton-robot tekton-robot requested review from jerop and lbernick and removed request for wlynch May 4, 2023 21:17
Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

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

Thank you @SaschaSchwarze0! We'll have to backport this.
/ok-to-test
/cherrypick release-v0.47.x

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 5, 2023
@jerop
Copy link
Member

jerop commented May 5, 2023

/need-cherry-pick

@jerop jerop added the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label May 5, 2023
@jerop jerop added this to the Pipelines v0.47 milestone May 5, 2023
Modify PipelineRun reconciler to skip performing the check whether a PipelineRun should be marked as timed out when the PipelineRun has a Succeeded condition that is not Unknown

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@SaschaSchwarze0 SaschaSchwarze0 force-pushed the sascha-fix-pipelinerun-to-stay-succeeded branch from da71b68 to d3b411b Compare May 5, 2023 15:02
@SaschaSchwarze0 SaschaSchwarze0 requested a review from jerop May 5, 2023 15:02
Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 5, 2023
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop, lbernick

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

@jerop
Copy link
Member

jerop commented May 5, 2023

/retest

@jerop
Copy link
Member

jerop commented May 5, 2023

/test pull-tekton-pipeline-go-coverage

@tekton-robot tekton-robot merged commit f525f72 into tektoncd:main May 5, 2023
@lbernick
Copy link
Member

lbernick commented May 8, 2023

/cherry-pick release-v0.47.x

@tekton-robot
Copy link
Collaborator

@lbernick: new pull request created: #6634

In response to this:

/cherry-pick release-v0.47.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. needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch 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.

None yet

5 participants