Azure / Azure/azure-functions-durable-js

Define semantics for CompoundTasks with no children

Open
#423 2 comments 0 reactions 0 assignees View on GitHub
breaking-change bug
Dominant language
TypeScript
Stars
142
Forks
66
Avg merge
3d 19h
Merged PRs (30d)
4

Description

Follow up to: https://github.com/Azure/azure-functions-durable-js/pull/405/files#r1068072395

Our CompoundTask can be constructed without any sub-tasks / children. We handle this case by immediately setting the Task to "Completed" See here:

https://github.com/Azure/azure-functions-durable-js/blob/66ba4a172687543624cbc89a6c3836c70721a1e7/src/task.ts#L226-L247

This is an edge case, and perhaps one that we should not have supported in the first place. Assuming we were to continue supporting it, we should determine how to set the Task's `isPlayed` property, which is used to set the `context.IsReplaying` flag. Today, the tasks' `isPlayed` property remains unchaged, meaning that it is `false` and so it runs the risk of changing the `context.IsReplaying` flag to `false` when it shouldn't.

Contributor guide

Open the contributing guide

Research direction

Start with the linked discussion and src/task.ts around lines 226-247, where an empty CompoundTask is immediately completed. Determine the intended isPlayed and context.IsReplaying semantics for this edge case, then establish the agreed behavior and update the implementation accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.