Skip to content

build: single-source the image-registry setting as a local Bazel module - #1228

Merged
bpalermo merged 1 commit into
mainfrom
registry-module
Oct 5, 2026
Merged

bpalermo merged 1 commit into
mainfrom
registry-module

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Bottom of a two-PR stack (this, then #1229).

The image-registry setting (proposal 040) lived at bazel/img/registry.bzl, with a byte-identical copy at proxy/bazel/registry.bzl, because the //proxy workspace cannot load() from the root module. scripts/check-registry-config.sh checked that the two stayed equal.

This PR makes it one file. bazel/registry/ is now a tiny source-only module, aether_registry, with no deps. Both workspaces load @aether_registry//:registry.bzl and reach the module with local_path_override:

workspace Bazel override path
root MODULE.bazel 9.2.0 bazel/registry
proxy/MODULE.bazel 8.7.0 ../bazel/registry

proxy/bazel/registry.bzl is deleted.

Non-Bazel readers

  • scripts/image-registry.sh now defaults to the new path.
  • The publish-verify sweep reads the setting as of each push head, and heads before this commit only have it at the old path. So registry-lib.sh gains REGISTRY_SETTING_PATHS (new path first, then bazel/img/registry.bzl) and registry_setting_at(). verify-published-artifacts.sh and publish-verify-control.sh use it, including the git log walk that finds a proxy pin's setting.
  • check-registry-lookup.sh: the throwaway history keeps PRE at the old path and POST at the new path only, so the harness exercises both paths.
  • check-registry-config.sh: the byte-equality check is replaced by a check that there is only one tracked registry.bzl and that both MODULE.bazel files override aether_registry onto it. The literal and legacy allow-list checks are unchanged apart from paths. Negative control: re-adding a copy at proxy/bazel/registry.bzl turns it red.
  • Workflows, e2e scripts, docs and comments now use the new path. proxy-release.yml and the proxy.yml paths filter also fire on bazel/registry/**, so a registry change still republishes the proxy, as editing the old copy under proxy/ did.
  • ci-impacted-targets.sh adds bazel/registry/* to the seed list, so a change there is a full run. To bazel-diff it is an external repo.

Lock files and charts

  • Lock files: bazel mod tidy in each workspace, each with its own Bazel version, leaves both lock files unchanged, because local overrides are not recorded. In proxy/, tidy also reorders an argument in single_version_override; that formatting change belongs to build: drive format and lint of proxy/ from the root #1229, so it is not in this PR.
  • Charts: the four charts' BUILD.bazel files changed their load label, so each chart is bumped as CI requires: aether 2.4.3, crds 1.1.1, prober 1.0.3, udsecho 2.0.1. No template or value changes; the only values.yaml change is a comment naming the new path.

Proxy release on merge

This PR touches proxy/** and bazel/registry/**, so merging it runs proxy-release. That rebuild should be a cache hit because no compile input changes. Checked as far as possible without compiling Envoy:

  • bazel aquery 'mnemonic("CppLink|CppCompile|CppArchive", deps(//:envoy))' on main and on this branch: all 14,334 action keys are identical.
  • //:image_metadata (the image's OCI labels) on this branch gives the same envoy.module-version, envoy.revision and envoy.bazel-registry as before. Only revision, the aether commit, differs, as it does on every commit.
  • bazel query //:push still gives repository = "quay.io/aethermesh/proxy".

The registry setting only feeds //:push and //:load (oci_push/oci_load attributes), not any Envoy compile action.

Test plan

  • root (Bazel 9.2.0): bazel build //...; bazel test //bazel/... //charts/... //scripts/... //test/e2e/... (73 pass)
  • proxy (Bazel 8.7.0): bazel mod graph resolves aether_registry@_; bazel build --nobuild //... analyses all 32 targets. proxy/.bazelrc has nothing that forbids a .. local override. The override path is source-only and the module is not fetched (no registry lookup), so the bb-cache/RBE configs see the same action graph.
  • scripts/check-registry-config.sh passes; the negative control (a re-added copy) fails it
  • offline harnesses: check-registry-lookup.sh 42/42, check-publish-verify-control.sh 20/20, check-signature-layout.sh 28/28, check-proxy-pin.sh 18/18
  • registry_setting_at against real history: origin/main (old path) and HEAD (new path) both parse to quay.io/aethermesh / referrer
  • make format-check, make gazelle (no diff), bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //..., scripts/check-shell-lint.sh, scripts/check-chart-version-bump.sh
  • actionlint v1.7.7: no new findings (only the existing github.head_ref warnings in ci.yaml/proxy.yml, which this PR does not touch); every uses: is still SHA-pinned

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

@bpalermo
bpalermo added this pull request to stack #1230 October 4, 2026 22:34
@bpalermo bpalermo changed the title registry module build: single-source the image-registry setting as a local Bazel module Oct 4, 2026
@bpalermo
bpalermo marked this pull request as ready for review October 4, 2026 22:34
The registry setting (proposal 040) lived at bazel/img/registry.bzl with a
byte-identical copy at proxy/bazel/registry.bzl, because the //proxy
workspace cannot load() from the root module; scripts/check-registry-config.sh
asserted the two stayed equal.

Make it ONE file instead: bazel/registry/ is now a tiny source-only module
(`aether_registry`, no deps) that both workspaces reach with
local_path_override -- "bazel/registry" from the root (Bazel 9.2.0) and
"../bazel/registry" from proxy/ (Bazel 8.7.0). Every loader loads
@aether_registry//:registry.bzl, and proxy/bazel/registry.bzl is gone.

Non-Bazel readers follow the move:
- scripts/image-registry.sh defaults to the new path.
- The publish-verify sweep reads the setting AS OF each push head, and heads
  from before this commit only have it at the old path, so registry-lib.sh
  gains REGISTRY_SETTING_PATHS (new path first, then bazel/img/registry.bzl)
  and registry_setting_at(); verify-published-artifacts.sh and
  publish-verify-control.sh use it. check-registry-lookup.sh's throwaway
  history now keeps PRE at the old path and POST at the new one, so both
  are exercised.
- check-registry-config.sh drops the byte-equality check for a "one
  registry.bzl, both workspaces override onto it" check; the literal and
  legacy allow-list checks are unchanged apart from the paths.
- proxy-release.yml and proxy.yml also trigger on bazel/registry/**, so a
  registry flip still republishes the proxy (it used to via the copy).
- ci-impacted-targets.sh seeds bazel/registry/* (an external repo to
  bazel-diff), so a change there is a full run.

Neither lock file changes (local overrides are not recorded). The four
charts' BUILD files changed their load label, so each chart is bumped
(aether 2.4.3, crds 1.1.1, prober 1.0.3, udsecho 2.0.1).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit 4976546 into main Oct 5, 2026
25 checks passed
@bpalermo
bpalermo deleted the registry-module branch October 5, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant