Skip to content

Add Stats to DescribeWorkerDeploymentVersion#603

Merged
stephanos merged 4 commits into
temporalio:masterfrom
stephanos:worker-deployment-stats
Jun 26, 2025
Merged

Add Stats to DescribeWorkerDeploymentVersion#603
stephanos merged 4 commits into
temporalio:masterfrom
stephanos:worker-deployment-stats

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Jun 19, 2025

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.

What changed?

(1) Deprecated task_queue_infos in deployment.WorkerDeploymentVersionInfo.
(2) Added version_task_queues to DescribeWorkerDeploymentVersionResponse.

Why?

We want to report task queue stats for each task queue that is part of a worker deployment version.

The challenge is that the taskqueue package depends on the deployment package. So adding TaskQueueStats to deployment.WorkerDeploymentVersionInfo causes a cycle import error.

Weighing our options, we decided to effectively move the task queue-related data from within the deployment package into the response message.

Breaking changes

Not yet; but in subsequent releases the deprecated field task_queue_infos will be removed.

Server PR

temporalio/temporal#7959 (draft)

@stephanos stephanos changed the title Worker deployment stats Add Stats to DescribeWorkerDeploymentVersion Jun 19, 2025
@stephanos stephanos force-pushed the worker-deployment-stats branch 6 times, most recently from f2d2dde to 412818a Compare June 24, 2025 15:29
@stephanos stephanos marked this pull request as ready for review June 24, 2025 21:00
@stephanos stephanos requested review from a team as code owners June 24, 2025 21:00
Copy link
Copy Markdown
Contributor

@cretz cretz left a comment

Choose a reason for hiding this comment

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

LGTM from a syntax POV, but will defer to other SDK team members more familiar w/ versioning. I admit I don't understand VersionTaskQueueInfo vs VersionTaskQueue and such.

@stephanos
Copy link
Copy Markdown
Contributor Author

stephanos commented Jun 24, 2025

FWIW, VersionTaskQueueInfo is just an arbitrary label; it wasn't used anywhere else. Same thing goes for VersionTaskQueue. I'm just trying to express "details of a versioned task queue".

@stephanos
Copy link
Copy Markdown
Contributor Author

stephanos commented Jun 24, 2025

Update: I just added report_task_queue_stats since I realized it was missing.

@stephanos stephanos force-pushed the worker-deployment-stats branch 2 times, most recently from 94fe9e8 to 361bc62 Compare June 24, 2025 23:31
Comment thread temporal/api/workflowservice/v1/request_response.proto Outdated
@stephanos stephanos force-pushed the worker-deployment-stats branch from 361bc62 to 94bd8a9 Compare June 26, 2025 00:25
Co-authored-by: Spencer Judge <sjudge@hey.com>
@stephanos stephanos enabled auto-merge (squash) June 26, 2025 18:13
@stephanos stephanos merged commit f73d351 into temporalio:master Jun 26, 2025
4 checks passed
@stephanos stephanos deleted the worker-deployment-stats branch June 26, 2025 18:29
stephanos added a commit that referenced this pull request Mar 10, 2026
_**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?**

(1) Deprecated `task_queue_infos` in
`deployment.WorkerDeploymentVersionInfo`.
(2) Added `version_task_queues` to
`DescribeWorkerDeploymentVersionResponse`.

<!-- Tell your future self why have you made these changes -->
**Why?**

We want to report task queue stats for each task queue that is part of a
worker deployment version.

The challenge is that the `taskqueue` package depends on the
`deployment` package. So adding `TaskQueueStats` to
`deployment.WorkerDeploymentVersionInfo` causes a cycle import error.

Weighing our options, we decided to effectively _move_ the task
queue-related data from within the deployment package into the response
message.

<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**

Not yet; but in subsequent releases the deprecated field
`task_queue_infos` will be removed.

<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**

temporalio/temporal#7959 (draft)

---------

Co-authored-by: Spencer Judge <sjudge@hey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants