Skip to content

Add CountWorkers API#729

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

Add CountWorkers API#729
rkannan82 wants to merge 1 commit intomasterfrom
kannan/count-workers

Conversation

@rkannan82
Copy link
Contributor

What changed?

Add CountWorkers RPC to WorkflowService for counting workers matching a query filter.

  • Request: namespace + query (same filter fields as ListWorkers)
  • Response: int64 count
  • HTTP route: GET /namespaces/{namespace}/worker-count

Why?

The worker UI needs to display a total worker count (e.g. in tabs) without fetching the full list. Follows the established pattern used by CountWorkflowExecutions, CountSchedules, and CountActivityExecutions.

How did you test it?

  • built (make ci-build)
  • passes buf linting and breaking change checks
  • regenerated OpenAPI specs

Made with Cursor

Add CountWorkers RPC for counting workers matching a query filter.
Follows the same pattern as CountWorkflowExecutions, CountSchedules,
and CountActivityExecutions.

Made-with: Cursor
}

message CountWorkersResponse {
// Approximate number of workers matching the query.
Copy link
Member

Choose a reason for hiding this comment

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

More detail on why this is approximate is always useful in this sort of comment

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.

3 participants