Skip to content

Commit ad41fcf

Browse files
authored
Deprecate WorkerVersionStamp and replace it with Deployment (#484)
* Add Deployment APIs * Move UpdateDeploymentMemo to deployment dir * Address feedback & rename deployment_name * Addressed comments * Addressed feedback * WIP git rid of stamp * Deprecate WorkerVersionStamp * Rename RedirectInfo to DeploymentTransition * undo enum comment change * regen files * Deprecate WorkerVersionStamp and replace it with Deployment * Deprecate WorkerVersionStamp and replace it with Deployment
1 parent b57a442 commit ad41fcf

File tree

4 files changed

+74
-6
lines changed

4 files changed

+74
-6
lines changed

openapi/openapiv2.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5823,7 +5823,11 @@
58235823
},
58245824
"workerVersion": {
58255825
"$ref": "#/definitions/v1WorkerVersionStamp",
5826-
"description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more."
5826+
"description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment` instead."
5827+
},
5828+
"deployment": {
5829+
"$ref": "#/definitions/v1Deployment",
5830+
"description": "Deployment info of the worker that completed this task. Must be present if user has set\n`WorkerDeploymentOptions` regardless of versioning being enabled or not."
58275831
}
58285832
}
58295833
},
@@ -5870,7 +5874,11 @@
58705874
},
58715875
"workerVersion": {
58725876
"$ref": "#/definitions/v1WorkerVersionStamp",
5873-
"description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more."
5877+
"description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment` instead."
5878+
},
5879+
"deployment": {
5880+
"$ref": "#/definitions/v1Deployment",
5881+
"description": "Deployment info of the worker that completed this task. Must be present if user has set\n`WorkerDeploymentOptions` regardless of versioning being enabled or not."
58745882
}
58755883
}
58765884
},
@@ -5921,7 +5929,11 @@
59215929
},
59225930
"workerVersion": {
59235931
"$ref": "#/definitions/v1WorkerVersionStamp",
5924-
"description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more."
5932+
"description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment` instead."
5933+
},
5934+
"deployment": {
5935+
"$ref": "#/definitions/v1Deployment",
5936+
"description": "Deployment info of the worker that completed this task. Must be present if user has set\n`WorkerDeploymentOptions` regardless of versioning being enabled or not."
59255937
}
59265938
}
59275939
},
@@ -12367,6 +12379,10 @@
1236712379
"useVersioning": {
1236812380
"type": "boolean",
1236912381
"description": "If set, the worker is opting in to worker versioning. Otherwise, this is used only as a\nmarker for workflow reset points and the BuildIDs search attribute."
12382+
},
12383+
"deploymentSeriesName": {
12384+
"type": "string",
12385+
"description": "Must be sent if user has set a deployment series name (versioning-3).\nDeprecated. SDK should return `Deployment` in the requests to server instead of populating\nthis field."
1237012386
}
1237112387
},
1237212388
"description": "Identifies the version of a worker that received or processed a task\nDeprecated. This message is replaced with `Deployment` and `VersioningBehavior`."

openapi/openapiv3.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7921,6 +7921,13 @@ components:
79217921
Version info of the worker who processed this task. This message's `build_id` field should
79227922
always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
79237923
field to true. See message docstrings for more.
7924+
Deprecated. Use `deployment` instead.
7925+
deployment:
7926+
allOf:
7927+
- $ref: '#/components/schemas/Deployment'
7928+
description: |-
7929+
Deployment info of the worker that completed this task. Must be present if user has set
7930+
`WorkerDeploymentOptions` regardless of versioning being enabled or not.
79247931
RespondActivityTaskCanceledResponse:
79257932
type: object
79267933
properties: {}
@@ -7972,6 +7979,13 @@ components:
79727979
Version info of the worker who processed this task. This message's `build_id` field should
79737980
always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
79747981
field to true. See message docstrings for more.
7982+
Deprecated. Use `deployment` instead.
7983+
deployment:
7984+
allOf:
7985+
- $ref: '#/components/schemas/Deployment'
7986+
description: |-
7987+
Deployment info of the worker that completed this task. Must be present if user has set
7988+
`WorkerDeploymentOptions` regardless of versioning being enabled or not.
79757989
RespondActivityTaskCompletedResponse:
79767990
type: object
79777991
properties: {}
@@ -8038,6 +8052,13 @@ components:
80388052
Version info of the worker who processed this task. This message's `build_id` field should
80398053
always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
80408054
field to true. See message docstrings for more.
8055+
Deprecated. Use `deployment` instead.
8056+
deployment:
8057+
allOf:
8058+
- $ref: '#/components/schemas/Deployment'
8059+
description: |-
8060+
Deployment info of the worker that completed this task. Must be present if user has set
8061+
`WorkerDeploymentOptions` regardless of versioning being enabled or not.
80418062
RespondActivityTaskFailedResponse:
80428063
type: object
80438064
properties:
@@ -9749,6 +9770,12 @@ components:
97499770
description: |-
97509771
If set, the worker is opting in to worker versioning. Otherwise, this is used only as a
97519772
marker for workflow reset points and the BuildIDs search attribute.
9773+
deploymentSeriesName:
9774+
type: string
9775+
description: |-
9776+
Must be sent if user has set a deployment series name (versioning-3).
9777+
Deprecated. SDK should return `Deployment` in the requests to server instead of populating
9778+
this field.
97529779
description: |-
97539780
Identifies the version of a worker that received or processed a task
97549781
Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`.

temporal/api/common/v1/message.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ message WorkerVersionStamp {
134134
// marker for workflow reset points and the BuildIDs search attribute.
135135
bool use_versioning = 3;
136136

137+
// Must be sent if user has set a deployment series name (versioning-3).
138+
// Deprecated. SDK should return `Deployment` in the requests to server instead of populating
139+
// this field.
140+
string deployment_series_name = 4;
141+
137142
// Later, may include bundle id that could be used for WASM and/or JS dynamically loadable bundles.
138143
}
139144

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ message RespondWorkflowTaskCompletedRequest {
351351
// Version info of the worker who processed this task. This message's `build_id` field should
352352
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
353353
// field to true. See message docstrings for more.
354+
// Deprecated. Use `deployment` and `versioning_behavior` instead.
354355
temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10;
355356
// Default versioning behavior that is set at worker server level.
356357
// Protocol messages piggybacking on a WFT as a transport
@@ -362,9 +363,12 @@ message RespondWorkflowTaskCompletedRequest {
362363
temporal.api.common.v1.MeteringMetadata metering_metadata = 13;
363364
reserved 14;
364365
reserved "capabilities";
365-
// Must be set when versioning-3 is used (i.e. `worker_version_stamp.use_versioning` is `true`
366-
// and `worker_version_stamp.deployment_series_name` is provided).
367-
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 15;
366+
// Deployment info of the worker that completed this task. Must be present if user has set
367+
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
368+
temporal.api.deployment.v1.Deployment deployment = 15;
369+
// Versioning behavior of this workflow execution as set on the worker that completed this task.
370+
// UNSPECIFIED means versioning is not enabled in the worker.
371+
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 16;
368372
}
369373

370374
message RespondWorkflowTaskCompletedResponse {
@@ -397,7 +401,11 @@ message RespondWorkflowTaskFailedRequest {
397401
// Version info of the worker who processed this task. This message's `build_id` field should
398402
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
399403
// field to true. See message docstrings for more.
404+
// Deprecated. Use `deployment` instead.
400405
temporal.api.common.v1.WorkerVersionStamp worker_version = 8;
406+
// Deployment info of the worker that completed this task. Must be present if user has set
407+
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
408+
temporal.api.deployment.v1.Deployment deployment = 9;
401409
}
402410

403411
message RespondWorkflowTaskFailedResponse {
@@ -510,7 +518,11 @@ message RespondActivityTaskCompletedRequest {
510518
// Version info of the worker who processed this task. This message's `build_id` field should
511519
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
512520
// field to true. See message docstrings for more.
521+
// Deprecated. Use `deployment` instead.
513522
temporal.api.common.v1.WorkerVersionStamp worker_version = 5;
523+
// Deployment info of the worker that completed this task. Must be present if user has set
524+
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
525+
temporal.api.deployment.v1.Deployment deployment = 6;
514526
}
515527

516528
message RespondActivityTaskCompletedResponse {
@@ -547,7 +559,11 @@ message RespondActivityTaskFailedRequest {
547559
// Version info of the worker who processed this task. This message's `build_id` field should
548560
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
549561
// field to true. See message docstrings for more.
562+
// Deprecated. Use `deployment` instead.
550563
temporal.api.common.v1.WorkerVersionStamp worker_version = 6;
564+
// Deployment info of the worker that completed this task. Must be present if user has set
565+
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
566+
temporal.api.deployment.v1.Deployment deployment = 7;
551567
}
552568

553569
message RespondActivityTaskFailedResponse {
@@ -590,7 +606,11 @@ message RespondActivityTaskCanceledRequest {
590606
// Version info of the worker who processed this task. This message's `build_id` field should
591607
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
592608
// field to true. See message docstrings for more.
609+
// Deprecated. Use `deployment` instead.
593610
temporal.api.common.v1.WorkerVersionStamp worker_version = 5;
611+
// Deployment info of the worker that completed this task. Must be present if user has set
612+
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
613+
temporal.api.deployment.v1.Deployment deployment = 6;
594614
}
595615

596616
message RespondActivityTaskCanceledResponse {

0 commit comments

Comments
 (0)