Today, if a workflow terminates via cancellation with an in-progress update, the update caller sees a gRPC NOT FOUND error (because the server aborts the update after the workflow is closed).
This PR causes the caller to see WorkflowUpdateFailedError, which is what the caller sees in this situation with all other Temporal SDKs.
It does so by cancelling the asyncio Task representing the update handler execution; the resulting exception in the update handler coroutine causes the update to fail.
Fixes #575
Today, if a workflow terminates via cancellation with an in-progress update, the update caller sees a gRPC
NOT FOUND
error (because the server aborts the update after the workflow is closed).This PR causes the caller to see
WorkflowUpdateFailedError
, which is what the caller sees in this situation with all other Temporal SDKs.It does so by cancelling the asyncio
Task
representing the update handler execution; the resulting exception in the update handler coroutine causes the update to fail.How this was tested