Closed cretz closed 6 months ago
I don't think this is the right way to do this in Core. Core doesn't need to try to understand the types of exceptions thrown from lang. Lang can just set an explicit field on the response that says "this should fail the workflow".
Core doesn't need to try to understand the types of exceptions thrown from lang. Lang can just set an explicit field on the response that says "this should fail the workflow".
Completely agree. This is only very specifically for the one task failure type that core does understand - nondeterminism. People want to be able to say "core-based nondeterminism fails workflow". I just figured requesting a collection is more future proof, but it's only for this one case. But all the other cases of task failure lang for sure should handle.
Describe the solution you'd like
From https://github.com/temporalio/features/issues/322, need:
WorkerConfig.workflow_failure_errors: HashSet<WorkflowTaskFailureType>
(only value forWorkflowTaskFailureType
today isNondeterminism
)WorkerConfig.workflow_failure_errors_by_workflow_type: HashMap<String, HashSet<WorkflowTaskFailureType>>