Add one-time versioning override#10763
Conversation
5b4a1a6 to
2380204
Compare
| var inheritedPinnedOverride *workflowpb.VersioningOverride | ||
| if o := mutableState.GetExecutionInfo().GetVersioningInfo().GetVersioningOverride(); worker_versioning.OverrideIsPinned(o) { | ||
| inheritedPinnedOverride = o | ||
| // Pinned and one-time overrides are inherited if Task Queue of new run is compatible with the override version. |
There was a problem hiding this comment.
the reason why the child workflow path is receiving this special treatment but none of CAN/retry/cron paths are is because of the following idea:
-
if an operator has a "Started" WFT and were to run a VersioningOverride (One Time Move) operation, and the said WFT returns a command to CAN/retry/cron, we reject those commands since we have a buffered history event thanks to that pending one time move command. Thus, for these three primitives, we shall always only have the case where the task finishes and the pending one time move is cleared, after which we handle commands (i have added versioning tests that are validating this)
-
on the other hand, the child path is a bit different in the sense that we don't reject this start child command even if we do have buffered events.
2380204 to
389c921
Compare
| mergeInto.VersioningOverride = mergeFrom.GetVersioningOverride() | ||
| } | ||
|
|
||
| if _, ok := updateFields["versioningOverride.pinned"]; ok { |
There was a problem hiding this comment.
this is something which i just over thought while working on this, or something we missed while we wrote update workflow options?
question: why don't we have these mask options for all the paths for api's that were added in the v0.32 phase? cc - @carlydf
have added them here, but could be totally off hence the q
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 6d94c7b. Configure here.
| // new deployment | ||
| // 2. VersioningOverride.Deployment: this is returned when user has set a PINNED override | ||
| // at wf start time, or later via UpdateWorkflowExecutionOptions. | ||
| // 2. VersioningOverride target: this is returned when user has set a PINNED override or |
There was a problem hiding this comment.
One-time override skips deployment name
Low Severity
When applying a one-time versioning override, updateVersioningOverride updates WorkerDeploymentName only inside the OverrideIsPinned branch. One-time overrides are not pinned in that sense, so executionInfo.WorkerDeploymentName can stay on the pre-override deployment until a later workflow task completion refreshes it.
Reviewed by Cursor Bugbot for commit 6d94c7b. Configure here.


Summary
Tests
Functional tests are intentionally deferred for this draft.
Note
Medium Risk
Changes workflow versioning routing, override inheritance on child/CAN, and mutable-state lifecycle in history—important execution paths with broad test coverage but non-trivial edge cases (races with in-flight WFTs).
Overview
Adds one-time versioning override so operators can route the next workflow task to a target deployment version without permanently pinning the run.
A pending one-time override is treated like a temporary pin for effective deployment/behavior, search attributes, task-queue membership validation, and version reactivation signals.
UpdateWorkflowExecutionOptionsfield masks now accept v0.32pinned,auto_upgrade, andone_time(including nested target version fields). The override clears when a workflow task completes on the target version; completion on a different version leaves it pending.Child workflows inherit pending one-time (and pinned) overrides when the target version owns the child task queue; Continue-as-new and reset/reapply paths are covered in tests.
go.temporal.io/apiis bumped for the new proto oneof.Reviewed by Cursor Bugbot for commit 6d94c7b. Bugbot is set up for automated code reviews on this repo. Configure here.