Skip to content

Conversation

atollena
Copy link
Collaborator

@atollena atollena commented Apr 14, 2025

fixes #8213

There is a new API in that ring hash can now be used by importing google.golang.org/grpc/balancer/ringhash
instead of importing all of google.golang.org/grpc/xds.

RELEASE NOTES:

  • balancer/ringhash: move LB policy from xds/internal to exported path

@atollena atollena requested a review from arjan-bal April 14, 2025 10:00
@atollena atollena added Type: Internal Cleanup Refactors, etc Area: xDS Includes everything xDS related, including LB policies used with xDS. Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. labels Apr 14, 2025
@atollena atollena removed the request for review from arjan-bal April 14, 2025 10:00
@atollena atollena added this to the 1.73 Release milestone Apr 14, 2025
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.16%. Comparing base (7d68bf6) to head (9b037a8).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8249      +/-   ##
==========================================
+ Coverage   82.02%   82.16%   +0.13%     
==========================================
  Files         412      412              
  Lines       40477    40477              
==========================================
+ Hits        33201    33256      +55     
+ Misses       5897     5864      -33     
+ Partials     1379     1357      -22     
Files with missing lines Coverage Δ
balancer/ringhash/config.go 92.30% <100.00%> (ø)
balancer/ringhash/logging.go 100.00% <ø> (ø)
balancer/ringhash/picker.go 96.61% <100.00%> (ø)
balancer/ringhash/ring.go 100.00% <ø> (ø)
balancer/ringhash/ringhash.go 94.22% <100.00%> (ø)
internal/ringhash/ringhash.go 100.00% <ø> (ø)
xds/internal/resolver/serviceconfig.go 85.71% <100.00%> (ø)
...nal/xdsclient/xdslbregistry/converter/converter.go 70.62% <100.00%> (ø)

... and 27 files with indirect coverage changes

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

@arjan-bal
Copy link
Contributor

This test failure is in a new ringhash test, but probably not related to this PR: https://github.com/grpc/grpc-go/actions/runs/14454284376/job/40533854683?pr=8249

Copy link
Contributor

@arjan-bal arjan-bal left a comment

Choose a reason for hiding this comment

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

LGTM, adding a second reviewer.

@arjan-bal arjan-bal requested a review from dfawley April 15, 2025 05:43
@arjan-bal arjan-bal assigned dfawley and unassigned arjan-bal Apr 15, 2025
Copy link
Member

Choose a reason for hiding this comment

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

Please move this package under an internal directory. Or can we move it into the parent directory and just put it in the ringhash_test package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Curious: is setting the xds request hash something that anyone else would need to be able to do? E.g. for testing? I'm fine with leaving this as-is for now, but I'm also OK with making that functionality public if we think it might be needed.

Copy link
Collaborator Author

@atollena atollena Apr 17, 2025

Choose a reason for hiding this comment

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

The main problem here is a cross-language concern raised by Mark: see grpc/grpc#33356 (comment):

However, I am a little concerned about the complexity involved in exposing an interface to programmatically set the request's hash. When we discussed this earlier, we were thinking that this would probably just be something simple like "use a specific request header", which could just be built into the ring_hash policy. Exposing an API to allow applications to do this programmatically is a much broader API surface, and before going down that road, I'd like to be convinced that there's no simpler way to do this. Is there a way that we can handle your use-case without that complexity?

So I think that unless we are willing to provide functionalities that may not be available in other languages, it's better to limit the visibility to the xds use case.

Copy link
Member

Choose a reason for hiding this comment

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

SG. Sounds like users won't need to be able to set it this way for any testing, either, so let's keep it as is.

@dfawley dfawley assigned atollena and unassigned dfawley Apr 16, 2025
@atollena atollena assigned dfawley and unassigned atollena Apr 17, 2025
Copy link
Member

@dfawley dfawley left a comment

Choose a reason for hiding this comment

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

Thanks!

@dfawley dfawley merged commit 54e7e26 into grpc:master Apr 18, 2025
21 of 24 checks passed
@dfawley dfawley removed the Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. label Apr 18, 2025
@dfawley dfawley added Type: Feature New features or improvements in behavior and removed Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc labels Apr 18, 2025
janardhanvissa pushed a commit to janardhanvissa/grpc-go that referenced this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider moving ring hash out of the xds package
3 participants