fix: keep schedule push, flow advance, wac approval and scim on one pool connection (#11904)

* fix: keep schedule push, flow advance and wac approval on one pool connection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: read flow args on the status-update tx instead of preloading them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: pin ee ref for the scim update_group fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: update ee-repo-ref to c465c042eeae3c5d9a0180f62a56e8f8d3e9e162

This commit updates the EE repository reference after PR #905 was merged in windmill-ee-private.

Previous ee-repo-ref: dc4d0327044ddc10ef53ad0b21ae37b96cf4aad2

New ee-repo-ref: c465c042eeae3c5d9a0180f62a56e8f8d3e9e162

Automated by sync-ee-ref workflow.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
Ruben Fiszel
2026-10-20 19:20:00 +02:00
committed by GitHub
co-authored by Claude Opus 5.5 windmill-internal-app[bot]
parent 2c559b452f
commit 8afe0607ab
8 changed files with 136 additions and 88 deletions
@@ -222,6 +222,43 @@ mod schedule_push {
Ok(())
}
// Callers hold `tx` on the pool they pass in, so a burst of schedules the size of the pool
// starves it if a push checks out a second connection. On a one-connection pool any such
// checkout hangs until the acquire timeout.
#[sqlx::test(migrations = "../migrations", fixtures("base", "schedule_push"))]
async fn test_push_holds_one_connection(db: Pool<Postgres>) -> anyhow::Result<()> {
let one = sqlx::postgres::PgPoolOptions::new()
.max_connections(1)
.acquire_timeout(std::time::Duration::from_secs(5))
.connect_with((*db.connect_options()).clone())
.await?;
let schedules = [
make_schedule(|s| {
s.script_path = "f/system/tagged_script".to_string();
s.path = "f/system/tagged_schedule".to_string();
}),
make_schedule(|s| {
s.script_path = "f/system/obo_script".to_string();
s.path = "f/system/obo_schedule".to_string();
}),
make_schedule(|s| {
s.is_flow = true;
s.script_path = "f/system/obo_flow".to_string();
s.path = "f/system/obo_flow_schedule".to_string();
}),
];
for schedule in &schedules {
let tx = one.begin().await?;
let push = push_scheduled_job(&one, tx, schedule, None, None);
let tx = tokio::time::timeout(std::time::Duration::from_secs(15), push).await??;
tx.commit().await?;
}
assert_eq!(count_queued_jobs(&db).await, 3);
Ok(())
}
// -----------------------------------------------------------------------
// push_scheduled_job: with retry wraps in SingleStepFlow
// -----------------------------------------------------------------------