diff --git a/backend/windmill-api-integration-tests/tests/workspace_comparison.rs b/backend/windmill-api-integration-tests/tests/workspace_comparison.rs index 11c731d75c..1aa2bc8df2 100644 --- a/backend/windmill-api-integration-tests/tests/workspace_comparison.rs +++ b/backend/windmill-api-integration-tests/tests/workspace_comparison.rs @@ -756,6 +756,13 @@ async fn test_compare_workspaces_trigger_and_schedule(db: Pool) -> any ) .execute(&db) .await?; + // The scheduler's missed-occurrence counters only ever move on the enabled side. + sqlx::query( + "UPDATE schedule SET late_run_streak = 1, missed_occurrences = 2, last_missed_at = NOW() + WHERE workspace_id = 'test-workspace' AND path = 'f/sch/runtime_only'", + ) + .execute(&db) + .await?; // ------ Schedule: config change (script_path) in fork. Should diff. sqlx::query!( @@ -2537,7 +2544,10 @@ async fn test_rename_records_the_vacated_path(db: Pool) -> anyhow::Res .await?; let status = resp.status(); let hash = resp.text().await?; - assert!(status.is_success(), "script deploy failed: {status} — {hash}"); + assert!( + status.is_success(), + "script deploy failed: {status} — {hash}" + ); parent_hash = Some(hash.trim().trim_matches('"').to_string()); } let mut vacated = None; diff --git a/backend/windmill-api-workspaces/src/workspaces.rs b/backend/windmill-api-workspaces/src/workspaces.rs index 123b1c8c9b..c94560314c 100644 --- a/backend/windmill-api-workspaces/src/workspaces.rs +++ b/backend/windmill-api-workspaces/src/workspaces.rs @@ -14050,6 +14050,12 @@ const TRIGGER_COMPARE_IGNORE: &[&str] = &[ "last_server_ping", "extra_perms", "permissioned_as", + // Schedule counters the scheduler bumps as occurrences are missed. A fork's + // schedules are disabled so theirs stay at the defaults, and no deploy carries + // them across: compared, a parent schedule that ever ran late differs forever. + "late_run_streak", + "missed_occurrences", + "last_missed_at", // Server-managed fields that the merge feature treats as workspace-local // (regenerated by the deploy handler): GCP `subscription_id` is rewritten // to `windmill__` in `CreateUpdate` mode, and Azure's