Repository navigation
feat(040): publish to quay.io/aethermesh — registry flip, chart-<name> repositories via oras, release-environment pushes, split sweep (Quay cut-over, phase 2) - #1017
Merged
Conversation
Flip the one registry setting (bazel/img/registry.bzl + its byte-identical //proxy copy) to quay.io / aethermesh / no name overrides / chart- prefix, and make everything around it follow: - SIGNATURE_LAYOUT = "referrer" (what the sweep now asserts per commit) and PROXY_PIN_LEGACY_REFERENCES (the ghcr.io pin the chart keeps until the next proxy release re-pins it); image-registry.sh gains chart-ref, signature-layout and proxy-pin-refs, pinned by //bazel/img:registry_test. - Charts pushed with oras to chart_registry_url(<chart>) = quay.io/aethermesh/chart-<name>: chart_push (//bazel/helm:defs.bzl) writes exactly what `helm push` writes (the .tgz as the chart-content layer, Chart.yaml as the helm config via //tools/chartconfig), because helm push cannot name a flat repository and quay has no nested ones. oras 1.3.4 pinned in MODULE.bazel, wrapped by //tools/oras with a version_test. - publish.yaml / proxy-release.yml: every pushing or signing job runs in the `release` environment and logs in with the Quay robot; image_push + the separate keyless cosign sign step stay. - publish-verify split: verify-published-artifacts.sh reads registry.bzl AS OF EACH PUSH HEAD (host, names, chart prefix, signature layout), so pre-cut-over heads are checked on ghcr.io and post-cut-over heads on quay.io; the proxy pin is looked up where the pin says. Harnesses extended with the split and its reds. - Every pin reader (//bazel/proxy_pin, proxy-pin-lib, ci proxy-pin job, check-registry-config) accepts proxy_pin_references(); bump-chart rewrites the pin, repository line included, via proxy_pin_rewrite. - quay-smoke reads the certificate SAN from the signature bundle (cosign v3's verify JSON has no optional.Subject) and fails when it cannot. - Charts major-bumped to 1.0.0; docs, README, runbook and proposal 040 moved to the quay coordinates, with a consumer migration note and a phase-4 TODO. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Renaming the step re-fingerprinted CodeQL's already-dismissed actions/untrusted-checkout alert (#8: the job checks out ref: main and passes the triggering head sha as data) and surfaced it as new on this PR. The step name and its env comment go back to main's text; the split is described in the workflow header. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
REGISTRY_USERNAME/REGISTRY_PASSWORD are now sent only to the token endpoint
of REGISTRY_CREDENTIAL_HOST (default: the IMAGE_REGISTRY_HOST the workflows
export from scripts/image-registry.sh, else the setting's host). A token
request to any other host goes anonymous, with one stderr line
("registry-lib: credentials are for quay.io; reading ghcr.io anonymously").
The split sweep reads pre-cut-over heads on ghcr.io in runs that may hold the
quay robot, and nothing that points the library at a third registry may hand
it the password.
check-registry-lookup.sh (40 cases): the fake records every `-u` it is handed;
new cases pin the credential reaching its own host, NO credential reaching
another host, the exported IMAGE_REGISTRY_HOST, and a REGISTRY_CREDENTIAL_HOST
override both ways. Seen red with the guard removed.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Brings in #1016 (repository-cache keys, cache-save: false, ci-bazel-warmup first steps), #1019 and #1012. publish.yaml keeps both sides: the #1016 setup-bazel cache settings and warm-up step, then the release-environment Quay robot login. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…t lookups Under the verifier's pipefail, an early-exiting `grep -q` can SIGPIPE the writer and turn a hit into a miss. One check-registry-lookup run right after the main merge reported "no commit reachable from <HEAD> introduced <pinned digest>" (not reproduced in the next 200 direct runs and 6 harness runs); proxy_pin_introduced_by and registry_signature_layout now read their whole input with `grep -c`. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
No content change: this branch already carries that main and more. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Keeps chart 1.0.0 (main: 0.95.8) and takes main's new ghcr.io proxy pin (a43a20b), a PROXY_PIN_LEGACY_REFERENCES reference. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
Proposal 040, phase 2: every image and chart now publishes to the Quay org
quay.io/aethermesh. Gate:quay-smokerun 36345331611 was green. It showed that the robot can push to pre-created repositories but cannot create them, that cosign v3.1.2 keylesssign --recursivewrites a referrer only on the index and every child, and thatverify_image_signaturespasses on quay.What moves
ghcr.io/bpalermo/aether/<component>quay.io/aethermesh/<component>proxy-release.yml)ghcr.io/bpalermo/aether/aether-proxyquay.io/aethermesh/proxyghcr.io/bpalermo/aether/charts/<name>quay.io/aethermesh/chart-<name>sha256-<hex>/.sig)The flip itself is in
bazel/img/registry.bzl(byte-equalproxy/bazel/registry.bzl):quay.io/aethermesh/{}/chart-. The file also gets two new lines:SIGNATURE_LAYOUT = "referrer": the layout the sweep now asserts for every commit published under this setting.PROXY_PIN_LEGACY_REFERENCES = ["ghcr.io/bpalermo/aether/aether-proxy"]: see "The proxy pin" below.image-registry.shgainschart-ref,signature-layoutandproxy-pin-refs.//bazel/img:registry_testchecks all 32 answers against the Starlark helpers.Breaking: every chart is major-bumped
The charts go to aether
0.95.7 → 1.0.0, crds0.8.1 → 1.0.0, prober0.4.3 → 1.0.0and udsecho0.2.3 → 1.0.0. The default image repositories moved, which breaks anyone who overridesrepositoryby prefix. Thechart-version-bumpcheck passes against currentmain.To migrate a chart consumer:
oci://quay.io/aethermesh/chart-<name>.helm get values <release> -n <ns> -o yaml > values.yaml, then-f values.yaml. Never--reuse-values.quay.io/aethermesh/<component>and override each image'srepositoryindividually.Releases from before the move stay on ghcr.io, untouched. This is written up in
docs/getting-started.md,charts/README.md,README.mdand the runbook.How charts are pushed:
chart_push(oras)helm pushcan't do this job, for three reasons:name:to its base, so it can't name the repository.charts/<name>.prober/udsechowould collide with the images of the same name.Instead,
chart_pushin//bazel/helm:defs.bzlwrites exactly whathelm pushwrites, and names the repository:oras push <chart_registry_url(chart)>:<packaged version> --config Chart.json:application/vnd.cncf.helm.config.v1+json <name>-<version>.tgz:application/vnd.cncf.helm.chart.content.v1.tar+gzip.//tools/chartconfig, a small Go tool run on the stamped package.http_archives inMODULE.bazelwith sha256 from the release checksums. There's no BCR module. It's wrapped by//tools/oras, with//tools/oras:version_test.chart_registry_url(chart)now returns the per-chart repository, e.g.quay.io/aethermesh/chart-aether.aether.chart_pushpushes<version>andaether_commit.chart_pushpushes<version>-<full sha>. crds, prober and udsecho push theirX.Y.Z-<sha>version.registry_url, so rules_helm no longer defines.pushor.push_registrytargets that would push to the wrong names. publish.yaml runs<chart>.push_imagesfirst, then<chart>.chart_push.//bazel/helm:chart_push_testchecks the argv, the media types, the byte-identical layer and the config. It also checks that SemVer's+becomes_in the tag, and that a target for the wrong chart refuses to push. No network is needed.Local proof: I pushed crds and aether_commit into a throwaway local
registry:2, not quay.helm pull oci://…/chart-crds --version …worked.helm pushof the same.tgz:sha256:b06e00ee….helm template oci://…/chart-aetherrendered.Workflows
releasejobs.publish.yaml(publish) andproxy-release.yml(build-push,manifest,sign) run withenvironment: release. They usedocker/login-action@v4to${{ env.IMAGE_REGISTRY_HOST }}withsecrets.QUAY_USERNAME/secrets.QUAY_TOKEN. image_push, oras and cosign all use that Docker login.packages: write,HELM_REGISTRY_*, andGHCR_TOKEN/GITHUB_TOKENas registry credentials in those jobs.GITHUB_TOKENstays for GitHub API calls.mainenvironment on publish.BUILDBUDDY_ORG_API_KEYis also a repository secret, so droppingmainloses nothing.REGISTRY_USERNAME/REGISTRY_PASSWORD), not anonymously.image_pushplus the separate//tools/cosignsign --recursivestep, not the rules_img signer plugin.proxy_pin_rewrite(scripts/proxy-pin-lib.sh) instead of the sed that matchedrepository: $PROXY_IMAGE. After the flip, that sed would have matched nothing and quietly reported "nothing to do", so the first quay proxy release would never have been pinned. The new rewrite finds the block by any accepted reference and movesrepository:together withtag:,digest:and the provenance comment. It fails if it can't do that.The split sweep, and how it finds the cut-over
verify-published-artifacts.shreadsgit show <sha>:bazel/img/registry.bzlfor each push head it checks. That's the same way it already reads chart versions and the release-tag prefix. From that file it gets the host, namespace, overrides, chart prefix, andSIGNATURE_LAYOUT. A file without that line meanstag, which is every ghcr.io publish.registry.bzlsays quay.io.charts/<name>, theaether-proxyoverride, signature tags.chart-<name>, flat names, signature referrers.MISSING(the wrong layout). So is a referrer plus a tag: that'sboth, the double-write.MISSING. The sweep never falls back to the old registry.commitblock in the output now starts with a line naming the setting it used:registry <host>/<ns>, signatures as <layout>.MISSINGline names the registry its tree names.Quay is read anonymously through
/v2/auth.GHCR_TOKENstays in publish-verify only for ghcr.io reads of older heads, andregistry-lib.shonly ever sends it to ghcr.io.The proxy pin stays on ghcr.io until the next proxy release
The pin is data that only bump-chart writes, so the flip can't move it.
charts/aether/values.yamlkeepsghcr.io/bpalermo/aether/aether-proxy@sha256:0722f675…, and a new values comment says it moves with the next proxy release.Every pin reader accepts
proxy_pin_references(), which isimage_reference("proxy")plusPROXY_PIN_LEGACY_REFERENCES://bazel/proxy_pin://test/envoy_validatepasses and pulls from ghcr.proxy-pin-lib.shproxy-pinjob, which I ran locally and it passed.check-registry-config.sh, which reports a legacy pin as a::notice::.The sweep looks the pin up on the registry the pin names. It uses the signature layout of the newest
registry.bzlunder which that reference wasimage_reference("proxy").This PR's own merge triggers a proxy release, because it touches
proxy-release.ymlandproxy/bazel/registry.bzl. That release's bump-chart PR re-pins toquay.io/aethermesh/proxy.quay-smoke: reading the certificate SAN
cosign v3's
verifyJSON is[{"critical": …}]only, with nooptional.Subject, so that row always printed?. The SAN is now read from the sigstore bundle thatcosign download signaturereturns (verificationMaterial.certificate.rawBytes, or the leaf of the chain), thenopenssl x509 -ext subjectAltName.I checked this against a real quay referrer-only signature,
quay.io/argoproj/argocd→https://github.com/argoproj/argo-cd/.github/workflows/image-reuse.yaml@refs/heads/master, and against our ghcr bundle →…/publish.yaml@refs/heads/main. The summary now fails if the SAN can't be read or doesn't match the verify identity.check-registry-config: two allow-lists
Current registry (unchanged rule): no
quay.io/aethermeshliteral outside the setting.README.mdis added to that allow-list as user-facing install docs.New legacy hunt: the pre-cut-over registry may appear only inside the legacy allow-list. That covers the coordinate
ghcr.io/bpalermo/aether, the bare hostghcr.io, and the bare namespace. Other projects' images such asghcr.io/open-telemetry/…and the devcontainer features are excluded by a negative control. Each path in the list has a reason:This list is exactly the footprint phase 4 removes.
git grep -n ghcr.iooutput is entirely inside it.Harness cases, and which I saw fail
check-registry-lookup(35)MISSINGon quay. RED: a fallback tag on quay (SIGNATURE_LAYOUT referrer) gives 24 wrong-layoutMISSING. RED: the double-write gives 24both. The #1015 proxy-pin token case, adapted to the pin's own registry.check-publish-verify-control(20)ghcr.io/bpalermo/aether/; on a POST tree, red onquay.io/aethermesh/. A perfect red printed against the other registry is rejected. A POST tree where only ghcr is readable is inconclusive (exit 2), never a borrowed red.check-signature-layout(28)registry_layout_satisfies.check-index-children(10)check-proxy-pin(27)proxy_pin_rewritemoves legacy→quay and re-pins in place, leaving the supervisor digest untouched. It refuses (file unchanged) when there's no block, no digest, or a bad digest.check-registry-configSeen RED. For each of these I broke the implementation, ran the harness, then restored the file:
check-registry-lookupfails 5 cases (PRE on ghcr, unsigned child, 503, witnessed absence, cross-cut-over run).check-publish-verify-controlfails the PRE-tree cases ("0 of 20 MISSING lines on ghcr.io/bpalermo/aether/").referrer.check-signature-layoutfailsfound bundle promised referrer -> rc 0, want 1, and thecheck-registry-lookupwrong-layout case fails.ghcr.iomention is appended toMakefile.check-registry-configexits 1 namingMakefile:188.image_reference("proxy"), which is the old sed's behaviour.check-proxy-pinfails "legacy (ghcr) pin moves to image_reference("proxy"): the rewrite failed".summaryexit 1 (san=unread), and exit 0 once the SAN is read.Verification
bazel test //... --test_output=errors: 119/119 pass. These include//bazel/img:registry_test,//bazel/helm:chart_push_test,//tools/oras:version_test,//tools/chartconfig:chartconfig_test,//test/envoy_validateon the legacy pin, and every//charts/aetherhelm_template_test.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...is clean,//:formatis committed, andformat.checkis clean.make deps-auditis OK.shell-job harnesses are green: check-shell-lint, check-signature-layout, check-index-children, check-push-head-selection, check-publish-verify-control, check-proxy-pin, check-registry-lookup, check-registry-config.helm templateof the packagedaether-1.0.0rendersquay.io/aethermesh/{agent,mesh-dns,cni-install,registrar,controller,proxy-supervisor}@sha256:…and the unchangedghcr.io/bpalermo/aether/aether-proxy@sha256:0722f675….98a84a8ande93671b, which predatesregistry.bzland so uses the first-version fallback, both PASS 40/40 on ghcr.io.Credential binding (follow-up commit 599bdb7)
registry-lib.shsendsREGISTRY_USERNAME/REGISTRY_PASSWORDonly to the token endpoint ofREGISTRY_CREDENTIAL_HOST. That defaults to theIMAGE_REGISTRY_HOSTthe workflows export, or the setting's host if nothing is exported. A token request to any other host goes anonymous, with one stderr line:registry-lib: credentials are for quay.io; reading ghcr.io anonymously.New
check-registry-lookupcases (now 40 in total), using a fake registry that records every-uit receives:IMAGE_REGISTRY_HOSTis honouredREGISTRY_CREDENTIAL_HOSToverride works in both directionsSeen red: with the guard removed, both "another host" cases fail, because the fake records
ghcr.io aethermesh+robotandquay.io aethermesh+robot.After merge
publishrun on the merge commit goes green, pushing images and charts to quay.io with the robot.registry_referrersshould list the sigstore sign bundle, and both tag lookups (sha256-<hex>,sha256-<hex>.sig) should 404. That is the double-write check. publish-verify for the merge commit should pass withsignatures as referrer.helm upgradefromoci://quay.io/aethermesh/chart-aetherusinghelm get values <release> -n <ns> -o yaml→-f, never--reuse-values. Then the 8h soak. The proxy-release bump PR triggered by this merge should land first, so the proxy comes from quay too.tagdefault)PROXY_PIN_LEGACY_REFERENCESGHCR_TOKEN🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr