xds: refactor xdsresource.Endpoint to add resolver.Endpoint (gRFC A81)#8750
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8750 +/- ##
==========================================
+ Coverage 83.28% 83.45% +0.16%
==========================================
Files 418 419 +1
Lines 32367 32566 +199
==========================================
+ Hits 26958 27178 +220
+ Misses 4034 4011 -23
- Partials 1375 1377 +2
🚀 New features to boost your workflow:
|
easwars
reviewed
Dec 8, 2025
easwars
previously approved these changes
Dec 10, 2025
easwars
reviewed
Dec 10, 2025
We need more discussion on safely copying resolver.Endpoint and resolver.Address structs.
easwars
reviewed
Dec 15, 2025
easwars
approved these changes
Dec 16, 2025
Pranjali-2501
added a commit
that referenced
this pull request
Jan 5, 2026
…icy (gRFC A81) (#8779) This PR implements the xDS :authority header rewriting feature as specified in [gRFC A81](https://github.com/grpc/proposal/blob/master/A81-xds-authority-rewriting.md) ### Key Changes: * xds_cluster_impl LB Policy: * Updated the Picker to check for the auto_host_rewrite flag (passed via ConfigSelector). * If enabled, the picker retrieves the hostname attribute from the subchannel . * The picker populates the Metadata field in PickResult with the new :authority value. * changes in stream.go: * Updated stream.go to inspect the PickResult metadata. If an :authority override is present and the user has not explicitly set an authority via CallOption, the `callHdr.Authority` is updated with hostname. * PR relies on the following changes already merged: * Bootstrap config change (#8692): Added the trusted_xds_server server feature to the bootstrap configuration. * xDS resource validation (#8728): Implemented validation and extraction of the auto_host_rewrite field from RDS resources and the hostname field from EDS resources. * Endpoint Structure (#8750): Refactored xdsresource.Endpoint to use resolver.Endpoint, ensuring that attributes (like the endpoint's hostname) are correctly stored and accessible to the picker. * xDS ConfigSelector changes (#8740): Updated the xDS resolver to propagate the auto_host_rewrite flag from the Route Configuration to the Load Balancer via the ConfigSelector. RELEASE NOTES: * xDS: Added support for the :authority rewriting (gRFC A81). When `autoHostRewrite` is enabled in the xDS RouteConfiguration, the client will rewrite the HTTP/2 :authority header to the value of the selected endpoint's hostname.
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.
This PR updates the internal
xdsresource.Endpointstruct to contain aresolver.Endpointinstead of a[]stringto store the list of addresses associated with the endpoint gRFC A81. This change standardizes how backend information is stored and ensures that attributes (such as Hostname) are correctly associated with the endpoint hierarchy.Key Changes:
Struct Update:
xdsresource.Endpointnow includes aResolverEndpointfield (of typeresolver.Endpoint) to store addresses and attributes. Remove the existingAddressfield (of type[]string) and store address as aresolver.Endpointfield.Attribute Handling:
SetHostnameandGetHostnamehelpers to manage hostname metadata withinresolver.Endpoint.Attributes.Parsing Logic:
parseEndpointsinunmarshal_eds.goto correctly populate theresolver.Endpointobject.RELEASE NOTES: N/A