Repository navigation
fix(proxy): aether_stats double-registration crash + boot/validate integration test - #198
Merged
Merged
Conversation
…ER_FACTORY
LEGACY_REGISTER_FACTORY registers the factory under BOTH factory.name() and
the deprecated-name macro argument. We passed the same string
("aether.filters.http.aether_stats") for both, so Envoy registered that name
twice and aborted at static initialization:
EnvoyException: Double registration for name: 'aether.filters.http.aether_stats'
This happens before main(), so the custom Envoy binary never booted. It was
not caught earlier because the unit test does not start a server and the
tar-driver image_test cannot execute the binary — it first surfaced rolling
the proxy on talos-main, where every new pod crash-looped (the roll was
held back by surge/maxUnavailable=0, so the data plane stayed up on the old
proxies, which then NACKed the new agent's TypedStruct listeners). Rolled the
release back; this is the fix.
Switch to REGISTER_FACTORY, which registers under name() only.
Add an Envoy HttpIntegrationTest that boots a real binary with the filter
wired as the agent emits it (xds.type.v3.TypedStruct), drives a request
through, and asserts aether.requests_total increments. This boots the binary
(catches the static-init abort) and resolves the factory by config type
(catches missing/renamed factory or config drift) — the coverage the unit
test and image_test cannot give. Passes on RBE (both IP versions).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Sep 26, 2026
…r QUIC mTLS) (#952) * proxy: bump the Envoy snapshot to 1.40.0-dev.20260926.726d7ac The envoy bazel-registry published its first new snapshot since 2026-09-04 this morning (registry #197/#198, commit 263a259e), and it carries the one upstream change proposal 038 Phase 4 was blocked on: envoyproxy/envoy#47623 "quic: make it support SDS for mTLS" (77d1a4a48e, 2026-09-25). At 13144fb a QUIC downstream that requires a client certificate is rejected at load unless its trust anchor is a static trusted_ca; the mesh's inbound validates callers against the SDS-served trust bundle, so the per-pod HTTP/3 inbound could not exist on the old pin ("QUIC downstream TLS context requires a client certificate but no validation_context.trusted_ca is configured", from `envoy --mode validate` on the generated bootstrap). After #47623 the load-time check only needs a validation context to be configured and the trust anchor is checked once SDS delivers it. Also in the 369 commits: #47219 (QUIC resumption default off), #47341 (optional client certificates), and #47217 "bazel: Remove WORKSPACE", which is what most of this diff is: - MODULE.bazel: envoy/envoy_api -> 20260926.726d7ac; the .envoy closure to what that snapshot requests (quiche 260922-7f07dc4, rules_rust 0.74.0, toolchains_llvm 1.9.1, envoy_toolshed via MVS) and abseil-cpp 20260817.0, rules_cc 0.2.25, googletest 1.18.0.bcr.1 likewise. googleurl and quiche leave the flag-only dep list: upstream no longer wires them from .bazelrc. - .bazelrc: registry -> 263a259e (comment rewritten with the why); the WORKSPACE-era `--@quiche//:*_impl_lib`, `--@grpc//third_party:*`, `--@googleurl//...`, `--@protobuf//:zlib`, `--@envoy//bazel:enable_bzlmod` and `--incompatible_enable_proto_toolchain_resolution` lines are gone (the registry modules carry those wirings now); upstream's new `--@envoy//bazel:deprecated_repo_arg_allowed=false`, `--@rules_rust//rust/settings:skip_fission_for_rust=true`, the rustfmt setting, and the renamed `--@protobuf//bazel/toolchains:prefer_prebuilt_protoc` with its THIS_CC_TOOLCHAIN_IS_BROKEN guard are in. - BUILD.bazel + aether_stats/BUILD: the deprecated `repository = "@envoy"` argument dropped from every envoy_cc_* macro call -- the strict flag above refuses it, as upstream does. - build_config: 345 upstream extensions - 32 dropped = 313 compiled in. - MODULE.bazel.lock regenerated (bazel mod deps). Proven locally: `bazel mod deps` resolves the whole closure at 263a259e, `bazel mod explain` selects exactly the pinned versions, and `bazel build --nobuild --config=release //:envoy` analyzes clean (46,159 targets). The compile itself is the `proxy` workflow's job (both arches, RBE). scripts/check-envoy-api-parity.sh: OK (bindings v1.39, proxy 1.40-dev). Docs: proxy README/image_metadata example strings, runbook pin string, and 038's Q4 answered. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * proxy: emit STABLE_CERT_EPOCH_YEAR for Envoy's build-time test certificates envoyproxy/envoy#47255 (in the 726d7ac snapshot) generates Envoy's integration test certificates at build time, stamped from STABLE_CERT_EPOCH_YEAR in bazel-out/stable-status.txt. Upstream's get_workspace_status emits it; ours did not, so both proxy CI legs failed in @envoy//test/config/integration/certs: certs_gen for the one target that links Envoy's test utilities (aether_stats_integration_test). The //:envoy binary itself analyzed and built. Mirrors upstream: `date -u +%Y`. Proven locally: `bazel build @envoy//test/config/integration/certs:certs`. 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]>
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.
What happened
The first in-vivo roll of the native
aether_statsextension on talos-main crash-looped every new proxy pod:LEGACY_REGISTER_FACTORY(FACTORY, BASE, DEPRECATED_NAME)registers the factory under bothfactory.name()andDEPRECATED_NAME. We passed the same string for both, so the name was registered twice and Envoy aborted at static init — beforemain(), so the binary never booted.It slipped through because the unit test doesn't start a server and the tar-driver
image_testcan't execute the binary. The roll was held back by surge/maxUnavailable=0(data plane stayed up on the old proxies), but the new agent had already switched to theTypedStructconfig, so the old proxies NACKed those listeners. I rolled the release back to the matched revision; cluster is healthy.Fix
REGISTER_FACTORY(registers undername()only).HttpIntegrationTest(aether_stats_integration_test.cc) that boots a real Envoy with the filter wired exactly as the agent emits it (xds.type.v3.TypedStruct, inner typeaether.filters.http.aether_stats.v3.Config), drives a request through, and assertsaether.requests_totalincrements. This:Verification
bazel test //source/extensions/filters/http/aether_stats:aether_stats_integration_test(and the unit test) pass on RBE, both IP versions.Follow-up (separate)
Once merged, proxy-release republishes the proxy image at the new commit; then re-pin the chart and re-run the talos-main e2e.
🤖 Generated with Claude Code