Skip to content

xds: Migrate Addresses usages to Endpoints#8804

Merged
arjan-bal merged 2 commits into
grpc:masterfrom
arjan-bal:migrate-address-usages-to-endpoints
Jan 7, 2026
Merged

xds: Migrate Addresses usages to Endpoints#8804
arjan-bal merged 2 commits into
grpc:masterfrom
arjan-bal:migrate-address-usages-to-endpoints

Conversation

@arjan-bal

Copy link
Copy Markdown
Contributor

This change migrates usages of ResolverState.Addresses to ResolverState.Endpoints. Prior to Dualstack support, xDS LB policies relied exclusively on the Addresses field. As part of the Dualstack initiative, these policies were updated to support both Endpoints and Addresses. This PR is the final step to deprecate the Addresses propagation logic in favor of relying solely on Endpoints.

RELEASE NOTES: N/A

@arjan-bal arjan-bal added this to the 1.79 Release milestone Jan 6, 2026
@arjan-bal arjan-bal added Type: Internal Cleanup Refactors, etc Area: xDS Includes everything xDS related, including LB policies used with xDS. labels Jan 6, 2026
@arjan-bal arjan-bal changed the title xds: Migrate Address usages to Endpoints xds: Migrate Addresses usages to Endpoints Jan 6, 2026
@codecov

codecov Bot commented Jan 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.28%. Comparing base (c6d5e5e) to head (f758dff).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
internal/xds/balancer/wrrlocality/balancer.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8804      +/-   ##
==========================================
+ Coverage   83.26%   83.28%   +0.02%     
==========================================
  Files         418      417       -1     
  Lines       33004    32978      -26     
==========================================
- Hits        27480    27465      -15     
+ Misses       4109     4100       -9     
+ Partials     1415     1413       -2     
Files with missing lines Coverage Δ
...rnal/xds/balancer/clusterresolver/configbuilder.go 94.07% <100.00%> (ø)
internal/xds/xds.go 74.35% <100.00%> (-6.20%) ⬇️
internal/xds/balancer/wrrlocality/balancer.go 75.71% <85.71%> (-1.00%) ⬇️

... and 26 files with indirect coverage changes

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

ai, ok := getAddrInfo(ep)
if !ok {
return fmt.Errorf("xds_wrr_locality: missing locality weight information in address %q", addr)
return fmt.Errorf("xds_wrr_locality: missing locality weight information in address %q", ep)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: s/in address/in endpoint/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Comment thread internal/xds/xds.go Outdated
return endpoint
}

// GetLocalityIDFromEndpoint returns the locality ID of ep.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Can we drop the Get from this function name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the function.

Comment thread interop/orcalb.go
}
}

// endpointsToAddrs flattens a list of endpoints to addresses to maintain

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please file an issue for this with enough details and mark it "Help Wanted" and link it in here? Thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #8809 and referenced it in the comment here.

@easwars easwars assigned arjan-bal and unassigned easwars and Pranjali-2501 Jan 6, 2026
@arjan-bal arjan-bal merged commit 900ffa9 into grpc:master Jan 7, 2026
14 checks passed
mbissa pushed a commit to mbissa/grpc-go that referenced this pull request Feb 16, 2026
This change migrates usages of ResolverState.Addresses to
ResolverState.Endpoints. Prior to Dualstack support, xDS LB policies
relied exclusively on the `Addresses` field. As part of the Dualstack
initiative, these policies were updated to support both `Endpoints` and
`Addresses`. This PR is the final step to deprecate the `Addresses`
propagation logic in favor of relying solely on `Endpoints`.

RELEASE NOTES: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants