temporalio / temporalio/temporal

Add soft workflow timeout

Open
#1,412 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API enhancement up-for-grabs
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Is your feature request related to a problem? Please describe.
RunTimeout terminates workflow without giving it any chance to perform cleanup. So to deal with business logic timeouts timers have to be used which adds complexity to the user code.

Describe the solution you'd like
Add WorkflowRunCancellationTimeout (name is strawman) wich sends a cancellation request to the workflow when exceeded. This way a workflow can perform all necessary cleanup.

Contributor guide

Open the contributing guide

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 tracing how RunTimeout currently terminates a workflow and where workflow cancellation requests are handled. Determine how a separate WorkflowRunCancellationTimeout should interact with the existing timeout behavior and cleanup. Done means the new timeout allows the workflow to perform cleanup before termination, with coverage for the cancellation and timeout paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
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.