Skip to content

Cancel stale PR builds on new pushes - #365

Merged
alexreinking merged 1 commit into
masterfrom
cancel-stale-pr-builds
Jul 30, 2026
Merged

Cancel stale PR builds on new pushes#365
alexreinking merged 1 commit into
masterfrom
cancel-stale-pr-builds

Conversation

@alexreinking

Copy link
Copy Markdown
Member

Summary

  • OldBuildCanceller was already imported and instantiated in master.cfg but with an empty filter list, making it a no-op.
  • Populate the filter to track all builders on any refs/pull/* branch, so a new push to a PR cancels older pending/running build requests for that same PR instead of letting them run alongside the new build.
  • main/release/* pushes are untouched (filter is scoped to refs/pull/).

Test plan

  • CI passes
  • After merge/deploy, push a second commit to an open PR and confirm the prior in-flight build for that PR is cancelled (reason: "Build request has been obsoleted by a newer commit") rather than left running.

🤖 Generated with Claude Code

OldBuildCanceller was already instantiated but with an empty filter
list, making it a no-op. Populate it to track all builders on any
refs/pull/* branch so that a new push to a PR cancels older pending
or running builds for that same PR, instead of letting them run to
completion alongside the new build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alexreinking
alexreinking merged commit 865718b into master Jul 30, 2026
17 of 18 checks passed
@alexreinking
alexreinking deleted the cancel-stale-pr-builds branch July 30, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant