Skip to content

Conversation

@saschagrunert
Copy link
Member

When a GitHub Action is re-triggered, GitHub temporarily removes the old check status before the new run starts. This causes a race where Tide may merge the PR during the brief window when the check is missing.

This fix tracks previously seen contexts per PR/commit. When a required context disappears, it's treated as PENDING to prevent premature merging.

Fixes #337

@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for k8s-prow ready!

Name Link
🔨 Latest commit 75d9fb6
🔍 Latest deploy log https://app.netlify.com/projects/k8s-prow/deploys/6931568dda24f300084d3284
😎 Deploy Preview https://deploy-preview-563--k8s-prow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saschagrunert
Once this PR has been reviewed and has the lgtm label, please assign cjwagner for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot requested a review from cjwagner December 4, 2025 09:21
@k8s-ci-robot k8s-ci-robot added the area/tide Issues or PRs related to prow's tide component label Dec 4, 2025
@k8s-ci-robot k8s-ci-robot requested a review from jmguzik December 4, 2025 09:21
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 4, 2025
@saschagrunert saschagrunert changed the title Fix race condition when re-triggering GitHub Actions WIP: Fix race condition when re-triggering GitHub Actions Dec 4, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 4, 2025
@saschagrunert saschagrunert force-pushed the fix-tide-retest-race-337 branch from d901412 to 09ac330 Compare December 4, 2025 09:24
@saschagrunert saschagrunert force-pushed the fix-tide-retest-race-337 branch from 09ac330 to 9c0286a Compare December 4, 2025 09:28
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Dec 4, 2025
@saschagrunert saschagrunert force-pushed the fix-tide-retest-race-337 branch from 9c0286a to 5552e4b Compare December 4, 2025 09:34
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Dec 4, 2025
When a GitHub Action is re-triggered, GitHub temporarily removes the old
check status before the new run starts. This causes a race where Tide may
merge the PR during the brief window when the check is missing.

This fix tracks previously seen contexts per PR (not per commit, so it
works across force pushes). When a required context disappears, it's
treated as PENDING to prevent premature merging.

The context history is automatically pruned each sync to prevent memory
leaks, and duplicates are avoided when a context is both missing and
disappeared.

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert saschagrunert force-pushed the fix-tide-retest-race-337 branch from 5552e4b to 75d9fb6 Compare December 4, 2025 09:38
@saschagrunert saschagrunert changed the title WIP: Fix race condition when re-triggering GitHub Actions Fix race condition when re-triggering GitHub Actions Dec 4, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tide Issues or PRs related to prow's tide component cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tide merges PR when retesting GitHub action

2 participants