feat(tonic-xds): add A39 HTTP filter registry and router filter - #2815
Open
mingley wants to merge 2 commits into
Open
feat(tonic-xds): add A39 HTTP filter registry and router filter#2815mingley wants to merge 2 commits into
mingley wants to merge 2 commits into
Conversation
Parse one HCM HttpFilter or RDS typed_per_filter_config Any: unwrap a single FilterConfig (overrides only) and TypedStruct, look up the type, and accept the terminal router filter. Nested wrappers NACK. Disabled override config is recorded, not rejected.
mingley
force-pushed
the
mingley/a39-http-filter-registry
branch
from
August 18, 2026 16:21
102cfdd to
4dcd1cf
Compare
macOS check failed in job setup while loading actions/checkout@v6 (corrupt action.yml). Other macOS jobs in the same run succeeded.
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
This implements gRFC A39.
What A39 does. The control plane can attach extra per-request rules to a gRPC client: delay this call, abort that one, and so on. Each rule is a labeled blob (
name+ proto type + bytes). The client keeps a dictionary of types it understands. Unknown required types reject the config; unknown optional types are ignored. Every filter list must end with the router filter, which is just a marker meaning "stop, now route."What this PR does. It adds that dictionary to
tonic-xdsand teaches it to read one blob.envoy.extensions.filters.http.router.v3.Router. We accept it and ignore its fields.FilterConfigis a box around the real config and can say "optional."TypedStructis a box that only names the inner type. We unwrap both before looking in the dictionary.ConfigDiscovery, anddisabled=trueare rejected. Router overrides are rejected (the router has no override message).It does not walk a listener's filter list, merge route overrides, or run anything on the request path.
What comes next.
HttpConnectionManager.http_filterson the Listener (empty list = implicit router).typed_per_filter_configon virtual hosts, routes, and weighted clusters.Part of #2444.
Testing Done
cargo fmt -p tonic-xds -- --checkcargo clippy -p tonic-xds --all-targets --all-features -- -D warningscargo test -p tonic-xds --lib http_filter— 23 passed (4dcd1cf3)