xds-client: add value-based transport config to server key - #2835
Open
W4lspirit wants to merge 1 commit into
Open
xds-client: add value-based transport config to server key#2835W4lspirit wants to merge 1 commit into
W4lspirit wants to merge 1 commit into
Conversation
W4lspirit
marked this pull request as ready for review
August 25, 2026 11:53
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 changed
ServerConfigvalue-comparable and hashable using its URI and optional transport configuration.TransportConfig, an opaque transport-owned value that preserves concrete-type equality and hashing behind anArcand supports typed downcasting.Arcs while the ADS worker reconnects, so the same immutable configuration is passed to the transport builder.Why
xDS federation will need to de-duplicate management-server channels by server configuration instead of URI alone. Transport settings such as the selected channel credentials must participate in that key so two definitions with the same URI but different connection settings do not accidentally share a channel.
Requiring transport values to implement
Eq + Hashmakes this a compile-time contract. It avoids a separate manually maintained identity string that could diverge from the value consumed by the transport.Scope
This is the first server-key building block, not complete gRFC A47 support. The current key covers URI and transport configuration only. Known server features, including the legacy
ignore_resource_deletionbehavior from gRFC A53/A88, must participate when those features are modeled.TransportConfigis intentionally transport-only. It is passed throughServerConfigtoTransportBuilder; it is not a general extension mechanism and is not exposed to resource decoders. Wiring concrete per-server credentials into the tonic transport is also left for follow-up work.I'll eventually update the transport builder trait to only use the server identifier(uri+transportConfig) instead of the ServerConfig.
Validation
cargo test -p xds-client client::config::testscargo clippy -p xds-client --all-targets -- -D warningscargo doc -p xds-client --no-depscargo fmt --all -- --checkPart of #2795.