Skip to content

Deprecate Versioning APIs previous_* response fields - #669

Merged
ShahabT merged 1 commit into
masterfrom
shahab/deprecate-prev
Nov 25, 2025
Merged

ShahabT merged 1 commit into
masterfrom
shahab/deprecate-prev

Conversation

@ShahabT

@ShahabT ShahabT commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

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.

Deprecating the following fields in favor of API idempotency.

  • SetWorkerDeploymentCurrentVersionResponse.previous_deployment_version
  • SetWorkerDeploymentRampingVersionResponse.previous_deployment_version
  • SetWorkerDeploymentRampingVersionResponse.previous_percentage
  • SetWorkerDeploymentManagerResponse.previous_manager_identity

The fields do not fit well with these idempotent APIs. They will return invalid results when the API is retried by server or client.

Users who need this info can use DescribeWorkerDeployment before calling this the Set* APIs. By passing the conflict_token got from the DescribeWorkerDeployment call to the Set API they can ensure there is no interfering changes between the two calls.

Breaking changes
These fields are deprecated and will stop being populated sometime after Versioning GA.

Server PR
No server change.

@ShahabT
ShahabT requested review from a team as code owners November 24, 2025 20:16
// Current version info before calling this API. By passing the `conflict_token` got from the
// `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
// between the two calls.
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3 [deprecated = true];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Sushisource these fields have flaky behavior which has been issue with server test. I don't think we should've added them in the first place.

I checked sdk-go and it doesn't seem we're verifying the field for real so it's good, but we need to mark it as deprecated in the Go response struct as well. Happy to send that PR too if you give a 👍

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.

SGTM. I can't find it being used.

@Shivs11 Shivs11 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 there may be some server changes though (like removing this field when we build out the response struct in the frontend)

@ShahabT

ShahabT commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

@Shivs11 those changes we do at a later point for now we want to mark it as deprecated but still populate it.

@ShahabT
ShahabT merged commit a22489c into master Nov 25, 2025
4 checks passed
@ShahabT
ShahabT deleted the shahab/deprecate-prev branch November 25, 2025 17:52
stephanos pushed a commit that referenced this pull request Mar 10, 2026
_**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 -->
Deprecating the following fields in favor of API idempotency.
-
`SetWorkerDeploymentCurrentVersionResponse.previous_deployment_version`
-
`SetWorkerDeploymentRampingVersionResponse.previous_deployment_version`
- `SetWorkerDeploymentRampingVersionResponse.previous_percentage`
- `SetWorkerDeploymentManagerResponse.previous_manager_identity`

<!-- Tell your future self why have you made these changes -->
The fields do not fit well with these idempotent APIs. They will return
invalid results when the API is retried by server or client.

Users who need this info can use `DescribeWorkerDeployment` before
calling this the `Set*` APIs. By passing the `conflict_token` got from
the `DescribeWorkerDeployment` call to the Set API they can ensure there
is no interfering changes between the two calls.

<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
These fields are deprecated and will stop being populated sometime after
Versioning GA.

<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
No server change.
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