Adds Grpc.newManagedChannel(String, ChannelCredentials, NameResolverR…#11901
Open
AgraVator wants to merge 12 commits intogrpc:masterfrom
Open
Adds Grpc.newManagedChannel(String, ChannelCredentials, NameResolverR…#11901AgraVator wants to merge 12 commits intogrpc:masterfrom
AgraVator wants to merge 12 commits intogrpc:masterfrom
Conversation
ejona86
reviewed
Feb 18, 2025
netty/src/test/java/io/grpc/netty/UdsNettyChannelProviderTest.java
Outdated
Show resolved
Hide resolved
ejona86
reviewed
Feb 19, 2025
20a6b37 to
6913156
Compare
4df7c4f to
4ee3512
Compare
ejona86
reviewed
Jan 16, 2026
2. removes visibleForTesting 3. improves the test case
…ResolverRegistry and NameResolverProvider.
2b54502 to
a627be6
Compare
7d98147 to
e65d7ca
Compare
ejona86
reviewed
Feb 26, 2026
Member
ejona86
left a comment
There was a problem hiding this comment.
This looks much closer to ready. I think the various components are in-place, we just need to tweak things.
core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
Outdated
Show resolved
Hide resolved
ejona86
reviewed
Apr 6, 2026
| * search the registry | ||
| * @return a {@link NewChannelBuilderResult} containing either the builder or an | ||
| * error description | ||
| * @since 1.79.0 |
| } | ||
|
|
||
| @VisibleForTesting | ||
| static ResolvedNameResolver getNameResolverProviderRfc3986( |
Member
There was a problem hiding this comment.
We also need to update this code path.
| provider = nameResolverRegistry.getProviderForScheme(targetUri.getScheme()); | ||
| // Use the explicit provider if its scheme matches the target URI. | ||
| if (nameResolverProvider != null | ||
| && targetUri.getScheme().equals(nameResolverProvider.getDefaultScheme())) { |
Member
There was a problem hiding this comment.
nameResolverProvider.getScheme()
| // the default scheme from the registry (if provider is not specified) or | ||
| // the provider's default scheme (if provider is specified). | ||
| String scheme = nameResolverProvider != null | ||
| ? nameResolverProvider.getDefaultScheme() |
Member
There was a problem hiding this comment.
It seems this should either be nameResolverRegistry.getDefaultScheme(), as that was what was used in ManagedChannelRegistry to look up this provider in the registry, or nameResolverProvider.getScheme() which was used as the key for this provider in the registry map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11055
Exposes a new method for channel creation which accepts NameResolverRegistry