xds/clusterresolver: implement gRFC A61 changes for LOGICAL_DNS clusters
Fixes : #8153
This PR implements the "Changes to Logical DNS Clusters" section of gRFC A61 (IPv4/IPv6 Dual-stack Backends).
Currently, LOGICAL_DNS clusters in the xDS cluster resolver have their Load Balancing policy hard-coded to pick_first. This ensures the semantics of connecting to only one address at a time.
This PR updates the xds_cluster_resolver logic. The buildClusterImplConfigForDNS function removes the hard-coded pick_first policy restriction for LOGICAL_DNS clusters, allowing them to use the configured LB policy.
Also, in the DNS update handler, all resolved addresses are now grouped into a single resolver.Endpoint. This ensures that regardless of the configured parent LB policy, the child policy sees a single "backend" endpoint containing all addresses.
RELEASE NOTES:
- xds:
LOGICAL_DNSclusters now honor the LB policy configured in the cluster resource, rather than defaulting to a hardcodedpick_firstpolicy.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 83.45%. Comparing base (6ed8acb) to head (fa9a279).
Additional details and impacted files
@@ Coverage Diff @@
## master #8733 +/- ##
==========================================
+ Coverage 83.39% 83.45% +0.06%
==========================================
Files 419 419
Lines 32566 32572 +6
==========================================
+ Hits 27159 27184 +25
+ Misses 4023 4013 -10
+ Partials 1384 1375 -9
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...rnal/xds/balancer/clusterresolver/configbuilder.go | 94.44% <100.00%> (+0.37%) |
:arrow_up: |
| .../balancer/clusterresolver/resource_resolver_dns.go | 74.19% <100.00%> (-1.20%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This change probably needs a release note.