temporalio / temporalio/features

[Feature Request] Configurable workflow failure exception types

Open
#322 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cdutrkgkteivjjuckjjvehvtledkdhdigcbk enhancement
Dominant language
Go
Stars
32
Forks
28
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Describe the solution you'd like

We need to let users choose what fails the workflow vs what just fails the task today. Go and Java already have some form of this. To do:

  • Go - https://github.com/temporalio/sdk-go/issues/1387
    • Worker task failure - WorkflowPanicPolicy exists (panics are the only task failures today)
    • Workflow task failure - Need workflow.RegisterOptions.WorkflowPanicPolicy (or do we?)
  • Java - https://github.com/temporalio/sdk-java/issues/1987
    • Worker task failure - Need WorkerOptions.Builder.setFailWorkflowExceptionTypes​(...Throwable) (or do we?)
    • Workflow task failure - WorkflowImplementationOptions.Builder.setFailWorkflowExceptionTypes​(...Throwable) exists
  • Core - https://github.com/temporalio/sdk-core/issues/656
    • Worker task failure - Need WorkerConfig.workflow_failure_errors: HashSet<WorkflowTaskFailureType> (only value for WorkflowTaskFailureType today is Nondeterminism)
    • Workflow task failure - Need WorkerConfig.workflow_failure_errors_by_workflow_type: HashMap<String, HashSet<WorkflowTaskFailureType>>
  • TS - https://github.com/temporalio/sdk-typescript/issues/1358
    • Worker/workflow task failure - Need WorkerOptions.workflowFailureErrorTypes: Record<string|'*', Array<Error>>
      • Note, if type set contains DeterminismViolationError then core side should be set
  • Python - https://github.com/temporalio/sdk-python/issues/446
    • Worker task failure - Need workflow_failure_exception_types: Set[Type[Exception]] on Worker constructor
    • Workflow task failure - Need failure_exception_types: Set[Type[Exception]] on @workflow.defn decorator
      • Note, if type set contains NondeterminismError then core side should be set
  • .NET - https://github.com/temporalio/sdk-dotnet/issues/166
    • Worker task failure - Need IReadOnlyCollection<Type> WorkflowFailureExceptionTypes on TemporalWorkerOptions
    • Workflow task failure - Need Type[] FailureExceptionTypes on WorkflowAttribute and IReadOnlyCollection<Type> FailureExceptionTypes on WorkflowDefinition
      • Note, if type set contains InvalidWorkflowOperationException then core side should be set

This can change at implementation time, this is just a guide.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Go, Java, Core, TypeScript, Python, and .NET issues, then compare the listed worker and workflow configuration entry points such as WorkerOptions, WorkflowImplementationOptions, workflow.defn, and WorkflowAttribute. Done means the unchecked SDK-specific requirements and their Core coordination are resolved consistently across the checklist.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, java, python, typescript
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.