FailureDetails.IsCausedBy throws
還沒有人認領這個 Issue。
評估
研究方向
從 FailureDetails.isCausedBy() 開始,追蹤 failure 的錯誤類型在透過 retryContext 存取時如何被序列化和重建。使用提供的自訂重試處理器和例外情境來重現此 failure。完成的標準是 isCausedBy() 能夠成功評估 cause class,並且為重現的案例提供涵蓋率。
由索引模型根據 Issue 內容生成。
描述
When an activity function throws an exception, and it is caught by a custom retry handler in an orchestrator, the retryContext allows accessing the FailureDetails for analysis of the failure. However, attempting to use the FailureDetails.isCausedBy() method will never succeed, as it internally is implemented using Class.forName() which requires the fully-qualified exception class name but FailureDetails does not have this information serialized, just the simple exception class name.
Repro:
@FunctionName("CustomRetryActivityFunction")
public String customRetryActivityFunction(
@DurableOrchestrationTrigger(name = "ctx") TaskOrchestrationContext ctx) {
TaskOptions options = new TaskOptions(retryContext -> {
FailureDetails lastFailure = retryContext.getLastFailure();
if (lastFailure != null
&& lastFailure.getErrorType().equals("OverflowException")
// This line should work, but doesn't
// && lastFailure.isCausedBy(InvalidOperationException.class)
&& retryContext.getLastAttemptNumber() < 3) {
return true;
}
return false;
});
return ctx.callActivity("RaiseComplexException", ctx.getInstanceId(), options, String.class).await();
}
``
- 主要語言
- Java
- 星號
- 29
- 分支
- 18
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 2
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/durabletask-java 的其他 Issue
-
Needs: Triage :mag:
難度 4/5 3-5 天 新手友好度 48/100
microsoft/durabletask-java#303 ·
-
Needs: Triage :mag:
難度 4/5 3-5 天 新手友好度 45/100
microsoft/durabletask-java#290 · 2 則留言 ·
-
Needs: Triage :mag:
難度 5/5 一週以上 新手友好度 35/100
microsoft/durabletask-java#285 ·
-
Needs: Triage :mag:
難度 3/5 1-2 天 新手友好度 68/100
microsoft/durabletask-java#276 ·
-
Enhancement
microsoft/durabletask-java#274 · 1 個 reaction · 已指派 2 人 ·
查看 microsoft/durabletask-java 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
bug needs triage p2
難度 2/5 1-3 小時 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 則留言 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
apache/rocketmq-dashboard#4654 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100