Skip to content

[DO_NOT_SUBMIT] Implement CountWorkers API#9476

Open
rkannan82 wants to merge 7 commits into
mainfrom
kannan/count-workers
Open

[DO_NOT_SUBMIT] Implement CountWorkers API#9476
rkannan82 wants to merge 7 commits into
mainfrom
kannan/count-workers

Conversation

@rkannan82
Copy link
Copy Markdown
Contributor

@rkannan82 rkannan82 commented Mar 11, 2026

What

Add CountWorkers RPC to count workers matching a query filter without retrieving full worker details.

Why

The UI needs to display a worker count in places where listing isn't necessary. A dedicated count API follows the existing pattern (CountWorkflowExecutions, CountSchedules).

How did you test it?

  • new unit tests: count all, count with query filter, count with no matches, invalid query error

Implement CountWorkers RPC across frontend, matching, and worker registry.
This provides a visibility API to count workers matching a query filter
without retrieving full worker details.

Changes:
- Add CountWorkers to internal matchingservice proto
- Implement CountWorkers in worker registry (reuses filterWorkers)
- Wire through matching handler and frontend workflow handler
- Add DC redirection, quotas, and genrpcwrappers routing
- Add functional test for CountWorkers
- Use replace directive for api-go with CountWorkers proto

Made-with: Cursor
@rkannan82 rkannan82 requested review from a team as code owners March 11, 2026 18:40
- Remove deprecated ListWorkersEnabled check (flag is always true)
- Extract buildQueryPredicate helper shared by ListWorkers and CountWorkers
- Tighten count-all assertion to exact match (isolated namespace)
- Add test for invalid query returning error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rkannan82 rkannan82 changed the title Add CountWorkers API Implement CountWorkers API Jun 4, 2026
@rkannan82 rkannan82 requested review from a team as code owners June 4, 2026 22:34
rkannan82 and others added 3 commits June 4, 2026 15:35
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves conflicts in registry_impl.go (includeSystemWorkers param),
handler.go (workerHeartbeatToListInfo), and service.proto (api_category).
Updates api-go replace directive to include CountWorkers + latest main.

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 requested a review from ShahabT June 4, 2026 23:25
@rkannan82 rkannan82 changed the title Implement CountWorkers API [DO_NOT_SUBMIT] Implement CountWorkers API Jun 5, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.

1 participant