Skip to content

Commit 6b5ddbe

Browse files
committed
add ramp_down_current_deployment_name in SetRamping oneof
1 parent 379ccf7 commit 6b5ddbe

File tree

3 files changed

+111
-47
lines changed

3 files changed

+111
-47
lines changed

openapi/openapiv2.json

+18-16
Original file line numberDiff line numberDiff line change
@@ -7591,11 +7591,12 @@
75917591
"description": "Deprecated. Use `current`."
75927592
},
75937593
"deploymentVersion": {
7594-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
7594+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
7595+
"description": "The Version you want to set as this Deployment's Current Version.\nSee `RoutingConfig.current_deployment_version` for more details."
75957596
},
7596-
"unversionedDeploymentName": {
7597+
"unsetDeploymentName": {
75977598
"type": "string",
7598-
"title": "The name of the Deployment where you want to set Current Version to unversioned.\nRepresents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)"
7599+
"description": "The name of the Deployment where you want to unset the Current Version.\nWhen the Current Version is removed from a Deployment, all the task queues\nin that version will have their `TaskQueueVersioningInfo.current_deployment_version`\nset to nil. Until the task queue is added to another deployment, tasks will be\nsent to unversioned workers (or the ramping version, if present)."
75997600
},
76007601
"conflictToken": {
76017602
"type": "string",
@@ -7625,11 +7626,16 @@
76257626
"description": "Deprecated. Use `ramping`."
76267627
},
76277628
"deploymentVersion": {
7628-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
7629+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
7630+
"description": "The Version you want to set as this Deployment's Ramping Version.\nSee `RoutingConfig.ramping_deployment_version` for more details.\nMust always be different from the Current Version."
76297631
},
7630-
"unversionedDeploymentName": {
7632+
"unsetDeploymentName": {
76317633
"type": "string",
7632-
"title": "The name of the Deployment where you want to set Ramping Version to unversioned.\nRepresents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)"
7634+
"description": "The name of the Deployment where you want to unset the Ramping Version.\nMust be paired with percentage=0."
7635+
},
7636+
"rampDownCurrentDeploymentName": {
7637+
"type": "string",
7638+
"description": "The name of the Deployment where you want to \"ramp down\" the Current Version\nin order to gradually shift traffic away from this Deployment.\nFor each task queue, the portion of traffic that is shifted \"away\"\nfrom this Deployment will be handled by the task queue's Current Version if present,\nor by unversioned workers if the task queue has no Current Version.\nFor example,\nRamping N% of traffic _from_ outside of this Deployment's scope _to_ a particular Version V in this Deployment:\n ```\n current_deployment_version = nil\n ramping_deployment_version = V\n ramping_version_percentage = N\n ```\nRamping N% of traffic _from_ a particular Version V in this Deployment _to_ outside this Deployment's scope:\n ```\n current_deployment_version = nil\n ramping_deployment_version = V\n ramping_version_percentage = (100 - N)\n ```\nPassing this field will atomically set:\n ramping_deployment_version = current_deployment_version\n current_deployment_version = nil\nfor the specified Worker Deployment."
76337639
},
76347640
"percentage": {
76357641
"type": "number",
@@ -13349,11 +13355,9 @@
1334913355
"type": "string",
1335013356
"description": "Deprecated. Use `replaced_version`."
1335113357
},
13352-
"deploymentVersion": {
13353-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
13354-
},
13355-
"unversioned": {
13356-
"type": "boolean"
13358+
"previousDeploymentVersion": {
13359+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
13360+
"description": "The version that was current before executing this operation."
1335713361
}
1335813362
}
1335913363
},
@@ -13369,11 +13373,9 @@
1336913373
"type": "string",
1337013374
"description": "Deprecated. Use `replaced_version`."
1337113375
},
13372-
"deploymentVersion": {
13373-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
13374-
},
13375-
"unversioned": {
13376-
"type": "boolean"
13376+
"previousDeploymentVersion": {
13377+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
13378+
"description": "The version that was ramping before executing this operation."
1337713379
},
1337813380
"previousPercentage": {
1337913381
"type": "number",

openapi/openapiv3.yaml

+53-16
Original file line numberDiff line numberDiff line change
@@ -10502,12 +10502,19 @@ components:
1050210502
type: string
1050310503
description: Deprecated. Use `current`.
1050410504
deploymentVersion:
10505-
$ref: '#/components/schemas/WorkerDeploymentVersion'
10506-
unversionedDeploymentName:
10505+
allOf:
10506+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
10507+
description: |-
10508+
The Version you want to set as this Deployment's Current Version.
10509+
See `RoutingConfig.current_deployment_version` for more details.
10510+
unsetDeploymentName:
1050710511
type: string
1050810512
description: |-
10509-
The name of the Deployment where you want to set Current Version to unversioned.
10510-
Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
10513+
The name of the Deployment where you want to unset the Current Version.
10514+
When the Current Version is removed from a Deployment, all the task queues
10515+
in that version will have their `TaskQueueVersioningInfo.current_deployment_version`
10516+
set to nil. Until the task queue is added to another deployment, tasks will be
10517+
sent to unversioned workers (or the ramping version, if present).
1051110518
conflictToken:
1051210519
type: string
1051310520
description: |-
@@ -10549,10 +10556,10 @@ components:
1054910556
previousVersion:
1055010557
type: string
1055110558
description: Deprecated. Use `replaced_version`.
10552-
deploymentVersion:
10553-
$ref: '#/components/schemas/WorkerDeploymentVersion'
10554-
unversioned:
10555-
type: boolean
10559+
previousDeploymentVersion:
10560+
allOf:
10561+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
10562+
description: The version that was current before executing this operation.
1055610563
SetWorkerDeploymentRampingVersionRequest:
1055710564
type: object
1055810565
properties:
@@ -10565,12 +10572,42 @@ components:
1056510572
type: string
1056610573
description: Deprecated. Use `ramping`.
1056710574
deploymentVersion:
10568-
$ref: '#/components/schemas/WorkerDeploymentVersion'
10569-
unversionedDeploymentName:
10575+
allOf:
10576+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
10577+
description: |-
10578+
The Version you want to set as this Deployment's Ramping Version.
10579+
See `RoutingConfig.ramping_deployment_version` for more details.
10580+
Must always be different from the Current Version.
10581+
unsetDeploymentName:
1057010582
type: string
1057110583
description: |-
10572-
The name of the Deployment where you want to set Ramping Version to unversioned.
10573-
Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
10584+
The name of the Deployment where you want to unset the Ramping Version.
10585+
Must be paired with percentage=0.
10586+
rampDownCurrentDeploymentName:
10587+
type: string
10588+
description: |-
10589+
The name of the Deployment where you want to "ramp down" the Current Version
10590+
in order to gradually shift traffic away from this Deployment.
10591+
For each task queue, the portion of traffic that is shifted "away"
10592+
from this Deployment will be handled by the task queue's Current Version if present,
10593+
or by unversioned workers if the task queue has no Current Version.
10594+
For example,
10595+
Ramping N% of traffic _from_ outside of this Deployment's scope _to_ a particular Version V in this Deployment:
10596+
```
10597+
current_deployment_version = nil
10598+
ramping_deployment_version = V
10599+
ramping_version_percentage = N
10600+
```
10601+
Ramping N% of traffic _from_ a particular Version V in this Deployment _to_ outside this Deployment's scope:
10602+
```
10603+
current_deployment_version = nil
10604+
ramping_deployment_version = V
10605+
ramping_version_percentage = (100 - N)
10606+
```
10607+
Passing this field will atomically set:
10608+
ramping_deployment_version = current_deployment_version
10609+
current_deployment_version = nil
10610+
for the specified Worker Deployment.
1057410611
percentage:
1057510612
type: number
1057610613
description: 'Ramp percentage to set. Valid range: [0,100].'
@@ -10619,10 +10656,10 @@ components:
1061910656
previousVersion:
1062010657
type: string
1062110658
description: Deprecated. Use `replaced_version`.
10622-
deploymentVersion:
10623-
$ref: '#/components/schemas/WorkerDeploymentVersion'
10624-
unversioned:
10625-
type: boolean
10659+
previousDeploymentVersion:
10660+
allOf:
10661+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
10662+
description: The version that was ramping before executing this operation.
1062610663
previousPercentage:
1062710664
type: number
1062810665
description: The ramping version percentage before executing this operation.

temporal/api/workflowservice/v1/request_response.proto

+40-15
Original file line numberDiff line numberDiff line change
@@ -2040,10 +2040,15 @@ message SetWorkerDeploymentCurrentVersionRequest {
20402040

20412041
// Required.
20422042
oneof current {
2043+
// The Version you want to set as this Deployment's Current Version.
2044+
// See `RoutingConfig.current_deployment_version` for more details.
20432045
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 7;
2044-
// The name of the Deployment where you want to set Current Version to unversioned.
2045-
// Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
2046-
string unversioned_deployment_name = 8;
2046+
// The name of the Deployment where you want to unset the Current Version.
2047+
// When the Current Version is removed from a Deployment, all the task queues
2048+
// in that version will have their `TaskQueueVersioningInfo.current_deployment_version`
2049+
// set to nil. Until the task queue is added to another deployment, tasks will be
2050+
// sent to unversioned workers (or the ramping version, if present).
2051+
string unset_deployment_name = 8;
20472052
};
20482053
// Optional. This can be the value of conflict_token from a Describe, or another Worker
20492054
// Deployment API. Passing a non-nil conflict token will cause this request to fail if the
@@ -2076,10 +2081,7 @@ message SetWorkerDeploymentCurrentVersionResponse {
20762081
// Deprecated. Use `replaced_version`.
20772082
string previous_version = 2 [deprecated = true];
20782083
// The version that was current before executing this operation.
2079-
oneof replaced_version {
2080-
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 3;
2081-
bool unversioned = 4;
2082-
};
2084+
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3;
20832085
}
20842086

20852087
// Set/unset the Ramping Version of a Worker Deployment and its ramp percentage.
@@ -2089,12 +2091,38 @@ message SetWorkerDeploymentRampingVersionRequest {
20892091
string deployment_name = 2 [deprecated = true];
20902092
// Deprecated. Use `ramping`.
20912093
string version = 3 [deprecated = true];
2092-
// Pass an empty value to unset the Ramping Version. Must be paired with `percentage=0`.
2094+
20932095
oneof ramping {
2096+
// The Version you want to set as this Deployment's Ramping Version.
2097+
// See `RoutingConfig.ramping_deployment_version` for more details.
2098+
// Must always be different from the Current Version.
20942099
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 8;
2095-
// The name of the Deployment where you want to set Ramping Version to unversioned.
2096-
// Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
2097-
string unversioned_deployment_name = 9;
2100+
// The name of the Deployment where you want to unset the Ramping Version.
2101+
// Must be paired with percentage=0.
2102+
string unset_deployment_name = 9;
2103+
// The name of the Deployment where you want to "ramp down" the Current Version
2104+
// in order to gradually shift traffic away from this Deployment.
2105+
// For each task queue, the portion of traffic that is shifted "away"
2106+
// from this Deployment will be handled by the task queue's Current Version if present,
2107+
// or by unversioned workers if the task queue has no Current Version.
2108+
// For example,
2109+
// Ramping N% of traffic _from_ outside of this Deployment's scope _to_ a particular Version V in this Deployment:
2110+
// ```
2111+
// current_deployment_version = nil
2112+
// ramping_deployment_version = V
2113+
// ramping_version_percentage = N
2114+
// ```
2115+
// Ramping N% of traffic _from_ a particular Version V in this Deployment _to_ outside this Deployment's scope:
2116+
// ```
2117+
// current_deployment_version = nil
2118+
// ramping_deployment_version = V
2119+
// ramping_version_percentage = (100 - N)
2120+
// ```
2121+
// Passing this field will atomically set:
2122+
// ramping_deployment_version = current_deployment_version
2123+
// current_deployment_version = nil
2124+
// for the specified Worker Deployment.
2125+
string ramp_down_current_deployment_name = 10;
20982126
};
20992127
// Ramp percentage to set. Valid range: [0,100].
21002128
float percentage = 4;
@@ -2133,10 +2161,7 @@ message SetWorkerDeploymentRampingVersionResponse {
21332161
// Deprecated. Use `replaced_version`.
21342162
string previous_version = 2 [deprecated = true];
21352163
// The version that was ramping before executing this operation.
2136-
oneof replaced_version {
2137-
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 4;
2138-
bool unversioned = 5;
2139-
};
2164+
temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4;
21402165
// The ramping version percentage before executing this operation.
21412166
float previous_percentage = 3;
21422167
}

0 commit comments

Comments
 (0)