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:
1 parent
88947c367b
commit
d32f520cb9
2 files changed
+13
-11
No files matched your search
@@ -20,16 +20,18 @@ on:
|
|||||||
description: "Space-separated package directories to build"
|
description: "Space-separated package directories to build"
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
# A new push normally cancels the PR's in-flight build. The sync bots'
|
# A new push normally cancels the PR's in-flight build. The bots' branches
|
||||||
# branches (auto/sync-*) are the exception: they are force-pushed with fresh
|
# (auto/sync-* and auto/track-branches) are the exception: they are
|
||||||
# upstream releases several times a day, which kept cancelling multi-hour
|
# force-pushed with fresh upstream releases several times a day, which kept
|
||||||
# aarch64 builds before they could finish. There the newest run waits
|
# cancelling multi-hour aarch64 builds before they could finish. There the
|
||||||
# instead (GitHub keeps at most one pending run per group, replacing older
|
# newest run waits instead (GitHub keeps at most one pending run per group,
|
||||||
# pending ones), and when it starts it reuses every artifact the finished
|
# replacing older pending ones), and when it starts it reuses every artifact
|
||||||
# build uploaded, so only packages whose tree changed are built again.
|
# 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:
|
concurrency:
|
||||||
group: build-${{ github.event.pull_request.number || github.run_id }}
|
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:
|
jobs:
|
||||||
# Builds cost real machines, so they run only for trusted authors:
|
# Builds cost real machines, so they run only for trusted authors:
|
||||||
|
|||||||
@@ -229,9 +229,9 @@ These packages were already excluded from automatic AUR updates. The migration p
|
|||||||
`sync-upstream.yml` pushes its PR with the built-in `GITHUB_TOKEN`, so GitHub
|
`sync-upstream.yml` pushes its PR with the built-in `GITHUB_TOKEN`, so GitHub
|
||||||
holds the PR's build and test runs for approval. The workflow labels its own
|
holds the PR's build and test runs for approval. The workflow labels its own
|
||||||
PR `build-approved`, and its `approve` job releases the held runs for each
|
PR `build-approved`, and its `approve` job releases the held runs for each
|
||||||
commit it pushes. A push to an `auto/sync-*` branch does not cancel the PR's
|
commit it pushes. A push to an `auto/sync-*` branch, or to the tracker's
|
||||||
build in flight: the new build waits, then reuses every artifact the finished
|
`auto/track-branches`, does not cancel the PR's build in flight: the new
|
||||||
one uploaded.
|
build waits, then reuses every artifact the finished one uploaded.
|
||||||
|
|
||||||
Because of that push, GitHub starts no `pull_request_target` workflow for the
|
Because of that push, GitHub starts no `pull_request_target` workflow for the
|
||||||
PR, so `auto-merge-pr.yml` never arms it: a maintainer merges it.
|
PR, so `auto-merge-pr.yml` never arms it: a maintainer merges it.
|
||||||
|
|||||||
Reference in new issue
Block a user