Azure / Azure/azure-functions-durable-js

DurableOrchestrationClient.getStatusAll fails if there is a terminated orchestration instance

Open
#94 5 comments 0 reactions 0 assignees View on GitHub
bug P1
Dominant language
TypeScript
Stars
142
Forks
66
Avg merge
3d 19h
Merged PRs (30d)
4

Description

*From an internal CRI -- 129336626*

> [PROBLEM DESCRIPTION]
>
> This issue is consistently reproducible. For a JavaScript durable function, if DurableOrchestrationClient.getStatusAll is called while there is a terminated orchestration instance, the call always fails. Sample error by log streaming (in instances.forEach, instances is what's returned by getStatusAll):
> ```
> [Error] Executed 'Functions.DurableFunctionsHttpStart' (Failed, Id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)Result: FailureException: TypeError: instances.forEach is not a functionStack: TypeError: instances.forEach is not a functionat module.exports (D:\home\site\wwwroot\DurableFunctionsHttpStart\index.js:45:23)at at process._tickCallback (internal/process/next_tick.js:188:7)
> ```
>
> [TROUBLESHOOTING STEPS]
>
> For a terminated orchestration instance, the Output column in the table DurableFunctionsHubInstances contains undefined. If the value is manually changed to a string value or to null, getStatusAll succeeds. Since undefined is not a valid JSON value, it seems some serialization operation is failing.
>
> This issue doesn't show up for C# durable functions.

Contributor guide

Open the contributing guide

Research direction

The repro entry point is DurableOrchestrationClient.getStatusAll, with the failing consumer shown at index.js:45:23; start by tracing how a terminated instance's undefined Output is serialized from DurableFunctionsHubInstances. Done means getStatusAll returns a usable status collection for terminated instances, with regression coverage for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.