fix: treat concurrent_limit/timeout <= 0 as unset instead of a zero cap (#10288)

* fix: treat concurrent_limit/timeout <= 0 as unset instead of a zero cap

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: flow-step timeout <= 0 inherits the script timeout, not the global default

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-07-23 19:05:09 +02:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 68daed8501
commit 8eb36ce008
9 changed files with 355 additions and 52 deletions
@@ -914,6 +914,13 @@ async fn create_script_internal<'c>(
}
check_scopes(&authed, || format!("scripts:write:{}", ns.path))?;
// Normalize positive-only settings so a `<= 0` value (e.g. a CLI-pushed `0`) persists as
// disabled rather than as a zero-slot concurrency cap or a 0-second timeout. Deserialization
// already normalizes the concurrency fields; re-applying here also covers `timeout` and any
// NewScript built in-process rather than from a request body.
ns.timeout = windmill_common::runnable_settings::none_if_non_positive(ns.timeout);
ns.concurrency_settings = ns.concurrency_settings.normalized();
guard_script_from_debounce_data(&ns).await?;
let codebase = ns.codebase.as_ref();