From de88d624399fd93295714a2f73dc380a75a4c3fb Mon Sep 17 00:00:00 2001 From: tkatimullin Date: Wed, 1 Jul 2026 13:16:02 +0300 Subject: [PATCH 1/3] feat(grpc): retry before recreating grpc client --- lib/components/grpc.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/components/grpc.ts b/lib/components/grpc.ts index 67aa086..6c1e754 100644 --- a/lib/components/grpc.ts +++ b/lib/components/grpc.ts @@ -1175,9 +1175,10 @@ export default function createGrpcAction( const shouldRetry = error && retries && - (options.grpcRetryCondition?.(error) ?? - isRetryableGrpcError(error)); - if (shouldRecreateService) { + (shouldRecreateService || + (options.grpcRetryCondition?.(error) ?? + isRetryableGrpcError(error))); + if (shouldRecreateService && !shouldRetry) { ctx.log( `Service client for ${config.protoKey} is going to be re-created`, ); From ee266fff810e4314ca6908802e5d0b31766f01b0 Mon Sep 17 00:00:00 2001 From: tkatimullin Date: Wed, 1 Jul 2026 13:37:32 +0300 Subject: [PATCH 2/3] fixup! feat(grpc): retry before recreating grpc client --- lib/components/grpc.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/components/grpc.ts b/lib/components/grpc.ts index 6c1e754..1d7d11e 100644 --- a/lib/components/grpc.ts +++ b/lib/components/grpc.ts @@ -1175,9 +1175,8 @@ export default function createGrpcAction( const shouldRetry = error && retries && - (shouldRecreateService || - (options.grpcRetryCondition?.(error) ?? - isRetryableGrpcError(error))); + (options.grpcRetryCondition?.(error) ?? + isRetryableGrpcError(error)); if (shouldRecreateService && !shouldRetry) { ctx.log( `Service client for ${config.protoKey} is going to be re-created`, From 72b9be7fb280451b30ba6c3cd3c4d9637d16d495 Mon Sep 17 00:00:00 2001 From: tkatimullin Date: Fri, 3 Jul 2026 10:36:12 +0300 Subject: [PATCH 3/3] feat: add DEADLINE_EXCEEDED grpc code in retriable code list --- lib/constants.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/constants.ts b/lib/constants.ts index f70ce22..06fe320 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -63,6 +63,7 @@ export const RETRYABLE_STATUS_CODES: Array = [ grpc.status.CANCELLED, grpc.status.ABORTED, grpc.status.UNKNOWN, + grpc.status.DEADLINE_EXCEEDED, ]; export const RECREATE_SERVICE_CODES: Array = [