Skip to content

Fix race condition in documentation team approval check#35946

Merged
hestonhoffman merged 2 commits intomasterfrom
hestonhoffman/fix-approval-check-race-condition
Apr 13, 2026
Merged

Fix race condition in documentation team approval check#35946
hestonhoffman merged 2 commits intomasterfrom
hestonhoffman/fix-approval-check-race-condition

Conversation

@hestonhoffman
Copy link
Copy Markdown
Contributor

What does this PR do? What is the motivation?

Fixes a race condition in the codeowner_review_status.yml workflow where a cancelled upstream job causes the update-pr-status job to incorrectly post a success status.

Root cause: The workflow uses cancel-in-progress: true on its concurrency group. When a new run cancels an in-flight run, the check-documentation-team-approval job is cancelled and produces no outputs. The update-pr-status job runs anyway (due to if: always()) and interprets the empty outputs as "documentation team not requested", posting a success commit status that overwrites the previous valid failure status.

This was observed on #35941, where the approval check passed despite no documentation team member approving.

Fix: Skip the status update entirely when upstream outputs are empty, so cancelled runs don't clobber earlier valid results.

Merge instructions

Merge readiness:

  • Ready for merge

Additional notes

When cancel-in-progress cancels the upstream check job, its outputs are
empty strings. The update-pr-status job (which runs with if: always())
was interpreting empty outputs as "team not requested", incorrectly
posting a success status that overwrote a previous valid failure.

Skip the status update when outputs are empty so cancelled runs don't
clobber earlier results.
@hestonhoffman hestonhoffman requested a review from a team as a code owner April 13, 2026 16:48
@github-actions github-actions Bot added the Github Related to Github configurations label Apr 13, 2026
@hestonhoffman hestonhoffman merged commit cdc1e80 into master Apr 13, 2026
13 checks passed
@hestonhoffman hestonhoffman deleted the hestonhoffman/fix-approval-check-race-condition branch April 13, 2026 20:57
StefonSimmons pushed a commit that referenced this pull request Apr 16, 2026
When cancel-in-progress cancels the upstream check job, its outputs are
empty strings. The update-pr-status job (which runs with if: always())
was interpreting empty outputs as "team not requested", incorrectly
posting a success status that overwrote a previous valid failure.

Skip the status update when outputs are empty so cancelled runs don't
clobber earlier results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Github Related to Github configurations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants