client/New: Don't unlazy the gRPC connection implicitly#11509
client/New: Don't unlazy the gRPC connection implicitly#11509dmcgowan merged 1 commit intocontainerd:mainfrom
Conversation
|
Hi @vvoland. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
5087ee1 to
22e2308
Compare
22e2308 to
e88841d
Compare
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>
e88841d to
8bc62da
Compare
|
/cherry-pick release/2.1 |
|
/cherry-pick release/2.0 |
|
@estesp: new pull request created: #12079 DetailsIn response to this:
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. |
|
@estesp: new pull request created: #12080 DetailsIn response to this:
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. |
client.Newdoesn't respect the timeout (v2) #11507When moving to gRPC 1.64 (commit 63b4688) the usage of the deprecated
grpc.DialContextwas replaced withgrpc.NewClient. However, this change also required to drop theWithBlockoption, which made sure that the connection is actually established before returning.Now,
grpc.NewClientdoesn'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 moves the
runtimefield initialization behind async.Onceand defers it to the first time the field actually needs to be used.