Skip to content

Add OR statement to match V1 and V2 Scheduler BusinessIds (#10248)#10316

Merged
yycptt merged 1 commit into
cloud/v1.32.0-155from
patch/155-chasm-scheduler-visibility-fix
May 18, 2026
Merged

Add OR statement to match V1 and V2 Scheduler BusinessIds (#10248)#10316
yycptt merged 1 commit into
cloud/v1.32.0-155from
patch/155-chasm-scheduler-visibility-fix

Conversation

@awln-temporal
Copy link
Copy Markdown
Contributor

What changed?

Add a Scheduler specific query converter to handle ScheduleId search attribute alias to underlying WorkflowId system search attribute field. If chasm is enabled, the query converter will match against both V1 and V2 Scheduler workflowId formats. V1 prefixes the workflowId with temporal-sys-scheduler, while V2 doesn't, so to handle either case, we need to add a OR/AND statement to match both V1 and V2 Scheduler BusinessId. OR will be used if the operator's boolean is positive, AND if the operator's boolean is negative.

Why?

Unable to retrieve V2 Schedules that query using ScheduleId as a search attribute.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

## What changed?
Add a Scheduler specific query converter to handle `ScheduleId` search
attribute alias to underlying `WorkflowId` system search attribute
field. If chasm is enabled, the query converter will match against both
V1 and V2 Scheduler workflowId formats. V1 prefixes the workflowId with
`temporal-sys-scheduler`, while V2 doesn't, so to handle either case, we
need to add a OR/AND statement to match both V1 and V2 Scheduler
BusinessId. OR will be used if the operator's boolean is positive, AND
if the operator's boolean is negative.

## Why?
Unable to retrieve V2 Schedules that query using `ScheduleId` as a
search attribute.

## How did you test it?
- [X] built
- [X] run locally and tested manually
- [X] covered by existing tests
- [X] added new unit test(s)
- [X] added new functional test(s)
@awln-temporal awln-temporal requested review from a team May 18, 2026 16:28
@awln-temporal awln-temporal requested review from a team as code owners May 18, 2026 16:28
Copy link
Copy Markdown
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

Approving as this is just cherry-picking

@yycptt yycptt enabled auto-merge (squash) May 18, 2026 20:27
@yycptt yycptt disabled auto-merge May 18, 2026 20:27
@yycptt yycptt merged commit 2201f7a into cloud/v1.32.0-155 May 18, 2026
71 checks passed
@yycptt yycptt deleted the patch/155-chasm-scheduler-visibility-fix branch May 18, 2026 20:27
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.

2 participants