mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-12 08:02:44 +00:00
fix: ignore schedule missed-run counters in workspace compare (#11570)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cf4bec611f
commit
eab3dd5a52
@@ -756,6 +756,13 @@ async fn test_compare_workspaces_trigger_and_schedule(db: Pool<Postgres>) -> 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<Postgres>) -> 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;
|
||||
|
||||
@@ -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_<workspace_id>_<path>` in `CreateUpdate` mode, and Azure's
|
||||
|
||||
Reference in New Issue
Block a user