Skip to content

Commit a22489c

Browse files
authored
Deprecate Versioning APIs previous_* response fields (#669)
_**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.
1 parent 29286dd commit a22489c

File tree

3 files changed

+48
-12
lines changed

3 files changed

+48
-12
lines changed

openapi/openapiv2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14753,7 +14753,7 @@
1475314753
},
1475414754
"previousDeploymentVersion": {
1475514755
"$ref": "#/definitions/v1WorkerDeploymentVersion",
14756-
"description": "The version that was current before executing this operation."
14756+
"description": "The version that was current before executing this operation.\nDeprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\nCurrent version info before calling this API. By passing the `conflict_token` got from the\n`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\nbetween the two calls."
1475714757
}
1475814758
}
1475914759
},
@@ -14767,7 +14767,7 @@
1476714767
},
1476814768
"previousManagerIdentity": {
1476914769
"type": "string",
14770-
"description": "What the `manager_identity` field was before this change."
14770+
"description": "What the `manager_identity` field was before this change.\nDeprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\nmanager identity before calling this API. By passing the `conflict_token` got from the\n`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\nbetween the two calls."
1477114771
}
1477214772
}
1477314773
},
@@ -14785,12 +14785,12 @@
1478514785
},
1478614786
"previousDeploymentVersion": {
1478714787
"$ref": "#/definitions/v1WorkerDeploymentVersion",
14788-
"description": "The version that was ramping before executing this operation."
14788+
"description": "The version that was ramping before executing this operation.\nDeprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\nRamping version info before calling this API. By passing the `conflict_token` got from the\n`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\nbetween the two calls."
1478914789
},
1479014790
"previousPercentage": {
1479114791
"type": "number",
1479214792
"format": "float",
14793-
"description": "The ramping version percentage before executing this operation."
14793+
"description": "The ramping version percentage before executing this operation.\nDeprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\nRamping version info before calling this API. By passing the `conflict_token` got from the\n`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\nbetween the two calls."
1479414794
}
1479514795
}
1479614796
},

openapi/openapiv3.yaml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11673,7 +11673,12 @@ components:
1167311673
previousDeploymentVersion:
1167411674
allOf:
1167511675
- $ref: '#/components/schemas/WorkerDeploymentVersion'
11676-
description: The version that was current before executing this operation.
11676+
description: |-
11677+
The version that was current before executing this operation.
11678+
Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
11679+
Current version info before calling this API. By passing the `conflict_token` got from the
11680+
`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
11681+
between the two calls.
1167711682
SetWorkerDeploymentManagerRequest:
1167811683
type: object
1167911684
properties:
@@ -11713,7 +11718,12 @@ components:
1171311718
format: bytes
1171411719
previousManagerIdentity:
1171511720
type: string
11716-
description: What the `manager_identity` field was before this change.
11721+
description: |-
11722+
What the `manager_identity` field was before this change.
11723+
Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
11724+
manager identity before calling this API. By passing the `conflict_token` got from the
11725+
`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
11726+
between the two calls.
1171711727
SetWorkerDeploymentRampingVersionRequest:
1171811728
type: object
1171911729
properties:
@@ -11787,10 +11797,20 @@ components:
1178711797
previousDeploymentVersion:
1178811798
allOf:
1178911799
- $ref: '#/components/schemas/WorkerDeploymentVersion'
11790-
description: The version that was ramping before executing this operation.
11800+
description: |-
11801+
The version that was ramping before executing this operation.
11802+
Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
11803+
Ramping version info before calling this API. By passing the `conflict_token` got from the
11804+
`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
11805+
between the two calls.
1179111806
previousPercentage:
1179211807
type: number
11793-
description: The ramping version percentage before executing this operation.
11808+
description: |-
11809+
The ramping version percentage before executing this operation.
11810+
Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
11811+
Ramping version info before calling this API. By passing the `conflict_token` got from the
11812+
`DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
11813+
between the two calls.
1179411814
format: float
1179511815
SignalExternalWorkflowExecutionFailedEventAttributes:
1179611816
type: object

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,7 +2178,11 @@ message SetWorkerDeploymentCurrentVersionResponse {
21782178
// Deprecated. Use `previous_deployment_version`.
21792179
string previous_version = 2 [deprecated = true];
21802180
// The version that was current before executing this operation.
2181-
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3;
2181+
// Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2182+
// Current version info before calling this API. By passing the `conflict_token` got from the
2183+
// `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2184+
// between the two calls.
2185+
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3 [deprecated = true];
21822186
}
21832187

21842188
// Set/unset the Ramping Version of a Worker Deployment and its ramp percentage.
@@ -2234,9 +2238,17 @@ message SetWorkerDeploymentRampingVersionResponse {
22342238
// Deprecated. Use `previous_deployment_version`.
22352239
string previous_version = 2 [deprecated = true];
22362240
// The version that was ramping before executing this operation.
2237-
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4;
2241+
// Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2242+
// Ramping version info before calling this API. By passing the `conflict_token` got from the
2243+
// `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2244+
// between the two calls.
2245+
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4 [deprecated = true];
22382246
// The ramping version percentage before executing this operation.
2239-
float previous_percentage = 3;
2247+
// Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2248+
// Ramping version info before calling this API. By passing the `conflict_token` got from the
2249+
// `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2250+
// between the two calls.
2251+
float previous_percentage = 3 [deprecated = true];
22402252
}
22412253

22422254
message ListWorkerDeploymentsRequest {
@@ -2349,7 +2361,11 @@ message SetWorkerDeploymentManagerResponse {
23492361
bytes conflict_token = 1;
23502362

23512363
// What the `manager_identity` field was before this change.
2352-
string previous_manager_identity = 2;
2364+
// Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2365+
// manager identity before calling this API. By passing the `conflict_token` got from the
2366+
// `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2367+
// between the two calls.
2368+
string previous_manager_identity = 2 [deprecated = true];
23532369
}
23542370

23552371
// Returns the Current Deployment of a deployment series.

0 commit comments

Comments
 (0)