temporalio / temporalio/temporal

New error type for workflow already completed?

Open
#3,062 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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.
For both workflow not found and workflow already completed case, we return a NotFound error. And caller can't tell the which case it is just by checking the error type if it wants to have different error handling logic for those two cases.

An example is verifying child workflow recorded. If parent not found, we need to keep retrying the verification. If parent already completed, the verification doesn't need to continue. Currently the implementation is return WorkflowNotReady error if workflow not found and return NotFound when workflow already completed. This makes the error handling logic very confusing.

In this particular case of verification, we probably don't have to return already completed error at all. Basically assume this error will always be ignored by caller. (The idea of current implementation is simply gave more accurate information to the caller and don't make any assumption on the caller). Then NotFound can either be unexpected or only means the real workflow not found.

Is there any other cases where we need to treat not found and already completed differently?

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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 the workflow-not-found and workflow-already-completed paths described in the issue, including WorkflowNotReady and NotFound handling during child-workflow verification. Determine whether callers need distinct error semantics and define the behavior for each case before implementing or testing a solution.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.