Skip to content

Introduce CountSchedules operation#696

Merged
lina-temporal merged 2 commits intomasterfrom
count-schedules
Jan 28, 2026
Merged

Introduce CountSchedules operation#696
lina-temporal merged 2 commits intomasterfrom
count-schedules

Conversation

@lina-temporal
Copy link
Contributor

@lina-temporal lina-temporal commented Jan 15, 2026

What changed?

  • Added a new CountSchedules API, symmetric to the other Count* operations.

Why?

  • Although it isn't documented as public API, the temporal UI makes use of ListWorkflowExecutions to display the total count of schedules. This operation will not return data for CHASM-based schedules. Therefore, I'm introducing a public CountSchedules operation that the UI (and customers) can make use of.

Breaking changes

  • The technique of using ListWorkflowExecutions to query schedules was always unsupported, so we aren't interested in supporting it for CHASM schedules.
  • CountSchedules will be implemented for both V1 and V2 schedules.

Server:

@lina-temporal
Copy link
Contributor Author

Server PR stamped and tested locally. Merging this, then will merge the server impl.

@lina-temporal lina-temporal enabled auto-merge (squash) January 28, 2026 23:04
@lina-temporal lina-temporal merged commit b537ad8 into master Jan 28, 2026
4 checks passed
@lina-temporal lina-temporal deleted the count-schedules branch January 28, 2026 23:06
lina-temporal added a commit to temporalio/temporal that referenced this pull request Jan 29, 2026
## What changed?
- Implements the new `CountSchedules` API for both CHASM and V1
scheduler.
- Depends on [saas-policy
change](temporalio/saas-policy#251), [API
change](temporalio/api#696)

## Why?
- Our UI was previously using an undocumented `ListWorkflowExecutions`
call to get a total count of schedules. This will allow us to move it to
a public API in advance of CHASM release, which will continue to work
for both V1 and V2.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [x] added new functional test(s)

## Potential risks
- New API is highly symmetric in design to all other Count* APIs, and
implementation is highly symmetric to ListSchedules. Seems low.
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