Skip to content

Add Stats to DescribeWorkerDeploymentVersion #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 26, 2025
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
39 changes: 38 additions & 1 deletion openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1777,6 +1777,13 @@
"in": "query",
"required": false,
"type": "string"
},
{
"name": "reportTaskQueueStats",
"description": "Report stats for task queues which have been polled by this version.",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
Expand Down Expand Up @@ -5378,6 +5385,13 @@
"in": "query",
"required": false,
"type": "string"
},
{
"name": "reportTaskQueueStats",
"description": "Report stats for task queues which have been polled by this version.",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
Expand Down Expand Up @@ -6918,6 +6932,21 @@
}
}
},
"DescribeWorkerDeploymentVersionResponseVersionTaskQueue": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/v1TaskQueueType"
},
"stats": {
"$ref": "#/definitions/v1TaskQueueStats",
"description": "Only set if `report_task_queue_stats` is set on the request."
}
}
},
"EndpointTargetExternal": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -10326,6 +10355,14 @@
"properties": {
"workerDeploymentVersionInfo": {
"$ref": "#/definitions/v1WorkerDeploymentVersionInfo"
},
"versionTaskQueues": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/DescribeWorkerDeploymentVersionResponseVersionTaskQueue"
},
"description": "All the Task Queues that have ever polled from this Deployment version."
}
}
},
Expand Down Expand Up @@ -15252,7 +15289,7 @@
"type": "object",
"$ref": "#/definitions/WorkerDeploymentVersionInfoVersionTaskQueueInfo"
},
"description": "All the Task Queues that have ever polled from this Deployment version."
"description": "All the Task Queues that have ever polled from this Deployment version.\nDeprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead."
},
"drainageInfo": {
"$ref": "#/definitions/v1VersionDrainageInfo",
Expand Down
36 changes: 35 additions & 1 deletion openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,11 @@ paths:
description: Identifies the Worker Deployment this Version is part of.
schema:
type: string
- name: reportTaskQueueStats
in: query
description: Report stats for task queues which have been polled by this version.
schema:
type: boolean
responses:
"200":
description: OK
Expand Down Expand Up @@ -4823,6 +4828,11 @@ paths:
description: Identifies the Worker Deployment this Version is part of.
schema:
type: string
- name: reportTaskQueueStats
in: query
description: Report stats for task queues which have been polled by this version.
schema:
type: boolean
responses:
"200":
description: OK
Expand Down Expand Up @@ -7536,6 +7546,28 @@ components:
properties:
workerDeploymentVersionInfo:
$ref: '#/components/schemas/WorkerDeploymentVersionInfo'
versionTaskQueues:
type: array
items:
$ref: '#/components/schemas/DescribeWorkerDeploymentVersionResponse_VersionTaskQueue'
description: All the Task Queues that have ever polled from this Deployment version.
DescribeWorkerDeploymentVersionResponse_VersionTaskQueue:
type: object
properties:
name:
type: string
type:
enum:
- TASK_QUEUE_TYPE_UNSPECIFIED
- TASK_QUEUE_TYPE_WORKFLOW
- TASK_QUEUE_TYPE_ACTIVITY
- TASK_QUEUE_TYPE_NEXUS
type: string
format: enum
stats:
allOf:
- $ref: '#/components/schemas/TaskQueueStats'
description: Only set if `report_task_queue_stats` is set on the request.
DescribeWorkflowExecutionResponse:
type: object
properties:
Expand Down Expand Up @@ -12637,7 +12669,9 @@ components:
type: array
items:
$ref: '#/components/schemas/WorkerDeploymentVersionInfo_VersionTaskQueueInfo'
description: All the Task Queues that have ever polled from this Deployment version.
description: |-
All the Task Queues that have ever polled from this Deployment version.
Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead.
drainageInfo:
allOf:
- $ref: '#/components/schemas/VersionDrainageInfo'
Expand Down
1 change: 1 addition & 0 deletions temporal/api/deployment/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ message WorkerDeploymentVersionInfo {
float ramp_percentage = 7;

// All the Task Queues that have ever polled from this Deployment version.
// Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead.
repeated VersionTaskQueueInfo task_queue_infos = 8;
message VersionTaskQueueInfo {
string name = 1;
Expand Down
12 changes: 12 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2026,10 +2026,22 @@ message DescribeWorkerDeploymentVersionRequest {
string version = 2 [deprecated = true];
// Required.
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 3;
// Report stats for task queues which have been polled by this version.
bool report_task_queue_stats = 4;
}

message DescribeWorkerDeploymentVersionResponse {
temporal.api.deployment.v1.WorkerDeploymentVersionInfo worker_deployment_version_info = 1;

// All the Task Queues that have ever polled from this Deployment version.
repeated VersionTaskQueue version_task_queues = 2;
// (-- api-linter: core::0123::resource-annotation=disabled --)
message VersionTaskQueue {
string name = 1;
temporal.api.enums.v1.TaskQueueType type = 2;
// Only set if `report_task_queue_stats` is set on the request.
temporal.api.taskqueue.v1.TaskQueueStats stats = 3;
}
}

message DescribeWorkerDeploymentRequest {
Expand Down
Loading