Warn or error when update handlers dangle across CAN or workflow exit
We can recommend the await-all-handlers or drop-all-handlers methods. TBD whether error or warning.
I've merged the first PR, for Python: https://github.com/temporalio/sdk-python/pull/556
The basic spec that that PR's proposing for other SDKs is
-
Workflow code can wait on a method named similarly to
workflow.all_handlers_finished() -
By default, the worker will emit
workflow.UnfinishedUpdateHandlersWarningandworkflow.UnfinishedSignalHandlersWarningif any handlers of those types are unfinished when the workflow completes (cancellation, failure, success). See PR for wording of message. -
These warnings are controlled by a policy whose default value is
workflow.HandlerUnfinishedPolicy.WARN_AND_ABANDON -
Users can silence the warning on a per-handler basis by setting unfinished_policy to
workflow.HandlerUnfinishedPolicy.ABANDON -
Tests should verify the above for worker-side workflow exit via cancellation, failure, and success