Wrap gRPC StatusRuntimeException across all client and worker gRPC calls
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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);
}
- Lingua principale
- Java
- Stelle
- 29
- Fork
- 18
- Merge medio
- 1g 10h
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/durabletask-java
-
Needs: Triage :mag:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
microsoft/durabletask-java#303 ·
-
Needs: Triage :mag:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoft/durabletask-java#290 · 2 commenti ·
-
Needs: Triage :mag:
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
microsoft/durabletask-java#285 ·
-
Needs: Triage :mag:
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
microsoft/durabletask-java#276 ·
-
Needs: Triage :mag:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
microsoft/durabletask-java#270 ·
Tutte le issue di microsoft/durabletask-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
spring-projects/spring-modulith#1895 ·