Skip to content

fix race condition in check_merge_reqs#827

Closed
abe-winter wants to merge 2 commits intomainfrom
aw/fix-merge-flow
Closed

fix race condition in check_merge_reqs#827
abe-winter wants to merge 2 commits intomainfrom
aw/fix-merge-flow

Conversation

@abe-winter
Copy link
Member

@abe-winter abe-winter commented Mar 13, 2026

What changed

  • no longer trigger check_merge_reqs on unlabeled event

Why

In ready-for-protos mode, subsequent commits to a PR will remove the label at the top of the PR, triggering a check merge reqs run which will fail because the desired label isn't present. (Because it was just removed).

This PR fixes that by only running the check at the bottom, when the label is added.

In workflows where the user only sets ready-for-protos at the end of the PR when no more changes are needed, this doesn't happen because there are no more commits after the label is set, so the bug took a while to poke its head up.

Follow-up work

The downside of this is that the check merge reqs job will remain present and allow people to merge even if they make subsequent non-proto-compiled changes to their PR.

The unlabeled event caused transient failures when compile_protos
removed the protos-compiled label before re-adding it after compilation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the safe to test committer is a member of this org label Mar 13, 2026
@abe-winter abe-winter marked this pull request as draft March 13, 2026 21:03
@abe-winter abe-winter added the ready-for-protos add this when you want protos to compile on every commit label Mar 13, 2026
This label triggers compile_protos which will add protos-compiled
later, so running the merge check at this point would always fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abe-winter
Copy link
Member Author

not needed actually

@abe-winter abe-winter closed this Mar 13, 2026
@abe-winter abe-winter deleted the aw/fix-merge-flow branch March 13, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protos-compiled ready-for-protos add this when you want protos to compile on every commit safe to test committer is a member of this org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant