microsoft / durabletask-go

The Durable Task Framework is a lightweight, embeddable engine for writing durable, fault-tolerant business logic (orchestrations) as ordinary code.
Apache License 2.0
198 stars 25 forks source link

Cascade Terminate and Purge Support #47

Closed shivamkm07 closed 9 months ago

shivamkm07 commented 10 months ago

This PR fixes issues in current implementation of Cascade Terminate and adds support for cascade Purge. It is required to support https://github.com/dapr/dapr/issues/6393. As per current implementation,

This PR moves the recursive termination logic to backend side and so no SDK would need to have any implementation. Also it fixes the issue of failed orchestration blocking termination of its downstream sub-orchestrations.It also adds a new test to validate the both scenarios. (The second test added failed for the original implementation.)

This PR also implements Cascade Purge, similar to Cascade terminate and adds tests for the same. The Proto updates are corresponding to the protobuf updates: https://github.com/microsoft/durabletask-protobuf/pull/20

Fixes: #25

shivamkm07 commented 9 months ago

The PR validation is failing probably because the respective PR in durabletask-protobuf https://github.com/microsoft/durabletask-protobuf/pull/20 is not merged yet. Should pass after that

cgillum commented 9 months ago

@shivamkm07 the https://github.com/microsoft/durabletask-protobuf/pull/20 PR is merged. Please update the submodule reference in this PR so we can get the CI passing. I'll then proceed to sign off and merge this PR.

shivamkm07 commented 9 months ago

@shivamkm07 the microsoft/durabletask-protobuf#20 PR is merged. Please update the submodule reference in this PR so we can get the CI passing. I'll then proceed to sign off and merge this PR.

Done