-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grpc: delete deprecated API WithBalancerName() #5232
Conversation
Hi! I'm here from the new release notes. I think there is some confusion going on, because the release notes (and this PR) claims that |
For use cases that set the balancer for the client, - grpc.WithBalancerName(balancerName)
+ grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, balancerName)) Note that there can be problems if the client receives service configs later with different load balancing policy (or without load balancing policy). The newer service config will override the default service config. |
…eprecated for 2 years grpc/grpc-go#5232
* upgrade grpc to v1.47.0 & address deleted WithBalancerName that was deprecated for 2 years grpc/grpc-go#5232 * restore go.mod and go.sum
* upgrade grpc to v1.47.0 & address deleted WithBalancerName that was deprecated for 2 years grpc/grpc-go#5232 * restore go.mod and go.sum
* upgrade grpc to v1.47.0 & address deleted WithBalancerName that was deprecated for 2 years grpc/grpc-go#5232 * restore go.mod and go.sum
Changelog: grpc/grpc-go@v1.36.1...v1.49.0 The biggest change for us is that grpc.WithBalancerName has transitioned from deprecated to fully removed. The fix is to replace it with a JSON-formatted "default config" object, as demonstrated in grpc/grpc-go#5232 (comment). This should unblock updating other dependencies which want to transitively update gRPC as well.
Summary of changes:
WithBalancerName()
API which has been deprecated for ages now.ClientConn
since we no longer need to handle special cases around balancer name being specified through a dial optionWithDefaultServiceConfig
instead ofWithBalancerName
wherever applicableWithTransportCredentials(insecure.NewCredentials())
instead ofWithInsecure()
in tests already touched by the above changedefaultTestTimeout
wherever applicablesetupClient
andsetupServer
functions into test helpers and significantly reduce boiler plate in individual tests inhealthcheck_test.go
Fixes #5229
RELEASE NOTES:
WithBalancerName()
API, deprecated over 4 years ago in Add dial option to set balancer #1697