Files
Carly de FrondevilleandGitHub 6ac58ce8a9 Implement optional versioning override version for pinned workflows (#8885)
## 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?
- [x] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [x] 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`.
> 
> <sup>Written by [Cursor
Bugbot]() for commit
98726fbc00cb83b60627306af6b8b3c75d4d561f. This will update automatically
on new commits. Configure
[here]().</sup>
2026-01-06 21:55:18 +00:00
..
…
…
…