Skip to content

Conversation

Zgoda91
Copy link

@Zgoda91 Zgoda91 commented Sep 10, 2025

implementing gRFC A65 proposal/pull/372.

This change contains:

  1. New aggregate ResourceAllocatingChannelCredentials class that holds a ChannelCredentials instance and associated list of Closeable objects representing resources allocated during given ChannelCredentials instantiation. Its main purpose is to maintain resource handles and allow the client class to release them when they are no longer needed.
  2. Postponed ChannelCredentials instantiation. Now the lifetime of ChannelCredentials object is bounded to the GrpcXdsTransport instance. When the transport layer is no longer needed we can safely release any resources allocated during ChannelCredentials creation.

@Zgoda91 Zgoda91 force-pushed the A65_postpone_channel_credentials_creation branch from e89b7a4 to 3767117 Compare September 10, 2025 13:08
Lifetime of `ChannelCredentials` is now bounded to `GrpcXdsTransport`
@Zgoda91 Zgoda91 force-pushed the A65_postpone_channel_credentials_creation branch from 3767117 to 82021c2 Compare September 10, 2025 14:40
Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

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

Changes look good, lets wait for approval on PR2 as well before merging.

public class ResourceAllocatingChannelCredentialsTest {
@Test
public void withoutBearerTokenDelegatesCall() {
ChannelCredentials channelChreds = new ChannelCredentials() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: channelCreds

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.

2 participants