Merge pull request #33241 from backstage/freben/scheduler-cancel-task

Add cancelTask to SchedulerService for cancelling running tasks
This commit is contained in:
Fredrik Adelöw
2026-03-10 14:27:28 +01:00
committed by GitHub
15 changed files with 469 additions and 50 deletions
@@ -0,0 +1,5 @@
---
'@backstage/backend-test-utils': patch
---
Added `cancelTask` to `MockSchedulerService` and mock scheduler service factory.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/backend-plugin-api': minor
'@backstage/backend-defaults': patch
---
Added `cancelTask` method to the `SchedulerService` interface and implementation, allowing cancellation of currently running scheduled tasks. For global tasks, the database lock is released and a periodic liveness check aborts the running task function. For local tasks, the task's abort signal is triggered directly. A new `POST /.backstage/scheduler/v1/tasks/:id/cancel` endpoint is also available.