Skip to content

Correct what happens to an Update when the Workflow closes - #5837

Merged
Duncanma merged 5 commits into
mainfrom
duncan/docs-slack-question-84910c
Dec 1, 2026
Merged

Duncanma merged 5 commits into
mainfrom
duncan/docs-slack-question-84910c

Conversation

@Duncanma

@Duncanma Duncanma commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Raised in Slack: the docs said an Update arriving while a Workflow Task closes the Workflow fails that task with Unhandled Update, and Kapa repeated that. The server doesn't do this. In respondworkflowtaskcompleted/api.go, the admitted-Update check is commented out until Updates are durable at admission, and the Workflow Update architecture doc says Updates don't block completion.

The actual outcomes, from workflow/update/abort_reason.go:

When the run closes Update not yet accepted Update accepted, handler unfinished
Continue-As-New retryable RESOURCE_EXHAUSTED / BUSY_WORKFLOW; retry goes to the new run Update failure, type AcceptedUpdateCompletedWorkflow
Any other close NOT_FOUND Update failure, type AcceptedUpdateCompletedWorkflow

AcceptedUpdateCompletedWorkflow landed in temporalio/temporal#6630, first released in v1.26.2 (Update GA).

Changes

  • encyclopedia/workflow-message-passing/handling-messages.mdx: removed the Unhandled Update claim and the "clients get Not Found" claim. Added a list of the three outcomes after the Signal paragraphs.
  • references/workflow-task-errors.mdx: Unhandled Update now says the server doesn't fail tasks with this cause and links to the encyclopedia. Busy Workflow now lists the Continue-As-New Update case, with retry guidance separate from lock-contention guidance.
  • troubleshooting/request-failures.mdx: same busy Workflow addition.
  • SDK message-passing.mdx pages (Go, Java, .NET, Python, Ruby, TypeScript, PHP): "The Workflow finished while the Update handler execution was in progress" now names the SDK's Update-failed error with an AcceptedUpdateCompletedWorkflow cause instead of a pre-GA NOT_FOUND / "workflow execution already completed" RPC error.

Review notes

  • SDK exception wrapping is checked against each SDK's client source: the Update-failed error carries the converted failure as cause (Python, TypeScript, Java, Ruby), InnerException (.NET), or getPrevious() (PHP). Go's Get returns the *temporal.ApplicationError directly.
  • After merge, Kapa needs a recrawl of these pages.

The docs said an Update arriving during a closing Workflow Task fails the
task with Unhandled Update. The server has that check commented out: Updates
don't block a Workflow from closing. Document the actual outcomes:
NOT_FOUND for an unaccepted Update when the run closes, a retryable busy
Workflow error when it continues as new, and an AcceptedUpdateCompletedWorkflow
Update failure for an accepted Update whose handler hasn't finished. The SDK
message-passing pages still described the pre-GA "workflow execution already
completed" / NOT_FOUND error for that last case.
@Duncanma
Duncanma requested a review from a team as a code owner November 30, 2026 19:22
Copilot AI balanced review requested due to automatic review settings November 30, 2026 19:22
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
temporal-documentation Ready Ready Preview Dec 1, 2026 6:09pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The retry guidance needs to specify using the Workflow ID without the old Run ID, which otherwise keeps Updates targeted at the closed run rather than its successor.

1 open issue
What changed in this PR

Corrects documentation about Updates when a Workflow closes, aligning the shared explanation, error references, troubleshooting guidance, and seven SDK pages.

Changes:

  • Distinguishes closure outcomes for unaccepted Updates and accepted Updates with unfinished handlers.
  • Removes the claim that pending Updates prevent Workflow completion and adds Continue-As-New retry guidance.
  • Documents SDK-specific errors for AcceptedUpdateCompletedWorkflow.
File Description
docs/​troubleshooting/​request-failures.mdx Adds the Continue-As-New Update case to busy Workflow guidance.
docs/​references/​workflow-task-errors.mdx Corrects Unhandled Update and expands busy Workflow causes.
docs/​encyclopedia/​workflow-message-passing/​handling-messages.mdx Explains Update outcomes when a run closes.
docs/​develop/​typescript/​workflows/​message-passing.mdx Documents WorkflowUpdateFailedError and its cause.
docs/​develop/​ruby/​workflows/​message-passing.mdx Documents WorkflowUpdateFailedError and its cause.
docs/​develop/​python/​workflows/​message-passing.mdx Documents WorkflowUpdateFailedError and its cause.
docs/​develop/​php/​workflows/​message-passing.mdx Specifies the previous exception in WorkflowUpdateException.
docs/​develop/​java/​workflows/​message-passing.mdx Documents WorkflowUpdateException and its cause.
docs/​develop/​go/​workflows/​message-passing.mdx Documents the returned temporal.ApplicationError type.
docs/​develop/​dotnet/​workflows/​message-passing.mdx Documents WorkflowUpdateFailedException and its inner exception.

Review effort: Balanced

@brianmacdonald-temporal brianmacdonald-temporal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java link got left out; restored it.

@Duncanma
Duncanma enabled auto-merge (squash) December 1, 2026 18:05
@Duncanma
Duncanma merged commit 316ec71 into main Dec 1, 2026
20 checks passed
@Duncanma
Duncanma deleted the duncan/docs-slack-question-84910c branch December 1, 2026 18:09

This branch was successfully deployed

1 active deployment
Preview — 81842af2 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants