Skip to content

Conversation

@carlydf
Copy link
Contributor

@carlydf carlydf commented Dec 20, 2025

What changed?

Implement optional versioning override version for pinned workflows.
Only for UpdateOptions, not for start-with-override or reset-with-override.

Why?

So that a user can set a Pinned Override on a batch of workflows with different versions (or on a single workflow, but without having to look up and provide the specific version) and simply mean "pin to what you are already on, forever."

Setting a Pinned Override on an already-pinned workflow and not changing the version seems silly, but, with the introduction of the upgrade-on-continue-as-new option, setting a Pinned Override means that, even if the workflow says "upgrade-on-CaN", the workflow will remain on the override version after CaN.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

  • None

Note

Implements implied pinned overrides for workflow option updates and covers them with tests.

  • Update service/history/api/updateworkflowoptions/api.go to clone request options and, when a pinned override omits version, auto-fill from the workflow’s effective deployment; return FailedPrecondition if behavior isn’t already pinned. Continue to validate via ValidateVersioningOverride, then merge/apply.
  • Add tests: TestUpdateWorkflowExecutionOptions_SetImpliedPinnedSuccess and ..._Error; refactor helpers (startVersionedWorkflow, startUnpinnedWorkflow, setAndCheckOverrideWithExpectedOutput), improve assertions, and set useV32 in suites.
  • Extend test utilities with testvars.WithWorkflowID.
  • Bump dependency go.temporal.io/api to v1.59.1-0.20260106204414-b9a666f3d64e.

Written by Cursor Bugbot for commit 98726fb. This will update automatically on new commits. Configure here.

carlydf added a commit to temporalio/api that referenced this pull request Jan 6, 2026
…lows (#687)

_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._

<!-- Describe what has changed in this PR -->
Make version optional for versioning override of already-pinned
workflows


<!-- Tell your future self why have you made these changes -->
So that people don't have to specify a version if they just mean "pin to
what you're already pinned to."

Someone could use this if they want to set pinned overrides on a batch
of workflows that are pinned to different versions, and the user wants
to prevent these workflows from upgrading-on-CaN (since Pinned override
is inherited on CaN, they would not upgrade-on-CaN)


<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**


<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
temporalio/temporal#8885
temporal-cicd bot pushed a commit to temporalio/api-go that referenced this pull request Jan 6, 2026
…lows (#687)

_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._

<!-- Describe what has changed in this PR -->
Make version optional for versioning override of already-pinned
workflows

<!-- Tell your future self why have you made these changes -->
So that people don't have to specify a version if they just mean "pin to
what you're already pinned to."

Someone could use this if they want to set pinned overrides on a batch
of workflows that are pinned to different versions, and the user wants
to prevent these workflows from upgrading-on-CaN (since Pinned override
is inherited on CaN, they would not upgrade-on-CaN)

<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**

<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
temporalio/temporal#8885
@carlydf carlydf enabled auto-merge (squash) January 6, 2026 21:32
@carlydf carlydf merged commit 05b8c48 into main Jan 6, 2026
100 of 102 checks passed
@carlydf carlydf deleted the cdf/optional-version-in-override branch January 6, 2026 21:55
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