Skip to content

fix(scheduler): honor backfill overlap policy#8006

Open
officialasishkumar wants to merge 1 commit intocadence-workflow:masterfrom
officialasishkumar:fix/scheduler-backfill-overlap-policy
Open

fix(scheduler): honor backfill overlap policy#8006
officialasishkumar wants to merge 1 commit intocadence-workflow:masterfrom
officialasishkumar:fix/scheduler-backfill-overlap-policy

Conversation

@officialasishkumar
Copy link
Copy Markdown
Contributor

What changed?

Backfilled schedule fires now use the overlap policy from the queued backfill request when it is set. Unset backfill policies continue to fall back to the schedule-level policy. Closes #8005.

Why?

BackfillScheduleRequest and BackfillSignal preserve a request-specific OverlapPolicy, but processBackfills previously called processScheduleFire, which always built the fire activity request with input.Policies.OverlapPolicy. As a result, a one-off backfill policy override was ignored at execution time.

The fix routes backfilled fires through an overlap-policy-aware helper and keeps the default scheduled-fire path unchanged.

How did you test it?

go test ./service/worker/scheduler -run 'TestSchedulerWorkflowBackfillUsesBackfillOverlapPolicy|TestBackfillOverlapPolicy|TestProcessBackfillsRespectsPause|TestBackfillFireComputation'\n\ngo test ./service/worker/scheduler\n\nmake pr GEN_DIR=service/worker/scheduler\n\nPotential risks\n\nLow. This only changes backfill execution when the backfill request supplies an explicit overlap policy. Backfills without an explicit policy retain the prior schedule-policy behavior.\n\nRelease notes\n\nBackfill schedule requests now honor their requested overlap policy when firing backfilled runs. #8005\n\nDocumentation Changes\n\nN/A\n

Backfill requests carry their own overlap policy, but the scheduler worker
was building every backfill fire request with the schedule-level policy.
This meant operators could request a one-off backfill with a different
overlap behavior and still get the schedule default at execution time.

Route backfilled fires through an overlap-policy-aware helper and preserve
existing behavior for requests that leave the backfill policy unset by
falling back to the schedule policy. Add a workflow regression test that
verifies the backfill policy reaches the local fire activity.

Release note (bug fix): Backfill schedule requests now honor their requested
overlap policy when firing backfilled runs.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the fix/scheduler-backfill-overlap-policy branch from 644132e to 313eea9 Compare April 23, 2026 21:10
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 23, 2026

Code Review ✅ Approved

Updates the scheduler to correctly enforce the backfill overlap policy. No issues found.

Rules ✅ All requirements met

Repository Rules

GitHub Issue Linking Requirement: The PR description contains 'Closes #8005', which correctly references a valid cadence-workflow GitHub issue.
PR Description Quality Standards: The PR description provides a clear 'What changed?', 'Why?', test commands, identifies low risks, includes release notes with an issue link, and correctly notes documentation changes.

1 rule not applicable. Show all rules by commenting gitar display:verbose.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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.

Backfill schedules ignore request overlap policy

1 participant