-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Problem
When cancelTasks: true is passed to CancelSchedule, only the latest execution's tasks are cancelled. For CRON schedules with overlapping runs (e.g. a long-running pipeline that hasn't finished when the next trigger fires), older execution tasks remain running.
Current behavior
ScheduleManagerService.cancelSchedule() fetches getExecutionHistory(scheduleId, 1) — only the most recent execution — and cancels its pipelineTaskIds or taskId.
Expected behavior
All non-terminal execution tasks should be cancelled when cancelTasks: true, not just the latest.
Suggested approach
- Fetch all executions with
status: 'triggered'(not just limit 1) - For each execution, cancel its pipeline task IDs
- Consider adding a
findActiveExecutions(scheduleId)method toScheduleRepository
Context
Identified during PR #80 review. Deferred because the fix requires a new repository method and broader testing.
References
- PR feat: scheduled pipelines + dependency cascade fix #80 review comment
src/services/schedule-manager.tslines 181-203
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request