Wrap gRPC StatusRuntimeException across all client and worker gRPC calls
@bachuv arbeitet bereits daran.
Seit 07.4.2026.
- #278 von @copilot-swe-agent — ohne Merge geschlossen
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Summary
Most gRPC calls in the Java SDK let raw io.grpc.StatusRuntimeException escape to callers. The .NET SDK wraps RpcException (at minimum StatusCode.Cancelled → OperationCanceledException) for all entity client methods. The Java SDK should provide consistent domain-level exception wrapping so callers don't need to depend on gRPC types and so we can have .NET feature parity.
Current Behavior
The majority of gRPC methods across DurableTaskGrpcClient, GrpcDurableEntityClient, and DurableTaskGrpcWorker let StatusRuntimeException propagate unwrapped:
DurableTaskGrpcClient — no wrapping:
suspendInstance()resumeInstance()terminate()raiseEvent()createInstanceWithRaise()getInstanceMetadata()
DurableTaskGrpcClient — wraps specific codes only:
waitForInstanceStart()—DEADLINE_EXCEEDED→TimeoutExceptionwaitForInstanceCompletion()—DEADLINE_EXCEEDED→TimeoutExceptionpurgeInstances()—DEADLINE_EXCEEDED→TimeoutExceptionrewindInstance()—NOT_FOUND→IllegalArgumentException,FAILED_PRECONDITION→IllegalStateException
GrpcDurableEntityClient — no wrapping:
signalEntity()getEntityMetadata()queryEntities()cleanEntityStorage()
DurableTaskGrpcWorker — no wrapping:
completeActivityTask()completeOrchestratorTask()completeEntityTask()
Expected Behavior
gRPC transport exceptions should be translated into SDK-level exceptions. At minimum:
CANCELLED→CancellationException(closest Java equivalent to .NET'sOperationCanceledException)NOT_FOUND→IllegalArgumentExceptionor a dedicated not-found exceptionDEADLINE_EXCEEDED→TimeoutException(already done for some methods)
.NET SDK Reference
The .NET GrpcDurableEntityClient wraps RpcException for every entity method:
catch (RpcException e) when (e.StatusCode == StatusCode.Cancelled)
{
throw new OperationCanceledException(
$"The {nameof(this.SignalEntityAsync)} operation was canceled.", e, cancellation);
}
- Vorherrschende Sprache
- Java
- Sterne
- 29
- Forks
- 18
- Ø Merge
- 1 T. 10 Std.
- Gemergte PRs (30 T.)
- 2
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/durabletask-java
-
Needs: Triage :mag:
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
microsoft/durabletask-java#303 ·
-
Needs: Triage :mag:
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
microsoft/durabletask-java#290 · 2 Kommentare ·
-
Needs: Triage :mag:
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/durabletask-java#285 ·
-
Needs: Triage :mag:
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
microsoft/durabletask-java#276 ·
-
Needs: Triage :mag:
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
microsoft/durabletask-java#270 ·
Alle Issues in microsoft/durabletask-java
Ähnliche Issues
-
Bug Java Platform: Java
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
getsentry/sentry-java#6138 · 1 Kommentar ·
-
bug needs triage p2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
bug needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100