-
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
Cleanup usages of resolver.Target.Endpoint #5796
Comments
@easwars - any preference regarding how you'd like to modify tests to decouple reliance on deprecated Although I'm getting errors from dns_resolver, I feel like I've correctly cleaned up the usage locally. Since I'm new to Go, I'd like to double check that I'm going down the right path here. dns_resolver_test: logs
|
In tests, we could do something like this:
We can even consider writing a helper function in package testutils
func MustParseURL(u string) *url.URL {
// Call url.Parse on the argument and panic if it returns an error
} and have tests do something like this: If you do a change like this for all tests, you will end up touching a whole bunch of files. If you prefer, you can even consider splitting the change into a handful of PRs instead of one huge one. Thanks. |
Will do. Out of curiosity, how do you manage PRs that share the same dependency? Since this repo relies on rebasing, would cherry picking the commit that introduces the |
I haven't found a good way to work on set of PRs where each one depends on a previous one. I simply end up serializing them, and in parallel work on something unrelated :) |
FYI - since we'll be removing this deprecated field, I made these changes as part of this issue/PR. |
Upgrades to a newer version (v1.53.0) of google.golang.org/grpc that includes breaking changes to the resolver.Target type (see Cleanup usages of resolver.Target.Endpoint grpc/grpc-go#5796) Upgrade from v2.4.0 to v.4.0.0 of https://github.com/sercand/kuberesolver which is compatible to grpc to v1.53.0.
resolver.Target.Endpoint
is marked as deprecated, and we addedresolver.Target.URL
which is the more preferred way of getting to the details of the parsed target.We should add a helper function to retrieve the endpoint from a given
resolver.Target
. Something like:Codebase needs to be inspected for usages of
resolver.Target.Endpoint
and replaced with the above helper function.The text was updated successfully, but these errors were encountered: