Azure / Azure/azure-functions-durable-python

DTS - Failed activities return a broken error message

Offen
#562 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug fixed-in-v2 P2
Vorherrschende Sprache
Python
Sterne
157
Forks
70
Ø Merge
2 T. 10 Std.
Gemergte PRs (30 T.)
2

Beschreibung

🐛 **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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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`.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, python
Bereich
backend, distributed-systems
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.