mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 16:20:25 +00:00
feat: let dedicated_workers take folder patterns like ws:f/dw/* (#12268)
* feat: reload dedicated workers in place and restart them one at a time Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: reload dedicated importers on deploy, refresh python imports, count native readiness Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: count a native dedicated worker as started once its isolate is ready Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: let dedicated_workers take folder patterns like ws:f/dw/* Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: re-save pattern groups on redeploy over an archived script, reject workspace in pattern input Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: autoscale pattern groups on matched script tags, keep legacy dedicated_worker literal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: state who may supply entries to expand_dedicated_workers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: show which listed scripts a folder pattern covers and how many it matches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: explain staggered restarts in the dedicated worker group config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: state when dedicated deploys restart workers in the group config copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: shorten the dedicated worker group restart copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: warn about staggered restarts when applying a dedicated group config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: show the staggered restart note only for groups with several workers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: say when a dedicated deploy restarts workers in the group config note Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: clarify when dedicated deploys restart workers and tighten the dedicated tab spacing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep only the supervisor note in the dedicated tab Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: word the staggered restart alert in terms of workers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: use checked sqlx macros for the dedicated restart turn queries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: list what restarts dedicated workers in a tooltip on the group config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: simplify the dedicated deploy restart bullet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update ee-repo-ref to 51a806ae14dcca95ca2221a9f5cc6434ed755bca This commit updates the EE repository reference after PR #950 was merged in windmill-ee-private. Previous ee-repo-ref: ce1eba465e5891bab71173c06723a1a6cbd2d869 New ee-repo-ref: 51a806ae14dcca95ca2221a9f5cc6434ed755bca Automated by sync-ee-ref workflow. * chore: update ee-repo-ref to 276f5f5cacc259bad1dc138430ae03c53d3db43d This commit updates the EE repository reference after PR #964 was merged in windmill-ee-private. Previous ee-repo-ref: 3511c351a2fd81268d2fb1f7ca1c2ba74c3c1467 New ee-repo-ref: 276f5f5cacc259bad1dc138430ae03c53d3db43d 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> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
co-authored by
Claude Opus 5.5
windmill-internal-app[bot]
Ruben Fiszel
parent
04230c286d
commit
1f92c4fa44
@@ -3044,6 +3044,32 @@ async fn create_script_internal<'c>(
|
||||
} else {
|
||||
tracing::info!("creating script {hash:?} at path {script_path} on workspace {w_id}",);
|
||||
}
|
||||
if ns.dedicated_worker == Some(true) && resolved_job_token_scopes.is_none() {
|
||||
// Its dependency job is tagged for a dedicated worker. One taking it through a
|
||||
// `dedicated_workers` pattern only listens to the scripts it found at its last config
|
||||
// load: re-saving the group's config reloads it, unless the live version it replaces
|
||||
// was served already (a version adopted from a deleted path was not).
|
||||
sqlx::query(
|
||||
"UPDATE config SET config = config
|
||||
WHERE name LIKE 'worker\\_\\_%'
|
||||
AND jsonb_typeof(config->'dedicated_workers') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM jsonb_array_elements_text(config->'dedicated_workers') e
|
||||
WHERE right(e, 2) = '/*' AND starts_with($1 || ':' || $2, left(e, -1)))
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM script WHERE workspace_id = $1 AND hash = $3 AND path = $2
|
||||
AND dedicated_worker = true AND job_token_scopes IS NULL)",
|
||||
)
|
||||
.bind(&w_id)
|
||||
.bind(&ns.path)
|
||||
.bind(
|
||||
p_hashes
|
||||
.filter(|_| !parent_adopted_from_retired_path)
|
||||
.and_then(|h| h.first().copied()),
|
||||
)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
}
|
||||
if needs_lock_gen {
|
||||
let tag = windmill_common::scripts::dependency_job_tag(ns.tag, &lang);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user