Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Comment on lines +137 to +140
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait why is this both newly added and already deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because we first added it. then I removed it in #483, then I realized it will break recent SDK changes that @antlai-temporal made in versioning-3 branch, then I added back in this PR as deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we don't need it and it is just in my branch we could just delete it...


// 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;
Comment on lines +354 to 355
Copy link
Member

@Sushisource Sushisource Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing we don't do this consistently everywhere, but, I think deprecation warnings really should go first at the top of the comment.

Also we probably want to use the official [deprecated = true] tag: https://protobuf.dev/programming-guides/proto3/

(I'd say let's apply this everywhere we're deprecating things for this)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know. I'll add the official deprecation tag in my next PR.

// 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;
Comment on lines -365 to -367
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antlai-temporal looking at the comment for versioning_behavior, I realized the stamp is not serving us well is v3 and is basically a twisted way of representing Deployment and versioned/unversioned boolean. I think Deployment and VersioningBehavior is perfect for these responsibilities, hence I'm deprecating the stamp. Please consider setting the deployment field instead of the stamp when v3 is used (WorkerDeploymentOptions is set).

// 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