Skip to content

Add TASK_QUEUE_KIND_WORKER_COMMANDS support#9899

Open
rkannan82 wants to merge 5 commits intokannan/ephemeral-partition-propertyfrom
kannan/worker-commands-partition-metrics
Open

Add TASK_QUEUE_KIND_WORKER_COMMANDS support#9899
rkannan82 wants to merge 5 commits intokannan/ephemeral-partition-propertyfrom
kannan/worker-commands-partition-metrics

Conversation

@rkannan82
Copy link
Copy Markdown
Contributor

@rkannan82 rkannan82 commented Apr 10, 2026

What

Handle the new TASK_QUEUE_KIND_WORKER_COMMANDS task queue kind by adding a WorkerCommandsPartition type to tqid (the server-side representation, similar to how StickyPartition represents TASK_QUEUE_KIND_STICKY).

Depends on:

Why

Worker-commands queues have different characteristics from normal and sticky queues — they are ephemeral, single-partition, and used for server-to-worker communication. A distinct partition type allows the server to handle them appropriately: no fan-out/partitioning, distinct partition=__worker_commands__ metric tag, and a foundation for any future kind-specific behavior.

How did you test it?

Unit tests covering normal, sticky, and worker-commands partitions with both breakdown-enabled and breakdown-disabled metric configs.

🤖 Generated with Claude Code

@rkannan82 rkannan82 requested review from a team as code owners April 10, 2026 00:59
@rkannan82 rkannan82 changed the title Add WorkerCommandsPartition type for metrics Add WorkerCommandsPartition type for worker-commands task queues Apr 10, 2026
@rkannan82 rkannan82 changed the title Add WorkerCommandsPartition type for worker-commands task queues Add TASK_QUEUE_KIND_WORKER_COMMANDS support Apr 10, 2026
@rkannan82 rkannan82 force-pushed the kannan/worker-commands-partition-metrics branch 6 times, most recently from 7d9ffcf to a51f55b Compare April 10, 2026 04:25
@rkannan82 rkannan82 changed the base branch from main to kannan/ephemeral-partition-property April 10, 2026 04:26
@rkannan82 rkannan82 force-pushed the kannan/ephemeral-partition-property branch from a163283 to 2b99d6a Compare April 10, 2026 04:54
rkannan82 and others added 5 commits April 9, 2026 21:54
When the SDK sets Kind=TASK_QUEUE_KIND_WORKER_COMMANDS, the server now
creates a WorkerCommandsPartition (similar to StickyPartition). Metrics
for these partitions get partition=__worker_commands__ and the taskqueue
tag is suppressed to __omitted__ to prevent cardinality explosion from
per-worker queue names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Match StickyPartition explicitly instead of using default case
- Default to unknownValue for unrecognized partition types
- Remove taskQueueBreakdown=false override; BreakdownMetricsByTaskQueue
  already controls this

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rkannan82 rkannan82 force-pushed the kannan/worker-commands-partition-metrics branch from a51f55b to d3d045d Compare April 10, 2026 04:54
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.

1 participant