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
Breaking change in NameResolverProvider with latest release #5556
Comments
We took care of the migration of the implementors of |
Thanks for your help. |
@ST-DDT I noticed that you are putting custom attributes. After switching away from the Attraibutes params, you will no longer be able to do it. Can you file a feature request issue to tell us about your use case, so that we can add the support for it in the new Helper-based API? |
We assumed that we were the only caller. Turns out there are forwarding NameResolver too. Implementing the old override will give them time to migrate to the new API. Resolves grpc#5556
What version of gRPC are you using?
1.19.0
What did you expect to see?
I use yidongnan/grpc-spring-boot-starter 2.3.0 and use custom NameResolvers to connect remote services. Due to interoperability conflicts with java's service loaders I cannot directly access/use the provided grpc NameResolvers and have to first use spring logic to determine the remote host before using the NameResolvers.
Due to the changes introduced in grpc-java 1.19 (method parameter change) I am now unable to
use the 1.18 API with NameResolverProviders.
The change in https://github.com/grpc/grpc-java/pull/5345/files#diff-0b140e8a0a77a6eda416c5a42033462b simply exchanged the parameters without providing a method for backwards compatibility.
Due to this change I'm unable to provide support for either <=1.18 or >=1.19 versions.
I know that at some point the other method will be removed, but I hope to have some time for migration.
ConfigMappedNameResolverFactory (springNameResolver)
Did you forget to add the method override or is it intentional?
TLDR
Temporarily re-add
io.grpc.NameResolverProvider.NameResolverFactory#newNameResolver(URI targetUri, Attributes params)
and delegate it to the other method.Related
The text was updated successfully, but these errors were encountered: