-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
core, netty, okhttp: implement new logic for nameResolverFactory API in channelBuilder #10590
Conversation
…in channelBuilder fix ManagedChannelImpl to use NameResolverRegistry instead of NameResolverFactory fix the ManagedChannelImplBuilder and remove nameResolverFactory
0999267
to
4471328
Compare
alts/src/test/java/io/grpc/alts/internal/GoogleDefaultProtocolNegotiatorTest.java
Outdated
Show resolved
Hide resolved
@@ -159,6 +160,22 @@ static List<Class<?>> getHardCodedClasses() { | |||
return Collections.unmodifiableList(list); | |||
} | |||
|
|||
public static NameResolverProvider getNameResolverProvider( |
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.
Would it make sense to pass in supported address types here and let this code do the verification? That would then mirror ManagedChannelRegistry. We might need a "null means all addresses are supported" though...
FYI @markb74, we're adding in checks to notice earlier if the NameResolver returns addresses that aren't supported by the transport. A mis-match was causing pretty confusing errors. I think we should be able to migrate any binder stuff easily, but if not, we should be able to punch holes to disable the check. |
…s for socket type
Addressed all comments. PTAL |
Friendly ping @ejona86 |
Actually creating the name resolver is new delayed to the end of ManagedChannelImpl.getNameResolver; we don't want to call into the name resolver to determine if we should use the name resolver. Added getDefaultScheme() to NameResolverRegistry to avoid needing NameResolver.Factory.
@sanjaypujare, I just pushed a commit. Take a look at it and tell me how you feel about it. |
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.
For the last commit from @ejona86 : looks good. Just have 2 comments. Will discuss offline and get them resolved
…ory API in channelBuilder (grpc#10590)" This reverts commit 15fc70b.
fix ManagedChannelImpl to use NameResolverRegistry instead of NameResolverFactory fix the ManagedChannelImplBuilder and remove nameResolverFactory