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.ClientConnsince we no longer need to handle special cases around balancer name being specified through a dial optionWithDefaultServiceConfiginstead ofWithBalancerNamewherever applicableWithTransportCredentials(insecure.NewCredentials())instead ofWithInsecure()in tests already touched by the above changedefaultTestTimeoutwherever applicablesetupClientandsetupServerfunctions into test helpers and significantly reduce boiler plate in individual tests inhealthcheck_test.goFixes #5229
RELEASE NOTES:
WithBalancerName()API, deprecated over 4 years ago in Add dial option to set balancer #1697