Repository navigation
Description
Summary
envoyproxy/envoy#42890 ("bazel: Switch to bzlmod", merged 2026-09-04, after our v1.39.0 pin) makes Envoy bzlmod-only. On Envoy main today:
WORKSPACEis gone (404),MODULE.bazelis 16 KB,.bazelrcflipped to--enable_bzlmod --noenable_workspace --@envoy//bazel:enable_bzlmod=Truewith--registry=https://raw.githubusercontent.com/envoyproxy/bazel-registry/<sha>(Envoy's private registry,.envoy-suffixed module versions;envoy_apiis its own module1.40.0-dev).- Six of the ten macro files
proxy/WORKSPACEloads no longer exist:bazel/repositories.bzl,api_binding.bzl,api_repositories.bzl,repositories_extra.bzl,dependency_imports.bzl,dependency_imports_extra.bzl.bazel/extension_config/(theenvoy_build_configlocal_repository seam ourproxy/bazel/extension_config/mirrors) is gone too. envoy_build_configis now produced by a module extension (bazel/extensions.bzl→envoy_build_config_ext→default_envoy_build_config(name = "envoy_build_config")), alongsideenvoy_repo_extension,envoy_toolchains_extension,envoy_module_graph_extension,wasm_cargo.- Envoy stays on Bazel 8.7.0 (same as
proxy/.bazelversion), so this is not a Bazel-version problem — it is a WORKSPACE-removal problem. Bazel 9 (which the main aether repo already uses) removes WORKSPACE outright, so the migration is inevitable either way. - The canonical downstream,
envoyproxy/envoy-filter-example, has not migrated (still WORKSPACE, last touched 2025-04). There is no template to copy.
Consequence
The Envoy v1.40.0 bump (#695) cannot be a pin change. proxy/ (a WORKSPACE-only sibling workspace: common --noenable_bzlmod --enable_workspace in envoy.bazelrc, envoy_repository() http_archive of the Envoy source, then ten @envoy//bazel:*.bzl WORKSPACE macros) must be migrated to bzlmod first. Until that lands, the proxy image is frozen at v1.39.0, and with it the aether_stats hot-restart tag workaround (envoy#45674, #695).
Migration shape (spike, then real PR)
proxy/MODULE.bazel:module(name = "aether_proxy");bazel_dep(name = "envoy", version = "1.40.0")with anarchive_override(orgit_override) to the release tarball — Envoy is not in the BCR; check whetherenvoyproxy/bazel-registrypublishes anenvoymodule itself, else override. Mirror Envoy's--registry=pin inproxy/envoy.bazelrc(the.envoy-suffixedprotobuf/rules_rust/boringsslversions only resolve there), flip the bzlmod flags exactly as 42890's.bazelrcdiff does, and generateMODULE.bazel.lock.- The extension list: replace
local_repository(name = "envoy_build_config", path = "bazel/extension_config")with the bzlmod mechanism for overriding an extension-generated repo from the root module —override_repo(envoy_build_config_ext, envoy_build_config = "aether_envoy_build_config")(Bazel ≥ 7.2) pointing at a repo rule that emits ourextensions_build_config.bzl(EXTENSIONS+//source/extensions/filters/http/aether_stats:config,CONTRIB_EXTENSION_PACKAGE_VISIBILITY). Verify withbazel mod show_repothat@envoy_build_configresolves to ours, not Envoy's default. use_extension("@envoy//bazel:extensions.bzl", ...)+use_repoforenvoy_repo,clang_platform,envoy_mod_graphas Envoy's own MODULE.bazel does (lines ~415–425), and the@envoy_toolshedsysroot/sanitizer extensions if the RBE/arm64 build needs them.- Re-check what
proxy/bazel/repositories.bzlstill needs to provide (container-structure-test,rules_ocibecomebazel_deps),proxy/bazel/get_workspace_status, and the--build-id=sha1linkopt (fix(build): derive the GNU build-ID from binary content so every released binary is unique (#653) #654) survive. - Gate: the existing
--mode validatetest,//integration:symtab_test(test(proxy): guard the shipped Envoy's symbol table, correct the "stripped" docs #656), theaether_statsenvoy_cc_tests,tag_extraction_test, and an arm64 image build viaproxy-release— then proxy: bump Envoy to v1.40.0 to pick up envoy#45674 (hot-restart stat tags) and retire the aether_stats stats_tags regex workaround; envoy#45975 already in v1.39.0, leave envoy#45976 unset #695.
Do the spike against a pinned post-42890 main commit (e.g. the 42890 merge 69bc1cf…) so the bzlmod shape is proven before v1.40.0 ships (~mid-October); the bump then really is a pin change. Expect days, not hours: the .envoy registry pins, the envoy_build_config override, and RBE toolchain resolution are each a likely snag, and nothing downstream has done this yet.
Related: #695 (blocked on this), proposal 010 (custom proxy workspace — the sibling-workspace decision stands; source-build-in-root was rejected), proposal 011 (prefix_symbols static module), #656.
Activity
bpalermo commentedon Sep 5, 2026
Companion PR: envoyproxy/envoy#47217 "bazel: Remove WORKSPACE" (merged 2026-09-04 22:12Z, 100 files) is the change that actually deletes the WORKSPACE-era surface —
WORKSPACE,bazel/api_binding.bzl,bazel/api_repositories.bzl,bazel/dependency_imports.bzl,bazel/dependency_imports_extra.bzl,bazel/extension_configs.bzl,api/bazel/{repositories,repository_locations,external_deps,envoy_http_archive}.bzl, and everybazel/external/*.BUILD+ patch that WORKSPACE-modehttp_archives referenced. envoy#42890 flipped the switch; #47217 removed the floor. Both post-date the v1.39.0 pin and both ship in v1.40.0, so the migration described above is the only path — there is no WORKSPACE compatibility shim to lean on.bpalermo commentedon Sep 5, 2026
There IS a downstream template now —
envoyproxy/examples/filter-cc, published 2026-09-04The Envoy docs sandbox https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/filter-cc ("build a native C++ HTTP filter and statically link it into the Envoy binary using bzlmod") lives in
github.com/envoyproxy/examples/filter-cc(the sandboxes moved out of the main repo;examples/is a 404 on Envoymain). Added byexamples#1394on 2026-09-04 — the same day as envoy#42890/#47217 — and it is exactly the shapeproxy/is. This replaces the "no template, expect days" assessment above.What it settles
archive_overrideneeded.MODULE.bazel:--registry=https://raw.githubusercontent.com/envoyproxy/bazel-registry/<commit>(plus--registry=https://bcr.bazel.build/). The registry currently publishes one version, the rolling dev snapshot (modules/envoy/1.40.0-dev.20260904.13144fb.envoyat registry HEAD); presumably1.40.0.envoyappears at release. Pin the registry commit AND the module version together.override_repo, exactly as guessed:bazel/build_config/{MODULE.bazel (module(name="envoy_build_config")), BUILD (exports_files), extensions_build_config.bzl}. Theirextensions_build_config.bzlloads Envoy's default and filters it (EXTENSIONS = {… if "wasm" not in name}) and re-exportsCONTRIB_EXTENSION_PACKAGE_VISIBILITY,EXTENSION_CONFIG_VISIBILITY,EXTENSION_PACKAGE_VISIBILITY,LEGACY_ALWAYSLINK— so our 654-lineproxy/bazel/extension_config/extensions_build_config.bzlcollapses to "load default, drop what we drop, add nothing" (theaether_statsfilter is a dep of the binary, not an entry in that dict — same as filter-cc's:http_filter_config)..bazelrcto mirror:--enable_bzlmod --noenable_workspace --@envoy//bazel:enable_bzlmod=True, the two registries,--config=clang(libc++ + lld viatoolchains_llvm 1.9.0.envoyas adev_dependency,--host_platform=@clang_platformfromenvoy_toolchains_extension), the@quiche//:*_impl_liboverrides,--@proxy-wasm-cpp-host//bazel:engine=disabled, protobufprefer_prebuilt_protoc, C++20. Bazel 8.7.0 (same as ours).envoy_cc_binary(name="envoy", repository="@envoy", deps=[":<filter_config>", "@envoy//source/exe:envoy_main_entry_lib"]),envoy_cc_test(... "@envoy//test/integration:http_integration_lib").Revised plan for
proxy/proxy/MODULE.bazelfrom the template;bazel_deps forrules_ociandcontainer-structure-test(both on the BCR) replaceproxy/bazel/repositories.bzl; deleteWORKSPACE;bazel/extension_config/→bazel/build_config/in the template's shape.proxy/envoy.bazelrc→ the template's.bazelrcplus ours: keep--linkopt=-Wl,--build-id=sha1(fix(build): derive the GNU build-ID from binary content so every released binary is unique (#653) #654),--workspace_status_command=bash bazel/get_workspace_status, and whatever RBE/arm64 platform config we carry (check--platformsfor arm64 — the template only shows@clang_platformfor the host).//integration:symtab_test(test(proxy): guard the shipped Envoy's symbol table, correct the "stripped" docs #656), the--mode validatetest, and theaether_statsenvoy_cc_tests +tag_extraction_testas the gate;proxy-releasebuilds the image.One decision this creates
The registry's only version is a main dev snapshot post-42890/#47217, which also contains envoy#45674 (hot-restart stat tags) and #45976. So the migration spike would, if deployed, put an Envoy
mainsnapshot in production — with the stat-tag fix ~6 weeks before v1.40.0. Whether that is acceptable (vs. migrating now but keeping v1.39.0 in production until1.40.0.envoyexists in the registry) is a policy call; noting it on #695.bpalermo commentedon Sep 5, 2026
Decision (2026-09-05, maintainer): migrate
proxy/to bzlmod now, followingenvoyproxy/examples/filter-cc, and land on Envoy's rollingmaindev snapshot from the envoyproxy bazel-registry (1.40.0-dev.<date>.<sha>.envoy) in production until the next stable release publishes a1.40.0.envoymodule — at which point the pin moves to that. Consequences accepted: the proxy runs an Envoymainsnapshot for ~6 weeks; envoy#45674 (hot-restart stat tags) and #45976 arrive with it, so #695's regex-workaround removal becomes a follow-up as soon as a proxy roll on talos confirms tag survival. Plan in progress; one PR inproxy/with the full gate (#656 symtab test,--mode validate, aether_stats tests, container-structure-test, both arches) beforeproxy-release.proxy: trim wasm + dynamic modules from the compiled-in extension set…
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697)
proxy: trim wasm + dynamic modules from the compiled-in extension set…
proxy: trim wasm + dynamic modules from the compiled-in extension set…
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697)
proxy: trim wasm + dynamic modules from the compiled-in extension set…
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697)
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697)
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697) (#705)
bpalermo commentedon Sep 5, 2026
Deployed and validated on talos-main — helm rev197, chart 0.92.2, 2026-09-05 19:06Z
First bzlmod-built proxy (
sha256:9e401334…, Envoy1.40.0-dev.20260904.13144fb.envoy, LLVM 22, wasm/dynamic-modules/hickory trimmed) is in production on all five nodes.Cross-version hot restart v1.39.0 → 1.40-dev, live-predecessor handoff on every node: liveness 0 / 6,294; authoritative mesh-DNS 0 / 6,297; forwarded path 2 timeouts / 6,297, both inside w02's handoff (26.79s, the slowest; others 18.1–20.4s). No alert fired;
MeshDNSWatcherInactive/EnvoyControlPlaneDisconnectedreached pending only (one-scrapewatch_activedip during the chart-wide roll). 0 restarts, taints[].Build provenance: digest confirmed on all pods; extension trim confirmed from the running config (
wasm0,dynamic_modules0,hickory0; controlslua2,aether_stats1);envoy_server_versionchanged0x4212e1 → 0x51ba12— that stat carries the aether build commit frombazel/get_workspace_status(previous value =4212e13, the last proxy-release commit; new value =51ba129, the #705 merge), so it is the intended build. Symbols: the 19:17Z debuginfo sync uploaded the new Envoy build ID80542d6b…(126 MB,executable-full) plus the five Go binaries; Pyroscope needs its warm-up before the next profile.Data path on the new Envoy/BoringSSL:
ssl_fail_verify_sanabsent (control-tested),foreign identityWARN 0,aether_requests_total24/24 series fully labelled (thestats_tagsregexes are still in place — retirement is the next PR), Envoy heap flat-to-lower per node vs the v1.39.0 generation.Not yet proven on this build: #638 under churn (only ~10 idle minutes so far; it has only ever fired under TRIPLE-style rolls) and sustained load. A soak on this build is the next real test.
Follow-ups tracked: #695 step 4 (regex retirement, PR in flight), re-pin to
1.40.0.envoywhen published, root@envoy_binary_linux_*bump for--mode validate, #703 (Actions PR permission) sobump-chartstops needing a hand-opened PR.docs(observability): refresh profiling-symbols for content-hash build…
docs(observability): explain why profile symbols decay after a release (