Skip to content

Commit babf177

Browse files
authored
Add Stats to DescribeTaskQueue (#596)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted._ <!-- Describe what has changed in this PR --> **What changed?** Added `TaskQueueStats` field to `DescribeTaskQueueResponse`. <!-- Tell your future self why have you made these changes --> **Why?** To provide non-versioning users with relevant task queue stats. PS: The long-term plan is to deprecate the ENHANCED mod fields. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** N/A <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> **Server PR** temporalio/temporal#7816
1 parent e1251ac commit babf177

File tree

3 files changed

+136
-92
lines changed

3 files changed

+136
-92
lines changed

openapi/openapiv2.json

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@
15101510
},
15111511
{
15121512
"name": "taskQueueType",
1513-
"description": "Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode.\nIf unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
1513+
"description": "If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\nOnly supported in default mode (use `task_queue_types` in ENHANCED mode instead).\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
15141514
"in": "query",
15151515
"required": false,
15161516
"type": "string",
@@ -1522,16 +1522,23 @@
15221522
],
15231523
"default": "TASK_QUEUE_TYPE_UNSPECIFIED"
15241524
},
1525+
{
1526+
"name": "reportStats",
1527+
"description": "Report stats for the requested task queue type(s).",
1528+
"in": "query",
1529+
"required": false,
1530+
"type": "boolean"
1531+
},
15251532
{
15261533
"name": "includeTaskQueueStatus",
1527-
"description": "Deprecated. Ignored in `ENHANCED` mode.",
1534+
"description": "Deprecated, use `report_stats` instead.\nIf true, the task queue status will be included in the response.",
15281535
"in": "query",
15291536
"required": false,
15301537
"type": "boolean"
15311538
},
15321539
{
15331540
"name": "apiMode",
1534-
"description": "All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode.\n\n - DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED: Unspecified means legacy behavior.\n - DESCRIBE_TASK_QUEUE_MODE_ENHANCED: Enhanced mode reports aggregated results for all partitions, supports Build IDs, and reports richer info.",
1541+
"description": "Deprecated. ENHANCED mode is also being deprecated.\nSelect the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode.\nConsult the documentation for each field to understand which mode it is supported in.\n\n - DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED: Unspecified means legacy behavior.\n - DESCRIBE_TASK_QUEUE_MODE_ENHANCED: Enhanced mode reports aggregated results for all partitions, supports Build IDs, and reports richer info.",
15351542
"in": "query",
15361543
"required": false,
15371544
"type": "string",
@@ -1568,7 +1575,7 @@
15681575
},
15691576
{
15701577
"name": "taskQueueTypes",
1571-
"description": "Task queue types to report info about. If not specified, all types are considered.\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
1578+
"description": "Deprecated (as part of the ENHANCED mode deprecation).\nTask queue types to report info about. If not specified, all types are considered.\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
15721579
"in": "query",
15731580
"required": false,
15741581
"type": "array",
@@ -1583,23 +1590,16 @@
15831590
},
15841591
"collectionFormat": "multi"
15851592
},
1586-
{
1587-
"name": "reportStats",
1588-
"description": "Report stats for the requested task queue types and versions",
1589-
"in": "query",
1590-
"required": false,
1591-
"type": "boolean"
1592-
},
15931593
{
15941594
"name": "reportPollers",
1595-
"description": "Report list of pollers for requested task queue types and versions",
1595+
"description": "Deprecated (as part of the ENHANCED mode deprecation).\nReport list of pollers for requested task queue types and versions.",
15961596
"in": "query",
15971597
"required": false,
15981598
"type": "boolean"
15991599
},
16001600
{
16011601
"name": "reportTaskReachability",
1602-
"description": "Report task reachability for the requested versions and all task types (task reachability is not reported\nper task type).",
1602+
"description": "Deprecated (as part of the ENHANCED mode deprecation).\nReport task reachability for the requested versions and all task types (task reachability is not reported\nper task type).",
16031603
"in": "query",
16041604
"required": false,
16051605
"type": "boolean"
@@ -5058,7 +5058,7 @@
50585058
},
50595059
{
50605060
"name": "taskQueueType",
5061-
"description": "Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode.\nIf unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
5061+
"description": "If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\nOnly supported in default mode (use `task_queue_types` in ENHANCED mode instead).\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
50625062
"in": "query",
50635063
"required": false,
50645064
"type": "string",
@@ -5070,16 +5070,23 @@
50705070
],
50715071
"default": "TASK_QUEUE_TYPE_UNSPECIFIED"
50725072
},
5073+
{
5074+
"name": "reportStats",
5075+
"description": "Report stats for the requested task queue type(s).",
5076+
"in": "query",
5077+
"required": false,
5078+
"type": "boolean"
5079+
},
50735080
{
50745081
"name": "includeTaskQueueStatus",
5075-
"description": "Deprecated. Ignored in `ENHANCED` mode.",
5082+
"description": "Deprecated, use `report_stats` instead.\nIf true, the task queue status will be included in the response.",
50765083
"in": "query",
50775084
"required": false,
50785085
"type": "boolean"
50795086
},
50805087
{
50815088
"name": "apiMode",
5082-
"description": "All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode.\n\n - DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED: Unspecified means legacy behavior.\n - DESCRIBE_TASK_QUEUE_MODE_ENHANCED: Enhanced mode reports aggregated results for all partitions, supports Build IDs, and reports richer info.",
5089+
"description": "Deprecated. ENHANCED mode is also being deprecated.\nSelect the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode.\nConsult the documentation for each field to understand which mode it is supported in.\n\n - DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED: Unspecified means legacy behavior.\n - DESCRIBE_TASK_QUEUE_MODE_ENHANCED: Enhanced mode reports aggregated results for all partitions, supports Build IDs, and reports richer info.",
50835090
"in": "query",
50845091
"required": false,
50855092
"type": "string",
@@ -5116,7 +5123,7 @@
51165123
},
51175124
{
51185125
"name": "taskQueueTypes",
5119-
"description": "Task queue types to report info about. If not specified, all types are considered.\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
5126+
"description": "Deprecated (as part of the ENHANCED mode deprecation).\nTask queue types to report info about. If not specified, all types are considered.\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.",
51205127
"in": "query",
51215128
"required": false,
51225129
"type": "array",
@@ -5131,23 +5138,16 @@
51315138
},
51325139
"collectionFormat": "multi"
51335140
},
5134-
{
5135-
"name": "reportStats",
5136-
"description": "Report stats for the requested task queue types and versions",
5137-
"in": "query",
5138-
"required": false,
5139-
"type": "boolean"
5140-
},
51415141
{
51425142
"name": "reportPollers",
5143-
"description": "Report list of pollers for requested task queue types and versions",
5143+
"description": "Deprecated (as part of the ENHANCED mode deprecation).\nReport list of pollers for requested task queue types and versions.",
51445144
"in": "query",
51455145
"required": false,
51465146
"type": "boolean"
51475147
},
51485148
{
51495149
"name": "reportTaskReachability",
5150-
"description": "Report task reachability for the requested versions and all task types (task reachability is not reported\nper task type).",
5150+
"description": "Deprecated (as part of the ENHANCED mode deprecation).\nReport task reachability for the requested versions and all task types (task reachability is not reported\nper task type).",
51515151
"in": "query",
51525152
"required": false,
51535153
"type": "boolean"
@@ -10081,23 +10081,26 @@
1008110081
"items": {
1008210082
"type": "object",
1008310083
"$ref": "#/definitions/v1PollerInfo"
10084-
},
10085-
"description": "Deprecated. Use `versions_info.types_info.pollers` with `ENHANCED` mode instead.\nNot set in `ENHANCED` mode."
10084+
}
10085+
},
10086+
"stats": {
10087+
"$ref": "#/definitions/v1TaskQueueStats",
10088+
"description": "Statistics for the task queue. Only populated when `report_stats` is set to true in the request."
10089+
},
10090+
"versioningInfo": {
10091+
"$ref": "#/definitions/v1TaskQueueVersioningInfo",
10092+
"description": "Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.\nWhen not present, it means the tasks are routed to Unversioned workers (workers with\nUNVERSIONED or unspecified WorkerVersioningMode.)\nTask Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion\nand SetWorkerDeploymentRampingVersion on Worker Deployments.\nNote: This information is not relevant to Pinned workflow executions and their activities as\nthey are always routed to their Pinned Deployment Version. However, new workflow executions\nare typically not Pinned until they complete their first task (unless they are started with\na Pinned VersioningOverride or are Child Workflows of a Pinned parent)."
1008610093
},
1008710094
"taskQueueStatus": {
1008810095
"$ref": "#/definitions/v1TaskQueueStatus",
10089-
"description": "Deprecated. Not set in `ENHANCED` mode."
10096+
"description": "Deprecated.\nStatus of the task queue. Only populated when `include_task_queue_status` is set to true in the request."
1009010097
},
1009110098
"versionsInfo": {
1009210099
"type": "object",
1009310100
"additionalProperties": {
1009410101
"$ref": "#/definitions/v1TaskQueueVersionInfo"
1009510102
},
10096-
"description": "This map contains Task Queue information for each Build ID. Empty string as key value means unversioned.\nOnly set in `ENHANCED` mode."
10097-
},
10098-
"versioningInfo": {
10099-
"$ref": "#/definitions/v1TaskQueueVersioningInfo",
10100-
"description": "Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.\nWhen not present, it means the tasks are routed to Unversioned workers (workers with\nUNVERSIONED or unspecified WorkerVersioningMode.)\nTask Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion\nand SetWorkerDeploymentRampingVersion on Worker Deployments.\nNote: This information is not relevant to Pinned workflow executions and their activities as\nthey are always routed to their Pinned Deployment Version. However, new workflow executions\nare typically not Pinned until they complete their first task (unless they are started with\na Pinned VersioningOverride or are Child Workflows of a Pinned parent)."
10103+
"description": "Deprecated.\nOnly returned in ENHANCED mode.\nThis map contains Task Queue information for each Build ID. Empty string as key value means unversioned."
1010110104
}
1010210105
}
1010310106
},

0 commit comments

Comments
 (0)