Azure / Azure/azure-functions-durable-python

DTS - Failed activities return a broken error message

オープン
#562 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug fixed-in-v2 P2
主要言語
Python
スター
157
フォーク
70
平均マージ
2日 10時間
マージ済み PR(30日)
2

説明

🐛 **Describe the bug**
In AzureStorage or MSSQL, if an activity function fails, the orchestrator gets back an exception with relevant information about how the activity failed.
In DTS, you get back None

🤔 **Expected behavior**
When an activity function fails, the yield statement from the orchestrator should throw an exception with relevant information about how the activity failed, including the message from the exception thrown by the activity.

☕ **Steps to reproduce**
Orchestrator and activity:
```python

@bp.orchestration_trigger(context_name="context", orchestration="CatchActivityException")
def catch_activity_exception(context: df.DurableOrchestrationContext):
try:
yield context.call_activity('raise_exception', context.instance_id)
except Exception as e:
logging.error(f"Caught exception: {e}")
return f"Caught exception: {e}"

@bp.activity_trigger(input_name="instance")
def raise_exception(instance: str) -> str:
global attempt_count
if instance not in attempt_count:
attempt_count[instance] = 1
raise InvalidOperationException(f"This activity failed")
return "This activity succeeded"
```

The return value for Azure Storage/MSSQL:

```
Caught exception: Activity function 'raise_exception' failed:
```

The return value for DTS:
```
Caught exception: None \n None
```

⚡**If deployed to Azure**
N/A

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the DTS path used by context.call_activity and compare how failed activity exceptions are propagated with the Azure Storage and MSSQL paths described in the issue. Reproduce the CatchActivityException orchestration and verify that the caught exception includes the activity failure message instead of `None`.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
backend, distributed-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。