Queue tracker PR builds instead of cancelling them (#902)

The tracker opens its PR and then labels it, so a new tracker PR starts
two build runs at once. The second cancelled the first, whose always-run
`result` job then failed and left a red required check on the PR (#901)
until the surviving run finished. The tracker also force-pushes every two
hours, which would cancel long builds the same way the sync branches did.

Treat auto/track-branches like auto/sync-*: the newer run waits and
reuses the finished build's artifacts.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ryan HughesandClaude Opus 5.5 authored and GitHub committed 2026-10-09 12:01:06 -04:00
1 parent 88947c367b
commit d32f520cb9
2 files changed
+13 -11

No files matched your search

+10 -8
View File
@@ -20,16 +20,18 @@ on:
description: "Space-separated package directories to build"
required: true
# A new push normally cancels the PR's in-flight build. The sync bots'
# branches (auto/sync-*) are the exception: they are force-pushed with fresh
# upstream releases several times a day, which kept cancelling multi-hour
# aarch64 builds before they could finish. There the newest run waits
# instead (GitHub keeps at most one pending run per group, replacing older
# pending ones), and when it starts it reuses every artifact the finished
# build uploaded, so only packages whose tree changed are built again.
# A new push normally cancels the PR's in-flight build. The bots' branches
# (auto/sync-* and auto/track-branches) are the exception: they are
# force-pushed with fresh upstream releases several times a day, which kept
# cancelling multi-hour aarch64 builds before they could finish. There the
# newest run waits instead (GitHub keeps at most one pending run per group,
# replacing older pending ones), and when it starts it reuses every artifact
# the finished build uploaded, so only packages whose tree changed are built
# again. The tracker labels the PR it opens, so a new tracker PR starts two
# runs at once; cancelling the first left a red `result` on the PR (#901).
concurrency:
group: build-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ !(github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'auto/sync-')) }}
cancel-in-progress: ${{ !(github.event.pull_request.head.repo.full_name == github.repository && (startsWith(github.head_ref, 'auto/sync-') || github.head_ref == 'auto/track-branches')) }}
jobs:
# Builds cost real machines, so they run only for trusted authors: