Skip to content

[release/2.1] Fix lazy gRPC connection mode waiting for connect on client creation #12079

Merged
estesp merged 1 commit intocontainerd:release/2.1from
k8s-infra-cherrypick-robot:cherry-pick-11509-to-release/2.1
Jul 10, 2025
Merged

[release/2.1] Fix lazy gRPC connection mode waiting for connect on client creation #12079
estesp merged 1 commit intocontainerd:release/2.1from
k8s-infra-cherrypick-robot:cherry-pick-11509-to-release/2.1

Conversation

@k8s-infra-cherrypick-robot

This is an automated cherry-pick of #11509

/assign estesp

When moving to gRPC 1.64 (commit 63b4688) the usage of the deprecated
`grpc.DialContext` was replaced with `grpc.NewClient`. However, this
change also required to drop the `WithBlock` option, which made sure
that the connection is actually established before returning.

Now, `grpc.NewClient` doesn't attempt to perform the connection but
defers it to the actual first RPC.

Querying the default runtime on client creation breaks that property
depending on whether the default namespace is set or not.

This commit defers the `runtime` field initialization to the first time
the field is actually needed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@k8s-ci-robot
Copy link

Hi @k8s-infra-cherrypick-robot. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-project-automation github-project-automation bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 10, 2025
@estesp estesp merged commit 930b0f1 into containerd:release/2.1 Jul 10, 2025
56 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Jul 10, 2025
@dmcgowan dmcgowan changed the title [release/2.1] client/New: Don't unlazy the gRPC connection implicitly [release/2.1] Fix lazy gRPC connection mode waiting for connect on client creation Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants