Repository navigation
build: single-source the image-registry setting as a local Bazel module - #1228
Merged
Merged
Conversation
4 tasks done
bpalermo
marked this pull request as ready for review
October 4, 2026 22:34
bpalermo
force-pushed
the
registry-module
branch
from
October 4, 2026 22:48
76aabdd to
fe14bc8
Compare
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
force-pushed
the
registry-module
branch
from
October 5, 2026 00:23
58460ef to
f42eb05
Compare
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.
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 atproxy/bazel/registry.bzl, because the//proxyworkspace cannotload()from the root module.scripts/check-registry-config.shchecked 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.bzland reach the module withlocal_path_override:MODULE.bazelbazel/registryproxy/MODULE.bazel../bazel/registryproxy/bazel/registry.bzlis deleted.Non-Bazel readers
scripts/image-registry.shnow defaults to the new path.registry-lib.shgainsREGISTRY_SETTING_PATHS(new path first, thenbazel/img/registry.bzl) andregistry_setting_at().verify-published-artifacts.shandpublish-verify-control.shuse it, including thegit logwalk 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 trackedregistry.bzland that bothMODULE.bazelfiles overrideaether_registryonto it. The literal and legacy allow-list checks are unchanged apart from paths. Negative control: re-adding a copy atproxy/bazel/registry.bzlturns it red.proxy-release.ymland theproxy.ymlpaths filter also fire onbazel/registry/**, so a registry change still republishes the proxy, as editing the old copy underproxy/did.ci-impacted-targets.shaddsbazel/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
bazel mod tidyin each workspace, each with its own Bazel version, leaves both lock files unchanged, because local overrides are not recorded. Inproxy/, tidy also reorders an argument insingle_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.BUILD.bazelfiles 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 onlyvalues.yamlchange is a comment naming the new path.Proxy release on merge
This PR touches
proxy/**andbazel/registry/**, so merging it runsproxy-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 sameenvoy.module-version,envoy.revisionandenvoy.bazel-registryas before. Onlyrevision, the aether commit, differs, as it does on every commit.bazel query //:pushstill givesrepository = "quay.io/aethermesh/proxy".The registry setting only feeds
//:pushand//:load(oci_push/oci_loadattributes), not any Envoy compile action.Test plan
bazel build //...;bazel test //bazel/... //charts/... //scripts/... //test/e2e/...(73 pass)bazel mod graphresolvesaether_registry@_;bazel build --nobuild //...analyses all 32 targets.proxy/.bazelrchas 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.shpasses; the negative control (a re-added copy) fails itcheck-registry-lookup.sh42/42,check-publish-verify-control.sh20/20,check-signature-layout.sh28/28,check-proxy-pin.sh18/18registry_setting_atagainst real history:origin/main(old path) and HEAD (new path) both parse toquay.io/aethermesh/referrermake 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.shgithub.head_refwarnings inci.yaml/proxy.yml, which this PR does not touch); everyuses:is still SHA-pinned🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr