From ff231c15f429abc37059ae133c0da85d834d1552 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 16:11:17 +0000 Subject: [PATCH 1/3] ci: cancel superseded pull request builds Every push to a pull request queued a full build behind the previous one rather than replacing it. Each build occupies runners for hours across three architectures, so a PR updated a few times held several obsolete builds in the queue at once. Cancel in-progress runs for pull_request events only. Builds on master, tags and the schedule keep cancel-in-progress disabled: they publish images and populate the caches that pull request builds draw from, so they should always run to completion. No build work is lost to a cancellation. The Spack buildcache mirrors are configured with autopush (mirrors.yaml.in), so packages are pushed as they finish rather than at the end of the job, and a cancelled build leaves its completed packages available to the run that supersedes it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01B6394UjZvzHPVygCvjRc9n --- .github/workflows/build-push.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 87d71bd4..5239b68c 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -20,7 +20,16 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: false + ## Supersede in-flight pull request builds: a new push to a PR makes the + ## running build obsolete, and each one occupies runners for hours across + ## three architectures. No build work is lost, because Spack pushes to the + ## buildcache mirrors as packages finish (autopush) rather than at the end of + ## the job, so a cancelled build leaves its completed packages available to + ## the run that replaces it. + ## + ## Builds on master, tags and the schedule are never cancelled: they publish + ## images and populate the caches that pull requests build against. + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read From ea24e7e14fc4f556221cbdee7ea6c0d8e6583ed3 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 14 Sep 2026 11:20:21 -0500 Subject: [PATCH 2/3] Update cancellation comments in build-push.yml Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 5239b68c..192baf2d 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -27,7 +27,7 @@ concurrency: ## the job, so a cancelled build leaves its completed packages available to ## the run that replaces it. ## - ## Builds on master, tags and the schedule are never cancelled: they publish + ## Builds on master, the schedule, and workflow_dispatch are never cancelled: they publish ## images and populate the caches that pull requests build against. cancel-in-progress: ${{ github.event_name == 'pull_request' }} From 69283115961a917aa2b922169978affffd93be07 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 14 Sep 2026 17:48:00 -0500 Subject: [PATCH 3/3] fix: rm wall of text Co-authored-by: Dmitry Kalinkin --- .github/workflows/build-push.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 192baf2d..37c6b721 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -20,15 +20,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - ## Supersede in-flight pull request builds: a new push to a PR makes the - ## running build obsolete, and each one occupies runners for hours across - ## three architectures. No build work is lost, because Spack pushes to the - ## buildcache mirrors as packages finish (autopush) rather than at the end of - ## the job, so a cancelled build leaves its completed packages available to - ## the run that replaces it. - ## - ## Builds on master, the schedule, and workflow_dispatch are never cancelled: they publish - ## images and populate the caches that pull requests build against. cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: