Skip to content

fix: Populate step statuses before TaskRun timeout handling#9184

Merged
tekton-robot merged 1 commit intotektoncd:mainfrom
vdemeester:731-taskruntimeout-flake
Nov 28, 2025
Merged

fix: Populate step statuses before TaskRun timeout handling#9184
tekton-robot merged 1 commit intotektoncd:mainfrom
vdemeester:731-taskruntimeout-flake

Conversation

@vdemeester
Copy link
Member

Changes

This prevent some race condition where timeout fires before pod status
fetch. TestTaskRunTimeout validates that steps are terminated, but it
can be not populated from time to time (in my test 4/5 times out of 25).

Fixes #731
This should reduce a lot flakes on timeout tests.

I am not sure if we need a release note or not. It does fix a bug though.

Signed-off-by: Vincent Demeester [email protected]

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
  • pre-commit Passed
  • 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

Release Notes

Fix a race condition on timeout that would result in a TaskRun status without steps statuses.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 27, 2025
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 27, 2025
@vdemeester
Copy link
Member Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 27, 2025
@vdemeester vdemeester added kind/flake Categorizes issue or PR as related to a flakey test and removed kind/bug Categorizes issue or PR as related to a bug. labels Nov 27, 2025
@vdemeester
Copy link
Member Author

cc @tektoncd/core-maintainers

@vdemeester vdemeester added the kind/bug Categorizes issue or PR as related to a bug. label Nov 27, 2025
@vdemeester
Copy link
Member Author

I wonder if there is other issues related to this in the issue tracker 🤔

@vdemeester vdemeester removed the kind/flake Categorizes issue or PR as related to a flakey test label Nov 27, 2025
@vdemeester vdemeester force-pushed the 731-taskruntimeout-flake branch from 3e92ec5 to 1d9debf Compare November 27, 2025 19:12
This prevent some race condition where timeout fires before pod status
fetch. TestTaskRunTimeout validates that steps are terminated, but it
can be not populated from time to time (in my test 4/5 times out of 25).

Signed-off-by: Vincent Demeester <[email protected]>
@vdemeester vdemeester force-pushed the 731-taskruntimeout-flake branch from 1d9debf to 9732652 Compare November 27, 2025 21:11
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 27, 2025
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.

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 27, 2025
@twoGiants
Copy link
Member

Examples are failing.

/retest

Copy link
Member

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Nice! Good fix 😸

/approve
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2025
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli, twoGiants

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 merged commit a2c9b37 into tektoncd:main Nov 28, 2025
76 of 82 checks passed
@vdemeester vdemeester deleted the 731-taskruntimeout-flake branch November 28, 2025 10:58
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TestTaskRunTimeout is flakey : fix timeouts

4 participants