FailureDetails.IsCausedBy throws
まだ誰も着手していません。
評価
調査の方向性
FailureDetails.isCausedBy() から開始し、retryContext 経由で failure にアクセスしたときに、failure のエラー型がどのようにシリアライズされ、再構築されるかを追跡します。提供されたカスタム retry handler と exception scenario を使用して、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時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 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 件 · 担当者 2 名 ·
microsoft/durabletask-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Card-Forge/forge#11998 ·