Repository navigation
fix(ci): serialise publishes and give the aether chart a commit-pinned tag (#692) - #713
Merged
Merged
Conversation
…d tag (#692) Two `publish` runs for consecutive merges to `main` raced on the same chart version tag and the older build won: 0.92.1 was pushed by the newer commit (95b158e) at 13:15:59Z and overwritten by the older one (77a7d45) four seconds later, so the 13:16:27Z deploy silently shipped without #689. Two independent causes, both fixed: * `publish.yaml` had no `concurrency` group, so runs for `main` overlapped. Added `group: publish-main, cancel-in-progress: false` — a publish is not a redundant check to supersede; cancelling one mid-push would leave images pushed and the chart not. `proxy-release.yml` gets the same treatment for the same class of bug: its `bump-chart` job rewrites `charts/aether/values.yaml` on top of whatever `main` is at checkout and force-pushes the single rolling `chore/proxy-image-bump` branch, so overlapping runs drop one run's image pin. `main.yaml` (main-post-merge) deliberately gets none, and now says so: it writes no shared state, and serialising it would delay — or, via queued-run eviction, skip — the detection it exists to provide. * The `aether` chart was published only under its bare `Chart.yaml` version, a tag that does not change per commit. It is now also published as `charts/aether:<X.Y.Z>-<full git sha>`, the scheme crds/prober/udsecho already use, via a second packaging of the same chart whose `Chart.yaml` is *derived* from the first (a genrule appends `-{GIT_COMMIT}`), so the two tags can never disagree about X.Y.Z. Only the chart is pushed for the commit tag — the images went up by digest with the bare push. The bare tag stays, for Flux and the documented deploy procedure, and is now safe because of the serialisation. The documented deploy procedure (docs/runbook.md, docs/getting-started.md) now pins the commit tag and, after `helm upgrade`, asserts that `helm get metadata -n aether-system aether -o json | jq -r .appVersion` contains the intended commit, failing otherwise — the only check that catches a chart tag serving a different build than the one asked for. Substring, not equality: appVersion is `git describe --tags --always --long --dirty --abbrev=40`, so the sha can carry a `v1.2.3-N-g` prefix or a `-dirty` suffix. Validated: `bazel build --stamp //charts/aether:aether //charts/aether:aether_commit` produces `version: 0.92.4` and `version: 0.92.4-<40-char sha>` with the same appVersion; `bazel test //charts/...` (9/9, including the new `aether_commit_lint_test`) and `--config=lint //charts/...` pass; `scripts/check-chart-version-bump.sh` passes on the 0.92.3 -> 0.92.4 bump; all three edited workflows parse as YAML (actionlint not installed locally). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #692.
On 2026-09-05 two
publishruns for consecutive merges raced on the same charttag and the older build won:
charts/aether:0.92.1was pushed by the newercommit (
95b158e, #689) at 13:15:59Z and overwritten by the older one(
77a7d45) four seconds later. The 13:16:27Z deploy therefore shipped a releasethat was believed to contain #689 and did not. Both of the issue's fixes are
here, plus the deploy-side guard.
1. Serialise the workflows that write shared mutable state
publish.yamlpublish-main,cancel-in-progress: falsecancel-in-progress: falsebecause a publish is not a redundant check to be superseded — cancelling one mid-push leaves the images pushed and the chart not.proxy-release.ymlproxy-release-main,cancel-in-progress: falsebump-chartrewritescharts/aether/values.yamlon top of whatevermainis at checkout time and force-pushes the single rollingchore/proxy-image-bumpbranch, so two overlapping runs drop one run's image pin. Cancelling would strand per-arch blobs with no manifest referencing them.main.yaml(main-post-merge)2. Publish the aether chart under a commit-pinned tag too
helm pushderives the OCI tag from the packaged chart'sversion:, and theaetherchart carried a bareX.Y.Zthat does not change per commit — unlikecrds/prober/udsecho, which already suffix-{GIT_COMMIT}.The chart is now published twice, from two packagings of the same sources:
ghcr.io/bpalermo/aether/charts/aether:0.92.4— unchanged, kept because Fluxand the deploy procedure consume it, and now safe thanks to (1).
ghcr.io/bpalermo/aether/charts/aether:0.92.4-<full 40-char git sha>— new,via
//charts/aether:aether_commit.push_registry(chart only; the images wentup by digest with the bare push).
The second packaging's
Chart.yamlis derived from the first by a genrule thatappends
-{GIT_COMMIT}to the version line, so the two tags can never disagreeabout
X.Y.Z, and the genrule fails the build if that line ever stops matchingthe expected shape. Chart version bumped
0.92.3→0.92.4(CI-enforced for anycharts/change).3. Post-upgrade guard in the deploy procedure
There is no deploy script, so this went into the two documented procedures
(
docs/runbook.md§7,docs/getting-started.md). Both now pin the commit tag andend with:
Substring rather than equality:
appVersionis{STABLE_GIT_VERSION}=git describe --tags --always --long --dirty --abbrev=40, so the sha may carry av1.2.3-N-gprefix or a-dirtysuffix.charts/README.mddocuments the newtag and push target.
Validation
bazel build --stamp //charts/aether:aether //charts/aether:aether_commit→the packaged charts carry
version: 0.92.4andversion: 0.92.4-82ac16c4b3c2ffa61603a12ec596e91ebc13159arespectively, withthe same
appVersion. Non-stamped builds degrade to0.92.4-GIT-COMMITandstill lint, exactly like the sibling charts.
bazel test //charts/...→ 9/9 pass, including the new//charts/aether:aether_commit_lint_test.bazel build --config=lint //charts/...clean;bazel run //:formatclean.scripts/check-chart-version-bump.sh origin/main→0.92.3 -> 0.92.4OK.yaml.safe_load);actionlintis notinstalled on this machine.
Note on behaviour: with
cancel-in-progress: false, a run queued behind anotheris evicted if a third arrives — so a middle commit's chart may never be
published. That is the intended trade (the issue accepts it), and it now fails
loudly: the deploy guard rejects a tag whose
appVersionis not the commitasked for, instead of silently deploying the wrong build.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr