Skip to content

Adds Grpc.newManagedChannel(String, ChannelCredentials, NameResolverR…#11901

Open
AgraVator wants to merge 12 commits intogrpc:masterfrom
AgraVator:adds-new-channel-builder-with-name-resolver-registry
Open

Adds Grpc.newManagedChannel(String, ChannelCredentials, NameResolverR…#11901
AgraVator wants to merge 12 commits intogrpc:masterfrom
AgraVator:adds-new-channel-builder-with-name-resolver-registry

Conversation

@AgraVator
Copy link
Copy Markdown
Contributor

@AgraVator AgraVator commented Feb 17, 2025

Fixes #11055
Exposes a new method for channel creation which accepts NameResolverRegistry

@AgraVator AgraVator force-pushed the adds-new-channel-builder-with-name-resolver-registry branch from 20a6b37 to 6913156 Compare December 24, 2025 10:24
@AgraVator AgraVator requested a review from ejona86 December 24, 2025 10:25
@AgraVator AgraVator force-pushed the adds-new-channel-builder-with-name-resolver-registry branch from 4df7c4f to 4ee3512 Compare January 16, 2026 08:20
@AgraVator AgraVator force-pushed the adds-new-channel-builder-with-name-resolver-registry branch from 2b54502 to a627be6 Compare February 25, 2026 18:07
@AgraVator AgraVator requested a review from ejona86 February 25, 2026 18:08
@AgraVator AgraVator force-pushed the adds-new-channel-builder-with-name-resolver-registry branch 2 times, most recently from 7d98147 to e65d7ca Compare February 25, 2026 18:57
Copy link
Copy Markdown
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks much closer to ready. I think the various components are in-place, we just need to tweak things.

@AgraVator AgraVator requested a review from ejona86 March 17, 2026 15:43
* search the registry
* @return a {@link NewChannelBuilderResult} containing either the builder or an
* error description
* @since 1.79.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjust version.

}

@VisibleForTesting
static ResolvedNameResolver getNameResolverProviderRfc3986(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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 this pull request may close these issues.

Add Grpc.newManagedChannel(String, ChannelCredentials, NameResolverRegistry)

2 participants