Skip to content

Add one-time move to the versioning override API!#808

Merged
Shivs11 merged 8 commits into
mainfrom
ss/one-time-versioning-override-api
Jun 25, 2026
Merged

Add one-time move to the versioning override API!#808
Shivs11 merged 8 commits into
mainfrom
ss/one-time-versioning-override-api

Conversation

@Shivs11

@Shivs11 Shivs11 commented Jun 17, 2026

Copy link
Copy Markdown
Member

What changed?

  • WISOTT

Why?

  • So that operators can have a versioning override that is not sticky. The idea is that the next task of the workflow execution moves to the target version, after which the behaviour/version of the workflow are dictated by the worker response.

Breaking changes

  • No, since this is a new option that I am adding whose default value is false (it's opt-in)

Server PR

@Shivs11 Shivs11 requested review from a team June 17, 2026 22:31
// Indicates whether to override the workflow to be AutoUpgrade or Pinned.
oneof override {
// Override the workflow to have Pinned behavior.
PinnedOverride pinned = 3;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so this would continue to be sticky pin behavior? I think we need to update the doc so it is more clear. It would ignore even when SDK do CAN and wants change to AU to current version?

@Shivs11 Shivs11 Jun 17, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It would ignore even when SDK do CAN and wants change to AU to current version

yes, the PinnedOverride is meant to be sticky. As long as it exists on a workflow execution, it shall be pinned to a specific workflow execution

Comment thread temporal/api/workflow/v1/message.proto

@Sushisource Sushisource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the comments do a great job explaining it all now.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Opengrep — new findings

Severity Location Rule Message
ERROR .github/workflows/create-release.yml:25 security.gha.missing-explicit-permissions-temporal No explicit GITHUB_TOKEN permissions found at the workflow or job level. Add a permissions: block at the workflow root (applies to all jobs) or per job with least privilege (e.g., contents: read and only specific writes like pull-requests: write if needed).
ERROR .github/workflows/create-release.yml:30 security.gha.missing-explicit-permissions-temporal No explicit GITHUB_TOKEN permissions found at the workflow or job level. Add a permissions: block at the workflow root (applies to all jobs) or per job with least privilege (e.g., contents: read and only specific writes like pull-requests: write if needed).
ERROR .github/workflows/create-release.yml:99 security.gha.missing-explicit-permissions-temporal No explicit GITHUB_TOKEN permissions found at the workflow or job level. Add a permissions: block at the workflow root (applies to all jobs) or per job with least privilege (e.g., contents: read and only specific writes like pull-requests: write if needed).
ERROR .github/workflows/trigger-api-go-update.yml:16 security.gha.missing-explicit-permissions-temporal No explicit GITHUB_TOKEN permissions found at the workflow or job level. Add a permissions: block at the workflow root (applies to all jobs) or per job with least privilege (e.g., contents: read and only specific writes like pull-requests: write if needed).

Suppress findings

Add a noopengrep comment on the line before the finding:

# noopengrep: <rule-id>

@Shivs11 Shivs11 merged commit 29fc423 into main Jun 25, 2026
4 checks passed
@Shivs11 Shivs11 deleted the ss/one-time-versioning-override-api branch June 25, 2026 00:27
Shivs11 added a commit to temporalio/cli that referenced this pull request Jul 6, 2026
## Related issues

<!-- Closes #123 -->

## What changed?
- WISOTT
- For more information, you can also view the relevant PR's:
1. Server PR: temporalio/temporal#10763
2. API PR: temporalio/api#808

## Checklist

<!-- Your PR should satisfy all these requirements. However, feel free
to remove items that don't apply to the PR. Consider giving this
checklist to an AI agent before opening your PR. -->

**Stability**
- [ ] Breaking changes are marked with 💥 in the PR title and release
notes
- [ ] Changes to JSON output (`-o json` / `-o jsonl`) are treated as
breaking changes

**Design**
- [ ] This feature does not depend on Cloud-only APIs or behavior (it
works against an OSS server)
- [x] New commands follow `temporal <noun> <verb>` structure (e.g.
`temporal workflow start`)
- [x] New flags are named after the API concept, not the implementation
mechanism (good: `--search-attribute`, bad: `--index-field`)
- [x] New flags don't duplicate an existing flag that serves the same
purpose
- [x] New flags do not have short aliases without strong justification
- [ ] Experimental features are marked with `(Experimental)` in
`commands.yaml`

**Help text** (see style guide at the top of `commands.yaml`)
- [ ] All flags shown in help text and examples are implemented and
functional
- [ ] Summaries use sentence case and have no trailing period
- [ ] Long descriptions end with a period and include at least one
example invocation
- [ ] Examples use long flags (`--namespace`, not `-n`), one flag per
line
- [ ] Placeholder values use `YourXxx` form (`YourWorkflowId`,
`YourNamespace`)

**Behavior**
- [x] Results go to stdout; errors and warnings go to stderr
- [x] Error messages are lowercase with no trailing punctuation

**Tests**
- [x] Added functional test(s) (`SharedServerSuite`)
- [ ] Added unit test(s) (`func TestXxx`) where applicable

## Manual tests

**Setup**

Requires a server that includes temporalio/temporal#10763 and a workflow
whose Task Queue is present in the target Worker Deployment Version.

```bash
temporal server start-dev --headless

temporal workflow start \
    --type YourWorkflowType \
    --task-queue YourTaskQueue \
    --workflow-id YourWorkflowId
```

Use an existing Worker Deployment Version for the target:

```text
Deployment name: YourDeploymentName
Build ID: YourBuildId
```

**Happy path**

```bash
temporal workflow update-options \
    --workflow-id YourWorkflowId \
    --versioning-override-behavior one_time \
    --versioning-override-deployment-name YourDeploymentName \
    --versioning-override-build-id YourBuildId
```

Expected output:

```text
Update workflow options succeeded
```

Verify table output:

```bash
temporal workflow describe \
    --workflow-id YourWorkflowId
```

Expected: `OverrideBehavior` is `OneTime`, with
`OverrideTargetVersionDeploymentName` and `OverrideTargetVersionBuildId`
set.

Verify JSON output:

```bash
temporal workflow describe \
    --workflow-id YourWorkflowId \
    --output json
```

Expected:
`versioningInfo.versioningOverride.oneTime.targetDeploymentVersion`
contains the deployment name and build ID.

**Error case**

```bash
temporal workflow update-options \
    --workflow-id YourWorkflowId \
    --versioning-override-behavior one_time
```

Expected:

```text
Error: missing deployment name and/or build id with 'one_time' behavior
```

```bash
echo $?
```

Expected:

```text
1
```

**Composition**

```bash
temporal workflow update-options \
    --query 'WorkflowId = "YourWorkflowId"' \
    --yes \
    --versioning-override-behavior one_time \
    --versioning-override-deployment-name YourDeploymentName \
    --versioning-override-build-id YourBuildId
```

Expected: a batch update-options job is started. Use `temporal batch
describe` to inspect the batch, then `temporal workflow describe` on an
affected Workflow Execution to verify the one-time override.
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.

4 participants