grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

xds/clusterresolver: implement gRFC A61 changes for LOGICAL_DNS clusters

Open Pranjali-2501 opened this issue 1 month ago • 2 comments

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_DNS clusters now honor the LB policy configured in the cluster resource, rather than defaulting to a hardcoded pick_first policy.

Pranjali-2501 avatar Dec 01 '25 14:12 Pranjali-2501

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:

... and 25 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 01 '25 15:12 codecov[bot]

This change probably needs a release note.

easwars avatar Dec 01 '25 19:12 easwars