-
Notifications
You must be signed in to change notification settings - Fork 240
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
Update google.golang.org/grpc and remove WithBalancerName which is deprecated #914
Conversation
Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
trillian/ctfe/ct_server/main.go
Outdated
@@ -169,10 +169,10 @@ func main() { | |||
} | |||
res.InitialState(resolver.State{Addresses: addrs}) | |||
resolver.SetDefaultScheme(res.Scheme()) | |||
dialOpts = append(dialOpts, grpc.WithBalancerName(roundrobin.Name), grpc.WithResolvers(res)) | |||
dialOpts = append(dialOpts, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, roundrobin.Name)), grpc.WithResolvers(res)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the effort to keep some usage of the constants here, but given that this is a) difficult to read, and b) already contains a "magic string" for loadBalancingConfig
key anyway, I'd be tempted to do what https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/client/main.go#L77 does, here and below:
dialOpts = append(dialOpts, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, roundrobin.Name)), grpc.WithResolvers(res)) | |
dialOpts = append(dialOpts, grpc.WithDefaultServiceConfig(`{"loadBalancingConfig": [{"round_robin":{}}]}`), grpc.WithResolvers(res)) |
Is it just me, or is configuring options using json instead of a struct a bit weird? Anyway, thanks for doing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's probably a better idea to inline this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks so much the feedback and review
@cpanato Could you please ensure to run |
Signed-off-by: cpanato <ctadeu@gmail.com>
i already did, re-run
|
/gcbrun |
@mhutchinson any plans to have a release? |
@cpanato I wouldn't say that I had it on my TODO list, but it's probably about time we cut new releases. @pavelkalinnikov is making some changes that cross-cut some of the repos at the moment. When that flurry of work calms down, I think that would be a good time to cut releases of the various repos (this one, trillian, and transparency-dev/merkle are the main ones being affected at the moment). |
@cpanato hopefully you saw https://github.com/google/certificate-transparency-go/releases/tag/v1.1.3 :-) |
thank you @mhutchinson |
WithBalancerName
is deprecated and removed, using the recommended wayChecklist