temporalio / sdk-python

Temporal Python SDK
MIT License
473 stars 77 forks source link

New API to wait for handler executions to complete and warnings on unfinished handler executions #556

Closed dandavison closed 5 months ago

dandavison commented 5 months ago

Closes #538

Implementation ready for review; names are still under discussion.

What was changed

Why?

Workflows exiting while handler executions are in progress is an important category of run-time workflow incorrectness.

dandavison commented 5 months ago

This PR was missing one thing -- it didn't address cancellation. Discussed with @cretz in a different channel and we agreed that it was a bug that the CancelWorkflowExecution command was not being defined to be a workflow "completion" by the SDK. Recent commits fix that bug and add the test coverage that this PR had been missing regarding cancellation.