From 2b0eaf14042f3e7d965e0fb2e3902231d491e4a4 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 28 Aug 2026 16:07:40 +0200 Subject: [PATCH] fix: say nothing about a schedule that was configured to skip runs --- backend/windmill-api-schedule/src/lib.rs | 6 ++++-- .../triggers/schedules/ScheduleEditorInner.svelte | 11 ++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/backend/windmill-api-schedule/src/lib.rs b/backend/windmill-api-schedule/src/lib.rs index d92d11fff6..1472cc5109 100644 --- a/backend/windmill-api-schedule/src/lib.rs +++ b/backend/windmill-api-schedule/src/lib.rs @@ -1224,8 +1224,10 @@ async fn fetch_interval_drift( w_id: &str, schedule: &Schedule, ) -> Result> { - // A schedule that is off is not running behind, it is not running. - if !schedule.enabled { + // A schedule that is off is not running behind, it is not running. Nor is one + // told to skip: a skip handler and `no_flow_overlap` both exist to drop runs, so + // for those two the cadence the cron asks for was never the promise. + if !schedule.enabled || schedule.no_flow_overlap || schedule.dynamic_skip.is_some() { return Ok(None); } // Query plan: `(workspace_id, runnable_path, created_at DESC)` index, hence the diff --git a/frontend/src/lib/components/triggers/schedules/ScheduleEditorInner.svelte b/frontend/src/lib/components/triggers/schedules/ScheduleEditorInner.svelte index 7b6d8b9f51..2d44065667 100644 --- a/frontend/src/lib/components/triggers/schedules/ScheduleEditorInner.svelte +++ b/frontend/src/lib/components/triggers/schedules/ScheduleEditorInner.svelte @@ -138,15 +138,12 @@ | { interval: ScheduleIntervalDrift; queuesNextRunAtStart: boolean } | undefined = $state(undefined) - // A flow queues its next run when the previous one starts, and so does a script - // carrying a skip handler, which is pushed as a single step flow. A retry policy - // does not: it is materialized natively onto a plain script job. + // A flow queues its next run when the previous one starts, where a script queues it + // once the previous one has finished, and the two have different ways out. Only + // those two reach here: a schedule set to skip runs is not measured at all. function readDeployedDrift(deployed: Record) { deployedDrift = deployed.interval_drift - ? { - interval: deployed.interval_drift, - queuesNextRunAtStart: !!deployed.is_flow || deployed.dynamic_skip != undefined - } + ? { interval: deployed.interval_drift, queuesNextRunAtStart: !!deployed.is_flow } : undefined } let tag: string | undefined = $state(undefined)