Skip to content

Commit 4245e89

Browse files
committed
remove one of and make nil version equiv to 'unversioned'
1 parent 103e45f commit 4245e89

File tree

5 files changed

+134
-70
lines changed

5 files changed

+134
-70
lines changed

openapi/openapiv2.json

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7021,7 +7021,7 @@
70217021
"PINNED_OVERRIDE_BEHAVIOR_PINNED_UNTIL_CONTINUE_AS_NEW"
70227022
],
70237023
"default": "PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED",
7024-
"description": " - PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: If original behavior is Pinned or PinnedUntilContinueAsNew, keep that behavior.\nIf original behavior is AutoUpgrade, override behavior to Pinned.\n - PINNED_OVERRIDE_BEHAVIOR_PINNED: Override workflow behavior to be Pinned.\n - PINNED_OVERRIDE_BEHAVIOR_PINNED_UNTIL_CONTINUE_AS_NEW: Override workflow behavior to be PinnedUntilContinueAsNew."
7024+
"description": " - PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: If original behavior is Pinned or PinnedUntilContinueAsNew, keep that behavior.\nIf original behavior is AutoUpgrade, override behavior to Pinned.\n - PINNED_OVERRIDE_BEHAVIOR_PINNED: Not yet supported. Reserved for future use.\nOverride workflow behavior to be Pinned.\n - PINNED_OVERRIDE_BEHAVIOR_PINNED_UNTIL_CONTINUE_AS_NEW: Not yet supported. Reserved for future use.\nOverride workflow behavior to be PinnedUntilContinueAsNew."
70257025
},
70267026
"WorkerDeploymentInfoWorkerDeploymentVersionSummary": {
70277027
"type": "object",
@@ -12835,22 +12835,16 @@
1283512835
"type": "object",
1283612836
"properties": {
1283712837
"currentDeploymentVersion": {
12838-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
12839-
},
12840-
"currentUnversioned": {
12841-
"type": "boolean",
12842-
"title": "Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)"
12838+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
12839+
"title": "When present, specifies which Deployment Version should should receive new workflow\nexecutions and tasks of existing unversioned or AutoUpgrade workflows.\nNote: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp\nis set (see `ramping_version`.)"
1284312840
},
1284412841
"currentVersion": {
1284512842
"type": "string",
1284612843
"description": "Deprecated. Use `current`."
1284712844
},
1284812845
"rampingDeploymentVersion": {
12849-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
12850-
},
12851-
"rampingUnversioned": {
12852-
"type": "boolean",
12853-
"title": "Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)"
12846+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
12847+
"title": "When present, it means the traffic is being shifted from the Current Version to the Ramping Version.\nMust always be different from the Current Version.\nNote that it is possible to ramp from one Version to another Version, and it is also\npossible to \"ramp down\" the Current Version in order to gradually shift traffic away\nfrom this Deployment. For 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 ```"
1285412848
},
1285512849
"rampingVersion": {
1285612850
"type": "string",
@@ -12859,7 +12853,7 @@
1285912853
"rampingVersionPercentage": {
1286012854
"type": "number",
1286112855
"format": "float",
12862-
"description": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\nValid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\nnot yet \"promoted\" to be the Current Version, likely due to pending validations."
12856+
"description": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\nValid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic\nand a 0% value means the Ramping Version is receiving no traffic.\nA user might leave the ramp percentage at 100% while doing final validations before \"promoting\"\nthe Ramping Version to Current."
1286312857
},
1286412858
"currentVersionChangedTime": {
1286512859
"type": "string",
@@ -14218,22 +14212,16 @@
1421814212
"type": "object",
1421914213
"properties": {
1422014214
"currentDeploymentVersion": {
14221-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
14222-
},
14223-
"currentUnversioned": {
14224-
"type": "boolean",
14225-
"title": "Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)"
14215+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
14216+
"title": "Specifies which Deployment Version should receive new workflow executions and tasks of existing\nunversioned or AutoUpgrade workflows.\nNil means this task queue will route tasks to all the unversioned workers (those with `UNVERSIONED`\n(or unspecified) `WorkerVersioningMode`.)\nNote: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp\nis set (see `ramping_version`.)"
1422614217
},
1422714218
"currentVersion": {
1422814219
"type": "string",
1422914220
"description": "Deprecated. Use `current`."
1423014221
},
1423114222
"rampingDeploymentVersion": {
14232-
"$ref": "#/definitions/v1WorkerDeploymentVersion"
14233-
},
14234-
"rampingUnversioned": {
14235-
"type": "boolean",
14236-
"title": "Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)"
14223+
"$ref": "#/definitions/v1WorkerDeploymentVersion",
14224+
"title": "When present, it means the traffic is being shifted from the Current Version to the Ramping Version.\nMust always be different from the Current Version.\nNote that it is possible to ramp from one Version to another Version, or from unversioned\nworkers to a particular Version, or from a particular Version to unversioned workers\nFor example,\nRamping N% of traffic _from_ unversioned workers _to_ a particular Version V:\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 _to_ unversioned workers:\n ```\n current_deployment_version = nil\n ramping_deployment_version = V\n ramping_version_percentage = (100 - N)\n ```"
1423714225
},
1423814226
"rampingVersion": {
1423914227
"type": "string",

openapi/openapiv3.yaml

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10030,27 +10030,51 @@ components:
1003010030
type: object
1003110031
properties:
1003210032
currentDeploymentVersion:
10033-
$ref: '#/components/schemas/WorkerDeploymentVersion'
10034-
currentUnversioned:
10035-
type: boolean
10036-
description: Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
10033+
allOf:
10034+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
10035+
description: |-
10036+
When present, specifies which Deployment Version should should receive new workflow
10037+
executions and tasks of existing unversioned or AutoUpgrade workflows.
10038+
Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp
10039+
is set (see `ramping_version`.)
1003710040
currentVersion:
1003810041
type: string
1003910042
description: Deprecated. Use `current`.
1004010043
rampingDeploymentVersion:
10041-
$ref: '#/components/schemas/WorkerDeploymentVersion'
10042-
rampingUnversioned:
10043-
type: boolean
10044-
description: Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
10044+
allOf:
10045+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
10046+
description: |-
10047+
When present, it means the traffic is being shifted from the Current Version to the Ramping Version.
10048+
Must always be different from the Current Version.
10049+
Note that it is possible to ramp from one Version to another Version, and it is also
10050+
possible to "ramp down" the Current Version in order to gradually shift traffic away
10051+
from this Deployment. For each task queue, the portion of traffic that is shifted "away"
10052+
from this Deployment will be handled by the task queue's Current Version if present,
10053+
or by unversioned workers if the task queue has no Current Version.
10054+
For example,
10055+
Ramping N% of traffic _from_ outside of this Deployment's scope _to_ a particular Version V in this Deployment:
10056+
```
10057+
current_deployment_version = nil
10058+
ramping_deployment_version = V
10059+
ramping_version_percentage = N
10060+
```
10061+
Ramping N% of traffic _from_ a particular Version V in this Deployment _to_ outside this Deployment's scope:
10062+
```
10063+
current_deployment_version = nil
10064+
ramping_deployment_version = V
10065+
ramping_version_percentage = (100 - N)
10066+
```
1004510067
rampingVersion:
1004610068
type: string
1004710069
description: Deprecated. Use `ramping`.
1004810070
rampingVersionPercentage:
1004910071
type: number
1005010072
description: |-
1005110073
Percentage of tasks that are routed to the Ramping Version instead of the Current Version.
10052-
Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but
10053-
not yet "promoted" to be the Current Version, likely due to pending validations.
10074+
Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic
10075+
and a 0% value means the Ramping Version is receiving no traffic.
10076+
A user might leave the ramp percentage at 100% while doing final validations before "promoting"
10077+
the Ramping Version to Current.
1005410078
format: float
1005510079
currentVersionChangedTime:
1005610080
type: string
@@ -11398,18 +11422,39 @@ components:
1139811422
type: object
1139911423
properties:
1140011424
currentDeploymentVersion:
11401-
$ref: '#/components/schemas/WorkerDeploymentVersion'
11402-
currentUnversioned:
11403-
type: boolean
11404-
description: Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
11425+
allOf:
11426+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
11427+
description: |-
11428+
Specifies which Deployment Version should receive new workflow executions and tasks of existing
11429+
unversioned or AutoUpgrade workflows.
11430+
Nil means this task queue will route tasks to all the unversioned workers (those with `UNVERSIONED`
11431+
(or unspecified) `WorkerVersioningMode`.)
11432+
Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp
11433+
is set (see `ramping_version`.)
1140511434
currentVersion:
1140611435
type: string
1140711436
description: Deprecated. Use `current`.
1140811437
rampingDeploymentVersion:
11409-
$ref: '#/components/schemas/WorkerDeploymentVersion'
11410-
rampingUnversioned:
11411-
type: boolean
11412-
description: Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
11438+
allOf:
11439+
- $ref: '#/components/schemas/WorkerDeploymentVersion'
11440+
description: |-
11441+
When present, it means the traffic is being shifted from the Current Version to the Ramping Version.
11442+
Must always be different from the Current Version.
11443+
Note that it is possible to ramp from one Version to another Version, or from unversioned
11444+
workers to a particular Version, or from a particular Version to unversioned workers
11445+
For example,
11446+
Ramping N% of traffic _from_ unversioned workers _to_ a particular Version V:
11447+
```
11448+
current_deployment_version = nil
11449+
ramping_deployment_version = V
11450+
ramping_version_percentage = N
11451+
```
11452+
Ramping N% of traffic _from_ a particular Version V _to_ unversioned workers:
11453+
```
11454+
current_deployment_version = nil
11455+
ramping_deployment_version = V
11456+
ramping_version_percentage = (100 - N)
11457+
```
1141311458
rampingVersion:
1141411459
type: string
1141511460
description: Deprecated. Use `ramping`.

temporal/api/deployment/v1/message.proto

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -241,32 +241,47 @@ message VersionMetadata {
241241
}
242242

243243
message RoutingConfig {
244-
// Always present. Specifies which Deployment Version should should receive new workflow
244+
// When present, specifies which Deployment Version should should receive new workflow
245245
// executions and tasks of existing unversioned or AutoUpgrade workflows.
246246
// Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp
247247
// is set (see `ramping_version`.)
248-
oneof current {
249-
temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7;
250-
// Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
251-
bool current_unversioned = 8;
252-
}
248+
temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7;
249+
253250
// Deprecated. Use `current`.
254251
string current_version = 1 [deprecated = true];
252+
255253
// When present, it means the traffic is being shifted from the Current Version to the Ramping Version.
256-
// Must always be different from Current Version.
257-
// Note that it is possible to ramp from one Version to another Version, or from unversioned
258-
// workers to a particular Version, or from a particular Version to unversioned workers.
259-
oneof ramping {
260-
temporal.api.deployment.v1.WorkerDeploymentVersion ramping_deployment_version = 9;
261-
// Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
262-
bool ramping_unversioned = 10;
263-
}
254+
// Must always be different from the Current Version.
255+
// Note that it is possible to ramp from one Version to another Version, and it is also
256+
// possible to "ramp down" the Current Version in order to gradually shift traffic away
257+
// from this Deployment. For each task queue, the portion of traffic that is shifted "away"
258+
// from this Deployment will be handled by the task queue's Current Version if present,
259+
// or by unversioned workers if the task queue has no Current Version.
260+
// For example,
261+
// Ramping N% of traffic _from_ outside of this Deployment's scope _to_ a particular Version V in this Deployment:
262+
// ```
263+
// current_deployment_version = nil
264+
// ramping_deployment_version = V
265+
// ramping_version_percentage = N
266+
// ```
267+
// Ramping N% of traffic _from_ a particular Version V in this Deployment _to_ outside this Deployment's scope:
268+
// ```
269+
// current_deployment_version = nil
270+
// ramping_deployment_version = V
271+
// ramping_version_percentage = (100 - N)
272+
// ```
273+
temporal.api.deployment.v1.WorkerDeploymentVersion ramping_deployment_version = 8;
274+
264275
// Deprecated. Use `ramping`.
265276
string ramping_version = 2 [deprecated = true];
277+
266278
// Percentage of tasks that are routed to the Ramping Version instead of the Current Version.
267-
// Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but
268-
// not yet "promoted" to be the Current Version, likely due to pending validations.
279+
// Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic
280+
// and a 0% value means the Ramping Version is receiving no traffic.
281+
// A user might leave the ramp percentage at 100% while doing final validations before "promoting"
282+
// the Ramping Version to Current.
269283
float ramping_version_percentage = 3;
284+
270285
// Last time current version was changed.
271286
google.protobuf.Timestamp current_version_changed_time = 4;
272287
// Last time ramping version was changed. Not updated if only the ramp percentage changes.

temporal/api/taskqueue/v1/message.proto

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,44 @@ message TaskQueueMetadata {
5757

5858
// Experimental. Worker Deployments are experimental and might significantly change in the future.
5959
message TaskQueueVersioningInfo {
60-
// Always present. Specifies which Deployment Version should receive new workflow
61-
// executions and tasks of existing unversioned or AutoUpgrade workflows.
60+
// Specifies which Deployment Version should receive new workflow executions and tasks of existing
61+
// unversioned or AutoUpgrade workflows.
62+
// Nil means this task queue will route tasks to all the unversioned workers (those with `UNVERSIONED`
63+
// (or unspecified) `WorkerVersioningMode`.)
6264
// Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp
6365
// is set (see `ramping_version`.)
64-
oneof current {
65-
temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7;
66-
// Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
67-
bool current_unversioned = 8;
68-
}
66+
temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7;
67+
6968
// Deprecated. Use `current`.
7069
string current_version = 1 [deprecated = true];
70+
7171
// When present, it means the traffic is being shifted from the Current Version to the Ramping Version.
72-
// Must always be different from `current_version`.
72+
// Must always be different from the Current Version.
7373
// Note that it is possible to ramp from one Version to another Version, or from unversioned
74-
// workers to a particular Version, or from a particular Version to unversioned workers.
75-
oneof ramping {
76-
temporal.api.deployment.v1.WorkerDeploymentVersion ramping_deployment_version = 9;
77-
// Represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)
78-
bool ramping_unversioned = 10;
79-
}
74+
// workers to a particular Version, or from a particular Version to unversioned workers
75+
// For example,
76+
// Ramping N% of traffic _from_ unversioned workers _to_ a particular Version V:
77+
// ```
78+
// current_deployment_version = nil
79+
// ramping_deployment_version = V
80+
// ramping_version_percentage = N
81+
// ```
82+
// Ramping N% of traffic _from_ a particular Version V _to_ unversioned workers:
83+
// ```
84+
// current_deployment_version = nil
85+
// ramping_deployment_version = V
86+
// ramping_version_percentage = (100 - N)
87+
// ```
88+
temporal.api.deployment.v1.WorkerDeploymentVersion ramping_deployment_version = 9;
89+
8090
// Deprecated. Use `ramping`.
8191
string ramping_version = 2 [deprecated = true];
92+
8293
// Percentage of tasks that are routed to the Ramping Version instead of the Current Version.
8394
// Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but
8495
// not yet "promoted" to be the Current Version, likely due to pending validations.
8596
float ramping_version_percentage = 3;
97+
8698
// Last time versioning information of this Task Queue changed.
8799
google.protobuf.Timestamp update_time = 4;
88100
}

temporal/api/workflow/v1/message.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,12 @@ message VersioningOverride {
585585
// If original behavior is Pinned or PinnedUntilContinueAsNew, keep that behavior.
586586
// If original behavior is AutoUpgrade, override behavior to Pinned.
587587
PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED = 0;
588+
589+
// Not yet supported. Reserved for future use.
588590
// Override workflow behavior to be Pinned.
589591
PINNED_OVERRIDE_BEHAVIOR_PINNED = 1;
592+
593+
// Not yet supported. Reserved for future use.
590594
// Override workflow behavior to be PinnedUntilContinueAsNew.
591595
PINNED_OVERRIDE_BEHAVIOR_PINNED_UNTIL_CONTINUE_AS_NEW = 2;
592596
}

0 commit comments

Comments
 (0)