Skip to content
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 resolver.ClientConn NewAddress method is deprecated #30

Closed
GoosvandenBekerom opened this issue Oct 14, 2022 · 1 comment · Fixed by #48
Closed

grpc resolver.ClientConn NewAddress method is deprecated #30

GoosvandenBekerom opened this issue Oct 14, 2022 · 1 comment · Fixed by #48

Comments

@GoosvandenBekerom
Copy link

While looking through the code to understand it a bit better I saw that a deprecated method of the resolver.ClientConn interface is being used here https://github.com/sercand/kuberesolver/blob/master/builder.go#L240

https://pkg.go.dev/google.golang.org/grpc/resolver#ClientConn states that UpdateState should be used instead

image

@philipgriggs
Copy link

@sercand There's a few places where deprecated code from google.golang.org/grpc is being used (for example here). This breaks upstream dependencies when the version is set to google.golang.org/grpc v1.58.0

See github.com/grpc/grpc-go/releases/tag/v1.58.0

resolver: remove deprecated AddressType (grpc/grpc-go#6451)

This was previously used as a signal to enable the "grpclb" load balancing policy, and to pass LB addresses to the policy. Instead, balancer/grpclb/state.Set() should be used to add these addresses to the name resolver's output. The built-in "dns" name resolver already does this.

I think this line could just be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants