Skip to content

Add CountWorkers API#9476

Open
rkannan82 wants to merge 1 commit intomainfrom
kannan/count-workers
Open

Add CountWorkers API#9476
rkannan82 wants to merge 1 commit intomainfrom
kannan/count-workers

Conversation

@rkannan82
Copy link
Contributor

What changed?

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

  • Add CountWorkers to internal matchingservice proto
  • Implement CountWorkers in worker registry, matching handler, and frontend handler
  • Wire DC redirection, quotas, and client routing
  • Add functional test

Depends on temporalio/api#729 (uses replace directive until merged).

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?

  • built
  • run locally and tested manually
  • added new functional test(s)

Potential risks

None. New API only, no changes to existing behavior.

Made with Cursor

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
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