From 3eeb8a97e3af725458eaf70b23d9c263a808cde7 Mon Sep 17 00:00:00 2001 From: Wynne Pirini Date: Wed, 28 Oct 2026 12:14:18 +1300 Subject: [PATCH] ci(ns8): serialise module publishes, which shared a staging tag across refs build-images.sh pushes each architecture to a fixed staging tag (:build-amd64 / :build-arm64) and push-manifest.sh assembles the multi-arch index from whatever is there. The concurrency group was `ns8-module-${{ github.ref }}`, so a push to main and a release tag - which are cut seconds apart, because the release commit lands on main immediately before the tag - were different groups and ran concurrently, overwriting each other's staging images. That published a manifest whose architectures came from different releases. It happened on v0.11.2: :edge carried amd64 from the tag (app 0.11.2) and arm64 from main (app edge), and the post-publish architecture assertion failed the main build. The tag's own :0.11.2 / :0.11 / :latest were coherent, and :edge was rebuilt after the tag run finished. Use one concurrency group for every module publish and stop cancelling in progress, so a release build is never cancelled by an unrelated push. Module publishes take 1-2 minutes, so queueing is cheap. The assertion that caught it stays as the backstop. --- .github/workflows/ns8-module.yml | 19 +++++++++++++++++-- CHANGELOG.md | 13 +++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ns8-module.yml b/.github/workflows/ns8-module.yml index 71357757..b31ffda4 100644 --- a/.github/workflows/ns8-module.yml +++ b/.github/workflows/ns8-module.yml @@ -17,8 +17,23 @@ on: pull_request: concurrency: - group: ns8-module-${{ github.ref }} - cancel-in-progress: true + # Deliberately NOT keyed on github.ref. build-images.sh pushes each architecture + # to a fixed staging tag (:build-amd64 / :build-arm64) and push-manifest.sh + # assembles the multi-arch index from whatever is on those tags. Two runs on + # different refs therefore share that staging state: a push to main and a + # release tag start seconds apart (the tag is cut right after the release + # commit lands) and are different groups when the ref is in the key, so they + # ran concurrently and overwrote each other's staging images. The result was a + # published manifest whose architectures came from different releases — + # observed on v0.11.2, where :edge carried amd64 from the tag (app 0.11.2) and + # arm64 from main (app edge). One group for all module publishes serialises + # them and removes the shared-state race. + # + # cancel-in-progress stays false: a release build must never be cancelled + # because an unrelated push to main arrived. Module publishes take ~1-2 + # minutes, so queueing is cheap. + group: ns8-module-publish + cancel-in-progress: false jobs: validate: diff --git a/CHANGELOG.md b/CHANGELOG.md index b4c6a866..ee2b4fa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,19 @@ exact tag (`ghcr.io/calnode/calnode:0.1.0`) if you need stability between upgrad ## [Unreleased] +### Fixed +- **An NS8 module release can no longer mix architectures.** The module build pushes each + architecture to a fixed staging tag (`:build-amd64`, `:build-arm64`) and then assembles the + multi-arch index from them. The workflow's concurrency group included the git ref, so a + push to `main` and a release tag — which are cut seconds apart — ran concurrently and + overwrote each other's staging images, publishing a manifest whose amd64 and arm64 came + from different releases. This is exactly what happened while cutting 0.11.2: `:edge` + carried amd64 from the tag (app `0.11.2`) and arm64 from `main` (app `edge`). The release + tags themselves were coherent; `:edge` was rebuilt. All module publishes now share one + concurrency group and serialise, with `cancel-in-progress` off so a release build cannot be + cancelled by an unrelated push. The post-publish architecture assertion is what caught it + and remains in place. + ## [0.11.2] - 2026-10-28 ### Added