Skip to content

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

Merged
AgraVator merged 13 commits into
grpc:masterfrom
AgraVator:adds-new-channel-builder-with-name-resolver-registry
Jun 17, 2026
Merged

Adds Grpc.newManagedChannel(String, ChannelCredentials, NameResolverR…#11901
AgraVator merged 13 commits into
grpc:masterfrom
AgraVator:adds-new-channel-builder-with-name-resolver-registry

Conversation

@AgraVator

@AgraVator AgraVator commented Feb 17, 2025

Copy link
Copy Markdown
Contributor

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

Comment thread api/src/main/java/io/grpc/Grpc.java Outdated
Comment thread netty/src/test/java/io/grpc/netty/UdsNettyChannelProviderTest.java Outdated
Comment thread api/src/main/java/io/grpc/Grpc.java Outdated
Comment thread netty/src/test/java/io/grpc/netty/UdsNettyChannelProviderTest.java
@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
Comment thread netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java Outdated
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
@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

@ejona86 ejona86 left a comment

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.

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

Comment thread api/src/main/java/io/grpc/ManagedChannelRegistry.java
Comment thread api/src/main/java/io/grpc/Grpc.java
Comment thread api/src/main/java/io/grpc/Grpc.java Outdated
Comment thread api/src/main/java/io/grpc/ManagedChannelProvider.java Outdated
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java Outdated
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
@AgraVator
AgraVator requested a review from ejona86 March 17, 2026 15:43
Comment thread api/src/main/java/io/grpc/ManagedChannelProvider.java Outdated
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java Outdated
Comment thread core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java Outdated
@AgraVator
AgraVator requested a review from ejona86 April 14, 2026 16:48

@ejona86 ejona86 left a comment

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.

The version number will need to be updated again.

* @since 1.40.0
* */
protected String getScheme() {
public String getScheme() {

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.

The review was held up to see if this change would cause problems. It potentially could, but I suspect all implementations of NameResolverProvider today are not implementing getScheme() and instead just implementing getDefaultScheme(). Not even delegating NRPs like SecretGrpclbNameResolverProvider and GoogleCloudToProdNameResolverProvider have getScheme() implemented. (Nor are there any implementations of getScheme() inside google3.) So this is a better time to make it public.

@AgraVator
AgraVator merged commit 2b86f8f into grpc:master Jun 17, 2026
23 of 25 checks passed
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