Skip to content

Commit

Permalink
Deprecate WorkerVersionStamp and replace it with Deployment (#484)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ShahabT authored Nov 20, 2024
1 parent b57a442 commit ad41fcf
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 6 deletions.
22 changes: 19 additions & 3 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5823,7 +5823,11 @@
},
"workerVersion": {
"$ref": "#/definitions/v1WorkerVersionStamp",
"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."
"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."
},
"deployment": {
"$ref": "#/definitions/v1Deployment",
"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."
}
}
},
Expand Down Expand Up @@ -5870,7 +5874,11 @@
},
"workerVersion": {
"$ref": "#/definitions/v1WorkerVersionStamp",
"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."
"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."
},
"deployment": {
"$ref": "#/definitions/v1Deployment",
"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."
}
}
},
Expand Down Expand Up @@ -5921,7 +5929,11 @@
},
"workerVersion": {
"$ref": "#/definitions/v1WorkerVersionStamp",
"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."
"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."
},
"deployment": {
"$ref": "#/definitions/v1Deployment",
"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."
}
}
},
Expand Down Expand Up @@ -12367,6 +12379,10 @@
"useVersioning": {
"type": "boolean",
"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."
},
"deploymentSeriesName": {
"type": "string",
"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."
}
},
"description": "Identifies the version of a worker that received or processed a task\nDeprecated. This message is replaced with `Deployment` and `VersioningBehavior`."
Expand Down
27 changes: 27 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7921,6 +7921,13 @@ components:
Version info of the worker who processed this task. This message's `build_id` field should
always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
field to true. See message docstrings for more.
Deprecated. Use `deployment` instead.
deployment:
allOf:
- $ref: '#/components/schemas/Deployment'
description: |-
Deployment info of the worker that completed this task. Must be present if user has set
`WorkerDeploymentOptions` regardless of versioning being enabled or not.
RespondActivityTaskCanceledResponse:
type: object
properties: {}
Expand Down Expand Up @@ -7972,6 +7979,13 @@ components:
Version info of the worker who processed this task. This message's `build_id` field should
always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
field to true. See message docstrings for more.
Deprecated. Use `deployment` instead.
deployment:
allOf:
- $ref: '#/components/schemas/Deployment'
description: |-
Deployment info of the worker that completed this task. Must be present if user has set
`WorkerDeploymentOptions` regardless of versioning being enabled or not.
RespondActivityTaskCompletedResponse:
type: object
properties: {}
Expand Down Expand Up @@ -8038,6 +8052,13 @@ components:
Version info of the worker who processed this task. This message's `build_id` field should
always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
field to true. See message docstrings for more.
Deprecated. Use `deployment` instead.
deployment:
allOf:
- $ref: '#/components/schemas/Deployment'
description: |-
Deployment info of the worker that completed this task. Must be present if user has set
`WorkerDeploymentOptions` regardless of versioning being enabled or not.
RespondActivityTaskFailedResponse:
type: object
properties:
Expand Down Expand Up @@ -9749,6 +9770,12 @@ components:
description: |-
If set, the worker is opting in to worker versioning. Otherwise, this is used only as a
marker for workflow reset points and the BuildIDs search attribute.
deploymentSeriesName:
type: string
description: |-
Must be sent if user has set a deployment series name (versioning-3).
Deprecated. SDK should return `Deployment` in the requests to server instead of populating
this field.
description: |-
Identifies the version of a worker that received or processed a task
Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`.
Expand Down
5 changes: 5 additions & 0 deletions temporal/api/common/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ message WorkerVersionStamp {
// marker for workflow reset points and the BuildIDs search attribute.
bool use_versioning = 3;

// Must be sent if user has set a deployment series name (versioning-3).
// Deprecated. SDK should return `Deployment` in the requests to server instead of populating
// this field.
string deployment_series_name = 4;

// Later, may include bundle id that could be used for WASM and/or JS dynamically loadable bundles.
}

Expand Down
26 changes: 23 additions & 3 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ message RespondWorkflowTaskCompletedRequest {
// Version info of the worker who processed this task. This message's `build_id` field should
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
// field to true. See message docstrings for more.
// Deprecated. Use `deployment` and `versioning_behavior` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10;
// Default versioning behavior that is set at worker server level.
// Protocol messages piggybacking on a WFT as a transport
Expand All @@ -362,9 +363,12 @@ message RespondWorkflowTaskCompletedRequest {
temporal.api.common.v1.MeteringMetadata metering_metadata = 13;
reserved 14;
reserved "capabilities";
// Must be set when versioning-3 is used (i.e. `worker_version_stamp.use_versioning` is `true`
// and `worker_version_stamp.deployment_series_name` is provided).
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 15;
// Deployment info of the worker that completed this task. Must be present if user has set
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
temporal.api.deployment.v1.Deployment deployment = 15;
// Versioning behavior of this workflow execution as set on the worker that completed this task.
// UNSPECIFIED means versioning is not enabled in the worker.
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 16;
}

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

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

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

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

message RespondActivityTaskCanceledResponse {
Expand Down

0 comments on commit ad41fcf

Please sign in to comment.