From 266f82046ad287163d24910902393cd63156ca1d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 13:28:18 +0100 Subject: [PATCH 01/41] fix: improve runs page load time --- ...8234ca7d1efeee9661f3901f298da375e73f7.json | 20 +++++++------- ...e671525969fb5f528ae07576e9dc5e77af1f1.json | 12 +++++++++ ...dcc40f463cbc52d94ed9315cf9a547d4c89f2.json | 20 +++++++------- ...f7eb05342cfb3aa9b4f5d80c70fbc50d437ba.json | 12 --------- ...78e9831fc0e700cc76ab9627afe9040a4efe0.json | 12 --------- ...68221e732e48dfa6e34d5b025adbbdcbb03e0.json | 12 +++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- ...d3e73a5806f61cae4a53b5bdc888ec7164395.json | 12 +++++++++ backend/windmill-api/src/db.rs | 26 ++++++++++--------- .../src/lib/components/runs/JobLoader.svelte | 22 +++++----------- 10 files changed, 77 insertions(+), 73 deletions(-) create mode 100644 backend/.sqlx/query-4d4aa16b2a55e57f9376d0cb253e671525969fb5f528ae07576e9dc5e77af1f1.json delete mode 100644 backend/.sqlx/query-8be277b89102a26dda506202a3ef7eb05342cfb3aa9b4f5d80c70fbc50d437ba.json delete mode 100644 backend/.sqlx/query-ae8dfecd46425d5f86003eea9a578e9831fc0e700cc76ab9627afe9040a4efe0.json create mode 100644 backend/.sqlx/query-d585aa6301c41308b02a1f0fbf068221e732e48dfa6e34d5b025adbbdcbb03e0.json create mode 100644 backend/.sqlx/query-faa0e401e6beebde6c3fef06151d3e73a5806f61cae4a53b5bdc888ec7164395.json diff --git a/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json b/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json index 4bcf3c6ce3cf3..2be39fce267e6 100644 --- a/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json +++ b/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json @@ -130,28 +130,28 @@ }, { "ordinal": 25, - "name": "ai_models", - "type_info": "VarcharArray" + "name": "teams_command_script", + "type_info": "Text" }, { "ordinal": 26, - "name": "code_completion_model", - "type_info": "Varchar" + "name": "teams_team_id", + "type_info": "Text" }, { "ordinal": 27, - "name": "teams_command_script", + "name": "teams_team_name", "type_info": "Text" }, { "ordinal": 28, - "name": "teams_team_id", - "type_info": "Text" + "name": "ai_models", + "type_info": "VarcharArray" }, { "ordinal": 29, - "name": "teams_team_name", - "type_info": "Text" + "name": "code_completion_model", + "type_info": "Varchar" } ], "parameters": { @@ -185,10 +185,10 @@ true, true, true, - false, true, true, true, + false, true ] }, diff --git a/backend/.sqlx/query-4d4aa16b2a55e57f9376d0cb253e671525969fb5f528ae07576e9dc5e77af1f1.json b/backend/.sqlx/query-4d4aa16b2a55e57f9376d0cb253e671525969fb5f528ae07576e9dc5e77af1f1.json new file mode 100644 index 0000000000000..3dea4439541b5 --- /dev/null +++ b/backend/.sqlx/query-4d4aa16b2a55e57f9376d0cb253e671525969fb5f528ae07576e9dc5e77af1f1.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_7", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "4d4aa16b2a55e57f9376d0cb253e671525969fb5f528ae07576e9dc5e77af1f1" +} diff --git a/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json b/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json index 14685a8bfa6ec..9243288c9d321 100644 --- a/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json +++ b/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json @@ -130,28 +130,28 @@ }, { "ordinal": 25, - "name": "ai_models", - "type_info": "VarcharArray" + "name": "teams_command_script", + "type_info": "Text" }, { "ordinal": 26, - "name": "code_completion_model", - "type_info": "Varchar" + "name": "teams_team_id", + "type_info": "Text" }, { "ordinal": 27, - "name": "teams_command_script", + "name": "teams_team_name", "type_info": "Text" }, { "ordinal": 28, - "name": "teams_team_id", - "type_info": "Text" + "name": "ai_models", + "type_info": "VarcharArray" }, { "ordinal": 29, - "name": "teams_team_name", - "type_info": "Text" + "name": "code_completion_model", + "type_info": "Varchar" } ], "parameters": { @@ -185,10 +185,10 @@ true, true, true, - false, true, true, true, + false, true ] }, diff --git a/backend/.sqlx/query-8be277b89102a26dda506202a3ef7eb05342cfb3aa9b4f5d80c70fbc50d437ba.json b/backend/.sqlx/query-8be277b89102a26dda506202a3ef7eb05342cfb3aa9b4f5d80c70fbc50d437ba.json deleted file mode 100644 index e5819f5c6ab3f..0000000000000 --- a/backend/.sqlx/query-8be277b89102a26dda506202a3ef7eb05342cfb3aa9b4f5d80c70fbc50d437ba.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "create index concurrently if not exists ix_job_workspace_id_created_at_new_6 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "8be277b89102a26dda506202a3ef7eb05342cfb3aa9b4f5d80c70fbc50d437ba" -} diff --git a/backend/.sqlx/query-ae8dfecd46425d5f86003eea9a578e9831fc0e700cc76ab9627afe9040a4efe0.json b/backend/.sqlx/query-ae8dfecd46425d5f86003eea9a578e9831fc0e700cc76ab9627afe9040a4efe0.json deleted file mode 100644 index c0703bc518664..0000000000000 --- a/backend/.sqlx/query-ae8dfecd46425d5f86003eea9a578e9831fc0e700cc76ab9627afe9040a4efe0.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "create index concurrently if not exists ix_job_workspace_id_created_at_new_7 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "ae8dfecd46425d5f86003eea9a578e9831fc0e700cc76ab9627afe9040a4efe0" -} diff --git a/backend/.sqlx/query-d585aa6301c41308b02a1f0fbf068221e732e48dfa6e34d5b025adbbdcbb03e0.json b/backend/.sqlx/query-d585aa6301c41308b02a1f0fbf068221e732e48dfa6e34d5b025adbbdcbb03e0.json new file mode 100644 index 0000000000000..72169ec94bb65 --- /dev/null +++ b/backend/.sqlx/query-d585aa6301c41308b02a1f0fbf068221e732e48dfa6e34d5b025adbbdcbb03e0.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "create index concurrently if not exists ix_v2_job_workspace_id_created_at ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow', 'singlescriptflow') AND parent_job IS NULL", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "d585aa6301c41308b02a1f0fbf068221e732e48dfa6e34d5b025adbbdcbb03e0" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index c2dfed73a2a83..5bfff47576491 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - null + true ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/.sqlx/query-faa0e401e6beebde6c3fef06151d3e73a5806f61cae4a53b5bdc888ec7164395.json b/backend/.sqlx/query-faa0e401e6beebde6c3fef06151d3e73a5806f61cae4a53b5bdc888ec7164395.json new file mode 100644 index 0000000000000..2824316ed30e6 --- /dev/null +++ b/backend/.sqlx/query-faa0e401e6beebde6c3fef06151d3e73a5806f61cae4a53b5bdc888ec7164395.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_6", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "faa0e401e6beebde6c3fef06151d3e73a5806f61cae4a53b5bdc888ec7164395" +} diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index 69bc969a7526c..a034569fda1af 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -573,18 +573,6 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { i += 1; tracing::info!("step {i} of {migration_job_name} migration"); - sqlx::query!("create index concurrently if not exists ix_job_workspace_id_created_at_new_6 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL") - .execute(db) - .await?; - i += 1; - tracing::info!("step {i} of {migration_job_name} migration"); - - sqlx::query!("create index concurrently if not exists ix_job_workspace_id_created_at_new_7 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL") - .execute(db) - .await?; - i += 1; - tracing::info!("step {i} of {migration_job_name} migration"); - sqlx::query!("create index concurrently if not exists ix_completed_job_workspace_id_started_at_new_2 ON v2_job_completed (workspace_id, started_at DESC)") .execute(db) .await?; @@ -653,6 +641,20 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .await?; }); + run_windmill_migration!("v2_improve_v2_job_indices_ii", &db, |tx| { + sqlx::query!("create index concurrently if not exists ix_v2_job_workspace_id_created_at ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow', 'singlescriptflow') AND parent_job IS NULL") + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_6") + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_7") + .execute(db) + .await?; + }); + Ok(()) } diff --git a/frontend/src/lib/components/runs/JobLoader.svelte b/frontend/src/lib/components/runs/JobLoader.svelte index 66637842c565f..5789cdc76d48b 100644 --- a/frontend/src/lib/components/runs/JobLoader.svelte +++ b/frontend/src/lib/components/runs/JobLoader.svelte @@ -95,20 +95,7 @@ return jobKinds } if (jobKindsCat == 'all') { - let kinds: CompletedJob['job_kind'][] = [ - 'script', - 'flow', - 'dependencies', - 'flowdependencies', - 'appdependencies', - 'preview', - 'flowpreview', - 'script_hub', - 'flowscript', - 'flownode', - 'appscript' - ] - return kinds.join(',') + return '' } else if (jobKindsCat == 'dependencies') { let kinds: CompletedJob['job_kind'][] = [ 'dependencies', @@ -122,6 +109,9 @@ } else if (jobKindsCat == 'deploymentcallbacks') { let kinds: CompletedJob['job_kind'][] = ['deploymentcallback'] return kinds.join(',') + } else if (jobKindsCat == 'runs') { + let kinds: CompletedJob['job_kind'][] = ['script', 'flow', 'singlescriptflow'] + return kinds.join(',') } else { let kinds: CompletedJob['job_kind'][] = [ 'script', @@ -170,7 +160,7 @@ createdBefore, createdBy: user === null || user === '' ? undefined : user, scriptPathStart: scriptPathStart, - jobKinds, + jobKinds: jobKindsCat == 'all' || jobKinds == '' ? undefined : jobKinds, success: success == 'success' ? true : success == 'failure' ? false : undefined, running: success == 'running' || success == 'suspended' @@ -228,7 +218,7 @@ scriptPathExact: path === null || path === '' ? undefined : path, createdBy: user === null || user === '' ? undefined : user, scriptPathStart: folder === null || folder === '' ? undefined : `f/${folder}/`, - jobKinds, + jobKinds: jobKindsCat == 'all' || jobKinds == '' ? undefined : jobKinds, success: success == 'success' ? true : success == 'failure' ? false : undefined, running: success == 'running' ? true : undefined, isSkipped: isSkipped ? undefined : false, From 28558e674f60fef1b165a79c039b1b450759d500 Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Fri, 14 Feb 2025 15:42:18 +0100 Subject: [PATCH 02/41] feat: parse script for preprocessor/no_main_func on deploy (#5292) * feat: parse script for preprocessor/no_main_func on deploy * fix substitute for linux --- backend/Cargo.lock | 1 + backend/parsers/windmill-parser-py/src/lib.rs | 27 ++++++------ backend/parsers/windmill-parser-ts/src/lib.rs | 42 +++++++++---------- .../parsers/windmill-parser-wasm/src/lib.rs | 4 +- .../windmill-parser-wasm/tests/wasm.rs | 8 ++-- backend/substitute_ee_code.sh | 4 +- backend/windmill-api/Cargo.toml | 1 + backend/windmill-api/src/scripts.rs | 17 +++++++- backend/windmill-worker/src/bun_executor.rs | 4 +- backend/windmill-worker/src/deno_executor.rs | 4 +- backend/windmill-worker/src/js_eval.rs | 2 +- .../windmill-worker/src/python_executor.rs | 4 +- cli/metadata.ts | 16 +++++-- 13 files changed, 85 insertions(+), 49 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index d0bf892dd8132..9c02a43c36f53 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -10988,6 +10988,7 @@ dependencies = [ "windmill-git-sync", "windmill-indexer", "windmill-parser", + "windmill-parser-py", "windmill-parser-ts", "windmill-queue", ] diff --git a/backend/parsers/windmill-parser-py/src/lib.rs b/backend/parsers/windmill-parser-py/src/lib.rs index 738bc8ed7c798..76f0c415ea1e7 100644 --- a/backend/parsers/windmill-parser-py/src/lib.rs +++ b/backend/parsers/windmill-parser-py/src/lib.rs @@ -60,6 +60,7 @@ fn filter_non_main(code: &str, main_name: &str) -> String { pub fn parse_python_signature( code: &str, override_main: Option, + skip_params: bool, ) -> anyhow::Result { let main_name = override_main.unwrap_or("main".to_string()); @@ -78,11 +79,13 @@ pub fn parse_python_signature( let ast = Suite::parse(&filtered_code, "main.py") .map_err(|e| anyhow::anyhow!("Error parsing code: {}", e.to_string()))?; - let param = ast.into_iter().find_map(|x| match x { + let params = ast.into_iter().find_map(|x| match x { Stmt::FunctionDef(StmtFunctionDef { name, args, .. }) if &name == &main_name => Some(*args), _ => None, }); - if let Some(params) = param { + + if !skip_params && params.is_some() { + let params = params.unwrap(); //println!("{:?}", params); let def_arg_start = params.args.len() - params.defaults().count(); Ok(MainArgSignature { @@ -149,7 +152,7 @@ pub fn parse_python_signature( star_args: false, star_kwargs: false, args: vec![], - no_main_func: Some(true), + no_main_func: Some(params.is_none()), has_preprocessor: Some(has_preprocessor), }) } @@ -287,7 +290,7 @@ def main(test1: str, name: datetime.datetime = datetime.now(), byte: bytes = byt "; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -376,7 +379,7 @@ def main(test1: str, "; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -436,7 +439,7 @@ def main(test1: str, "; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -493,7 +496,7 @@ def main(test1: Literal["foo", "bar"], test2: List[Literal["foo", "bar"]]): retu "#; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -537,7 +540,7 @@ def main(test1: DynSelect_foo): return "#; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -568,7 +571,7 @@ def hello(): return "#; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -596,7 +599,7 @@ def main(): return "#; //println!("{}", serde_json::to_string()?); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -617,10 +620,10 @@ def main(a: list, e: List[int], b: list = [1,2,3,4], c = [1,2,3,4], d = ["a", "b "#; println!( "{}", - serde_json::to_string(&parse_python_signature(code, None)?)? + serde_json::to_string(&parse_python_signature(code, None, false)?)? ); assert_eq!( - parse_python_signature(code, None)?, + parse_python_signature(code, None, false)?, MainArgSignature { star_args: false, star_kwargs: false, diff --git a/backend/parsers/windmill-parser-ts/src/lib.rs b/backend/parsers/windmill-parser-ts/src/lib.rs index f69169c0e2658..78a83cd9290b4 100644 --- a/backend/parsers/windmill-parser-ts/src/lib.rs +++ b/backend/parsers/windmill-parser-ts/src/lib.rs @@ -134,6 +134,7 @@ pub fn parse_expr_for_ids(code: &str) -> anyhow::Result> { pub fn parse_deno_signature( code: &str, skip_dflt: bool, + skip_params: bool, main_override: Option, ) -> anyhow::Result { let cm: Lrc = Default::default(); @@ -179,27 +180,26 @@ pub fn parse_deno_signature( }); let mut c: u16 = 0; - if let Some(params) = params { - let r = MainArgSignature { - star_args: false, - star_kwargs: false, - args: params - .into_iter() - .map(|x| parse_param(x, &cm, skip_dflt, &mut c)) - .collect::>>()?, - no_main_func: Some(false), - has_preprocessor: Some(has_preprocessor), - }; - Ok(r) - } else { - Ok(MainArgSignature { - star_args: false, - star_kwargs: false, - args: vec![], - no_main_func: Some(true), - has_preprocessor: Some(has_preprocessor), - }) - } + let no_main_func = params.is_none(); + let r = MainArgSignature { + star_args: false, + star_kwargs: false, + args: if skip_params { + vec![] + } else { + params + .map(|x| { + x.into_iter() + .map(|x| parse_param(x, &cm, skip_dflt, &mut c)) + .collect::>>() + }) + .transpose()? + .unwrap_or_else(|| vec![]) + }, + no_main_func: Some(no_main_func), + has_preprocessor: Some(has_preprocessor), + }; + Ok(r) } fn parse_param( diff --git a/backend/parsers/windmill-parser-wasm/src/lib.rs b/backend/parsers/windmill-parser-wasm/src/lib.rs index e3de739f9634c..306d67751cbf3 100644 --- a/backend/parsers/windmill-parser-wasm/src/lib.rs +++ b/backend/parsers/windmill-parser-wasm/src/lib.rs @@ -17,10 +17,11 @@ fn wrap_sig(r: anyhow::Result) -> String { #[cfg(feature = "ts-parser")] #[wasm_bindgen] -pub fn parse_deno(code: &str, main_override: Option) -> String { +pub fn parse_deno(code: &str, main_override: Option, skip_params: Option) -> String { wrap_sig(windmill_parser_ts::parse_deno_signature( code, false, + false, main_override, )) } @@ -73,6 +74,7 @@ pub fn parse_python(code: &str, main_override: Option) -> String { wrap_sig(windmill_parser_py::parse_python_signature( code, main_override, + false, )) } diff --git a/backend/parsers/windmill-parser-wasm/tests/wasm.rs b/backend/parsers/windmill-parser-wasm/tests/wasm.rs index 1c201ecd4eedf..9f6d452a21df9 100644 --- a/backend/parsers/windmill-parser-wasm/tests/wasm.rs +++ b/backend/parsers/windmill-parser-wasm/tests/wasm.rs @@ -18,7 +18,7 @@ export function main(test1?: string, test2: string = \"burkina\", } "; assert_eq!( - parse_deno_signature(code, false, None)?, + parse_deno_signature(code, false, false, None)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -159,7 +159,7 @@ export function main(test2 = \"burkina\", } "; assert_eq!( - parse_deno_signature(code, false, None)?, + parse_deno_signature(code, false, false, None)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -236,7 +236,7 @@ export function main(foo: FooBar, {a, b}: FooBar, {c, d}: FooBar = {a: \"foo\", } "; assert_eq!( - parse_deno_signature(code, false, None)?, + parse_deno_signature(code, false, false, None)?, MainArgSignature { star_args: false, star_kwargs: false, @@ -282,7 +282,7 @@ export function main(foo: (\"foo\" | \"bar\")[]) { } "; assert_eq!( - parse_deno_signature(code, false, None)?, + parse_deno_signature(code, false, false, None)?, MainArgSignature { star_args: false, star_kwargs: false, diff --git a/backend/substitute_ee_code.sh b/backend/substitute_ee_code.sh index c15d19a2597a3..28b890990b0be 100755 --- a/backend/substitute_ee_code.sh +++ b/backend/substitute_ee_code.sh @@ -68,7 +68,7 @@ fi if [ "$REVERT" == "YES" ]; then for ee_file in $(find ${EE_CODE_DIR} -name "*ee.rs"); do - ce_file="${ee_file/${EE_CODE_DIR}/.}" + ce_file="${ee_file/${EE_CODE_DIR}/}" ce_file="${root_dirpath}/backend/${ce_file}" if [ "$REVERT_PREVIOUS" == "YES" ]; then git checkout HEAD@{3} ${ce_file} || true @@ -80,7 +80,7 @@ if [ "$REVERT" == "YES" ]; then else # This replaces all files in current repo with alternative EE files in windmill-ee-private for ee_file in $(find "${EE_CODE_DIR}" -name "*ee.rs"); do - ce_file="${ee_file/${EE_CODE_DIR}/.}" + ce_file="${ee_file/${EE_CODE_DIR}/}" ce_file="${root_dirpath}/backend/${ce_file}" if [[ -f "${ce_file}" ]]; then rm "${ce_file}" diff --git a/backend/windmill-api/Cargo.toml b/backend/windmill-api/Cargo.toml index cbecf865dec21..675aeec0b15b4 100644 --- a/backend/windmill-api/Cargo.toml +++ b/backend/windmill-api/Cargo.toml @@ -36,6 +36,7 @@ windmill-common = { workspace = true, default-features = false } windmill-audit.workspace = true windmill-parser.workspace = true windmill-parser-ts.workspace = true +windmill-parser-py.workspace = true windmill-git-sync.workspace = true windmill-indexer = { workspace = true, optional = true } tokio.workspace = true diff --git a/backend/windmill-api/src/scripts.rs b/backend/windmill-api/src/scripts.rs index cbeb13e10690b..0fd80d0fe4516 100644 --- a/backend/windmill-api/src/scripts.rs +++ b/backend/windmill-api/src/scripts.rs @@ -625,6 +625,19 @@ async fn create_script_internal<'c>( } else { ns.language.clone() }; + + let (no_main_func, has_preprocessor) = match lang { + ScriptLang::Bun | ScriptLang::Bunnative | ScriptLang::Deno | ScriptLang::Nativets => { + let args = windmill_parser_ts::parse_deno_signature(&ns.content, true, true, None)?; + (args.no_main_func, args.has_preprocessor) + } + ScriptLang::Python3 => { + let args = windmill_parser_py::parse_python_signature(&ns.content, None, true)?; + (args.no_main_func, args.has_preprocessor) + } + _ => (ns.no_main_func, ns.has_preprocessor), + }; + sqlx::query!( "INSERT INTO script (workspace_id, hash, path, parent_hashes, summary, description, \ content, created_by, schema, is_template, extra_perms, lock, language, kind, tag, \ @@ -660,9 +673,9 @@ async fn create_script_internal<'c>( ns.timeout, ns.concurrency_key, ns.visible_to_runner_only, - ns.no_main_func, + no_main_func.filter(|x| *x), // should be Some(true) or None codebase, - ns.has_preprocessor, + has_preprocessor.filter(|x| *x), // should be Some(true) or None if ns.on_behalf_of_email.is_some() { Some(&authed.email) } else { diff --git a/backend/windmill-worker/src/bun_executor.rs b/backend/windmill-worker/src/bun_executor.rs index 134511472fd73..ede17da758d02 100644 --- a/backend/windmill-worker/src/bun_executor.rs +++ b/backend/windmill-worker/src/bun_executor.rs @@ -951,6 +951,7 @@ pub async fn handle_bun_job( let args = windmill_parser_ts::parse_deno_signature( inner_content, true, + false, main_override.map(ToString::to_string), )? .args; @@ -960,6 +961,7 @@ pub async fn handle_bun_job( windmill_parser_ts::parse_deno_signature( inner_content, true, + false, Some("preprocessor".to_string()), )? .args, @@ -1573,7 +1575,7 @@ pub async fn start_worker( { // let mut start = Instant::now(); - let args = windmill_parser_ts::parse_deno_signature(inner_content, true, None)?.args; + let args = windmill_parser_ts::parse_deno_signature(inner_content, true, false, None)?.args; let dates = args .iter() .filter_map(|x| { diff --git a/backend/windmill-worker/src/deno_executor.rs b/backend/windmill-worker/src/deno_executor.rs index 6a7bed5c38073..40350fdeee0ff 100644 --- a/backend/windmill-worker/src/deno_executor.rs +++ b/backend/windmill-worker/src/deno_executor.rs @@ -205,6 +205,7 @@ pub async fn handle_deno_job( let args = windmill_parser_ts::parse_deno_signature( inner_content, true, + false, main_override.map(ToString::to_string), )? .args; @@ -214,6 +215,7 @@ pub async fn handle_deno_job( windmill_parser_ts::parse_deno_signature( inner_content, true, + false, Some("preprocessor".to_string()), )? .args, @@ -533,7 +535,7 @@ pub async fn start_worker( { // let mut start = Instant::now(); - let args = windmill_parser_ts::parse_deno_signature(inner_content, true, None)?.args; + let args = windmill_parser_ts::parse_deno_signature(inner_content, true, false, None)?.args; let dates = args .iter() .filter_map(|x| { diff --git a/backend/windmill-worker/src/js_eval.rs b/backend/windmill-worker/src/js_eval.rs index 9aab14429667d..50f13788e7997 100644 --- a/backend/windmill-worker/src/js_eval.rs +++ b/backend/windmill-worker/src/js_eval.rs @@ -775,7 +775,7 @@ pub async fn eval_fetch_timeout( let (sender, mut receiver) = oneshot::channel::(); - let parsed_args = windmill_parser_ts::parse_deno_signature(&ts_expr, true, None)?.args; + let parsed_args = windmill_parser_ts::parse_deno_signature(&ts_expr, true, false, None)?.args; let spread = parsed_args .into_iter() .map(|x| { diff --git a/backend/windmill-worker/src/python_executor.rs b/backend/windmill-worker/src/python_executor.rs index d86c84dd0d440..531c41887a909 100644 --- a/backend/windmill-worker/src/python_executor.rs +++ b/backend/windmill-worker/src/python_executor.rs @@ -1296,12 +1296,14 @@ async fn prepare_wrapper( let sig = windmill_parser_py::parse_python_signature( inner_content, main_override.map(ToString::to_string), + false, )?; let pre_sig = if apply_preprocessor { Some(windmill_parser_py::parse_python_signature( inner_content, Some("preprocessor".to_string()), + false, )?) } else { None @@ -1661,7 +1663,7 @@ async fn spawn_uv_install( .replace("{TARGET_DIR}", &venv_p) .replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string()), )?; - + let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str()); nsjail_cmd .current_dir(job_dir) diff --git a/cli/metadata.ts b/cli/metadata.ts index e78b0bf539b8b..d547cee29f8c8 100644 --- a/cli/metadata.ts +++ b/cli/metadata.ts @@ -313,10 +313,16 @@ export async function updateScriptSchema( path ); metadataContent.schema = result.schema; - if (result.has_preprocessor == true) + if (result.has_preprocessor) { metadataContent.has_preprocessor = result.has_preprocessor; - if (result.no_main_func === true) + } else { + delete metadataContent.has_preprocessor; + } + if (result.no_main_func) { metadataContent.no_main_func = result.no_main_func; + } else { + delete metadataContent.no_main_func; + } } async function updateScriptLock( @@ -441,7 +447,11 @@ export function inferSchema( content: string, currentSchema: any, path: string -) { +): { + schema: any; + has_preprocessor: boolean | undefined; + no_main_func: boolean | undefined; +} { let inferedSchema: any; if (language === "python3") { inferedSchema = JSON.parse(parse_python(content)); From 826fd436bb1217a7215fcc92e11b2b4f3a0ee2ec Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 16:43:54 +0100 Subject: [PATCH 03/41] optimize network calls of flow status --- .../src/lib/components/FlowJobResult.svelte | 20 ++++++++---- .../components/FlowStatusViewerInner.svelte | 31 ++++++++++++++++--- .../(root)/(logged)/run/[...run]/+page.svelte | 27 ++++++++-------- 3 files changed, 55 insertions(+), 23 deletions(-) diff --git a/frontend/src/lib/components/FlowJobResult.svelte b/frontend/src/lib/components/FlowJobResult.svelte index cd8337238989b..6160ebe45beb0 100644 --- a/frontend/src/lib/components/FlowJobResult.svelte +++ b/frontend/src/lib/components/FlowJobResult.svelte @@ -29,17 +29,22 @@ $: jobId != lastJobId && diffJobId() + let iteration = 0 + let logOffset = 0 + async function diffJobId() { if (jobId != lastJobId) { lastJobId = jobId logs = undefined logOffset = 0 + iteration = 0 getLogs() } } - let logOffset = 0 async function getLogs() { + console.log('getLogs', iteration, jobId) + iteration += 1 if (jobId) { const getUpdate = await JobService.getJobUpdates({ workspace: workspaceId ?? $workspaceStore!, @@ -51,11 +56,14 @@ logOffset = getUpdate.log_offset ?? 0 } if (refreshLog) { - setTimeout(() => { - if (refreshLog) { - getLogs() - } - }, 1000) + setTimeout( + () => { + if (refreshLog) { + getLogs() + } + }, + iteration < 10 ? 1000 : iteration < 20 ? 2000 : 5000 + ) } } diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index 5f9faa8ed9eff..cbd1f9bfbd399 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -88,7 +88,7 @@ flowJobIds?.flowJobs?.map((x, id) => `iter #${id + 1} not loaded by frontend yet`) ?? [] let retry_selected = '' - let timeout: NodeJS.Timeout + let timeout: NodeJS.Timeout | undefined = undefined let localModuleStates: Writable> = writable({}) let localDurationStatuses: Writable> = writable({}) @@ -403,7 +403,7 @@ } } - $: isForloopSelected && globalModuleStates && loadJobInProgress() + $: isForloopSelected && globalModuleStates && debounceLoadJobInProgress() async function getNewJob(jobId: string, initialJob: Job | undefined) { if ( @@ -421,10 +421,33 @@ } } + let debounceJobId: string | undefined = undefined + let lastRefreshed: Date | undefined = undefined + function debounceLoadJobInProgress() { + const pollingRate = reducedPolling ? 5000 : 1000 + if ( + lastRefreshed && + new Date().getTime() - lastRefreshed.getTime() < pollingRate && + debounceJobId == jobId + ) { + timeout && clearTimeout(timeout) + } + timeout = setTimeout(() => { + loadJobInProgress() + lastRefreshed = new Date() + debounceJobId = jobId + timeout = undefined + }, pollingRate) + } + let errorCount = 0 let notAnonynmous = false + let started = false async function loadJobInProgress() { - dispatch('start') + if (!started) { + started = true + dispatch('start') + } if (jobId != '00000000-0000-0000-0000-000000000000') { try { const newJob = await getNewJob(jobId, initialJob) @@ -447,7 +470,7 @@ } } if (job?.type !== 'CompletedJob' && errorCount < 4 && !destroyed) { - timeout = setTimeout(() => loadJobInProgress(), reducedPolling ? 5000 : 1000) + debounceLoadJobInProgress() } else { dispatch('done', job) } diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 7d9d8da47c63f..4cc1f4c8264b9 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -388,19 +388,20 @@ {/if} - - job?.['result'] != undefined && (viewTab = 'result')} - bind:this={testJobLoader} - bind:getLogs - bind:isLoading={testIsLoading} - bind:job - bind:jobUpdateLastFetch - workspaceOverride={$workspaceStore} - bind:notfound -/> +{#if job?.job_kind != 'flow' && job?.job_kind != 'flownode' && job?.job_kind != 'flowpreview'} + job?.['result'] != undefined && (viewTab = 'result')} + bind:this={testJobLoader} + bind:getLogs + bind:isLoading={testIsLoading} + bind:job + bind:jobUpdateLastFetch + workspaceOverride={$workspaceStore} + bind:notfound + /> +{/if} From e0f3e0b1f8a3ff55629ed22a543b752ecc108d3d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 16:51:49 +0100 Subject: [PATCH 04/41] nit --- frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 4cc1f4c8264b9..3c125343b722c 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -342,6 +342,7 @@ path: job.script_path! }) } + job = undefined await goto('/run/' + id + '?workspace=' + $workspaceStore) } else { From cfe5232f56ad03713f858d8a7567dfaa9b07cc2e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 17:15:59 +0100 Subject: [PATCH 05/41] nits --- .../src/lib/components/FlowJobResult.svelte | 2 +- .../lib/components/FlowStatusViewerInner.svelte | 3 +-- .../(root)/(logged)/run/[...run]/+page.svelte | 17 ++++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/lib/components/FlowJobResult.svelte b/frontend/src/lib/components/FlowJobResult.svelte index 6160ebe45beb0..d603d72a92993 100644 --- a/frontend/src/lib/components/FlowJobResult.svelte +++ b/frontend/src/lib/components/FlowJobResult.svelte @@ -77,7 +77,7 @@ class:border={!noBorder} class="grid {!col ? 'grid-cols-2' - : 'grid-rows-2'} shadow border border-tertiary-inverse grow overflow-hidden" + : 'grid-rows-2 max-h-screen'} shadow border border-tertiary-inverse grow overflow-hidden" >
Result diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index cbd1f9bfbd399..d356196aa3006 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -1309,7 +1309,7 @@ durationStatuses={localDurationStatuses} /> {:else if rightColumnSelect == 'node_status'} -
+
{#if selectedNode} {@const node = $localModuleStates[selectedNode]} @@ -1388,7 +1388,6 @@ />
{/if} - Date: Fri, 14 Feb 2025 18:49:26 +0100 Subject: [PATCH 06/41] nits --- frontend/src/lib/components/FlowJobResult.svelte | 1 - frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/FlowJobResult.svelte b/frontend/src/lib/components/FlowJobResult.svelte index d603d72a92993..ca071370a4048 100644 --- a/frontend/src/lib/components/FlowJobResult.svelte +++ b/frontend/src/lib/components/FlowJobResult.svelte @@ -43,7 +43,6 @@ } async function getLogs() { - console.log('getLogs', iteration, jobId) iteration += 1 if (jobId) { const getUpdate = await JobService.getJobUpdates({ diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 710509474794e..1b817d15d6a56 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -927,6 +927,9 @@ on:jobsLoaded={({ detail }) => { job = detail }} + on:done={(e) => { + job = e.detail + }} initialJob={job} workspaceId={$workspaceStore} bind:selectedJobStep From 41eecc1437301bea557fb467cc48b502162de419 Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Fri, 14 Feb 2025 19:03:40 +0100 Subject: [PATCH 07/41] fix: static website serving (#5298) --- backend/windmill-api/src/http_triggers.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/backend/windmill-api/src/http_triggers.rs b/backend/windmill-api/src/http_triggers.rs index 0d6be258e1659..722a639842396 100644 --- a/backend/windmill-api/src/http_triggers.rs +++ b/backend/windmill-api/src/http_triggers.rs @@ -538,7 +538,7 @@ async fn get_http_route_trigger( let route_path = trigger.route_path.clone(); if trigger.is_static_website { router - .insert(format!("{}/*wm_subpath", route_path), idx) + .insert(format!("/{}/*wm_subpath", route_path), idx) .unwrap_or_else(|e| { tracing::warn!( "Failed to consider http trigger route {}: {:?}", @@ -547,19 +547,22 @@ async fn get_http_route_trigger( ); }); } - router.insert(route_path.as_str(), idx).unwrap_or_else(|e| { - tracing::warn!( - "Failed to consider http trigger route {}: {:?}", - route_path, - e, - ); - }); + router + .insert(format!("/{}", route_path), idx) + .unwrap_or_else(|e| { + tracing::warn!( + "Failed to consider http trigger route {}: {:?}", + route_path, + e, + ); + }); } - let trigger_idx = router.at(route_path.0.as_str()).ok(); + let requested_path = format!("/{}", route_path.0); + let trigger_idx = router.at(requested_path.as_str()).ok(); let matchit::Match { value: trigger_idx, params } = - not_found_if_none(trigger_idx, "Trigger", route_path.0.as_str())?; + not_found_if_none(trigger_idx, "Trigger", requested_path.as_str())?; let trigger = triggers.remove(trigger_idx.to_owned()); From dad829adf4bff97e998f7d18e0bbafb8497d4198 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 14 Feb 2025 14:48:33 -0500 Subject: [PATCH 08/41] feat: adding docker log rotation by default in docker compose (#5295) * feat: adding docker log rotation by default in docker compose * add newline * add compression --- .env | 4 ++++ docker-compose.yml | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.env b/.env index d4a48661cd927..da41f78d5cddb 100644 --- a/.env +++ b/.env @@ -7,3 +7,7 @@ WM_IMAGE=ghcr.io/windmill-labs/windmill:main # To use another port than :80, setup the Caddyfile and the caddy section of the docker-compose to your needs: https://caddyserver.com/docs/getting-started # To have caddy take care of automatic TLS + +# To rotate logs, set the following variables: +#LOG_MAX_SIZE=10m +#LOG_MAX_FILE=3 diff --git a/docker-compose.yml b/docker-compose.yml index df2a99b38d01c..a8ac7ba565fd7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,12 @@ version: "3.7" +x-logging: &default-logging + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-20m}" + max-file: "${LOG_MAX_FILE:-10}" + compress: "true" + services: db: deploy: @@ -22,6 +29,7 @@ services: interval: 10s timeout: 5s retries: 5 + logging: *default-logging windmill_server: image: ${WM_IMAGE} @@ -40,6 +48,7 @@ services: condition: service_healthy volumes: - worker_logs:/tmp/windmill/logs + logging: *default-logging windmill_worker: image: ${WM_IMAGE} @@ -65,6 +74,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock - worker_dependency_cache:/tmp/windmill/cache - worker_logs:/tmp/windmill/logs + logging: *default-logging ## This worker is specialized for "native" jobs. Native jobs run in-process and thus are much more lightweight than other jobs windmill_worker_native: @@ -90,6 +100,7 @@ services: condition: service_healthy volumes: - worker_logs:/tmp/windmill/logs + logging: *default-logging # This worker is specialized for reports or scraping jobs. It is assigned the "reports" worker group which has an init script that installs chromium and can be targeted by using the "chromium" worker tag. # windmill_worker_reports: # image: ${WM_IMAGE} @@ -135,6 +146,7 @@ services: volumes: - windmill_index:/tmp/windmill/search - worker_logs:/tmp/windmill/logs + logging: *default-logging lsp: image: ghcr.io/windmill-labs/windmill-lsp:latest @@ -144,6 +156,7 @@ services: - 3001 volumes: - lsp_cache:/pyls/.cache + logging: *default-logging multiplayer: image: ghcr.io/windmill-labs/windmill-multiplayer:latest @@ -152,6 +165,7 @@ services: restart: unless-stopped expose: - 3002 + logging: *default-logging caddy: image: ghcr.io/windmill-labs/caddy-l4:latest @@ -170,6 +184,7 @@ services: - BASE_URL=":80" # - BASE_URL=":443" # uncomment and comment line above to enable HTTPS via custom certificate and key files # - BASE_URL=mydomain.com # Uncomment and comment line above to enable HTTPS handling by Caddy + logging: *default-logging volumes: db_data: null From 8adf02ba3c8aaf98b63f92fe61046f6cdffbba71 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 14 Feb 2025 17:07:17 -0500 Subject: [PATCH 09/41] reactivity fix on teams workspace dropdown (#5300) --- frontend/src/lib/components/ConnectionSection.svelte | 2 +- frontend/src/lib/components/ScheduleEditorInner.svelte | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/lib/components/ConnectionSection.svelte b/frontend/src/lib/components/ConnectionSection.svelte index 104d6527b54e6..c0ad6eea20eeb 100644 --- a/frontend/src/lib/components/ConnectionSection.svelte +++ b/frontend/src/lib/components/ConnectionSection.svelte @@ -35,7 +35,7 @@ isFetching = false } - $: workspaceStore && platform && $enterpriseLicense === 'teams' && loadTeams() + $: workspaceStore && platform && $enterpriseLicense && loadTeams() async function connectTeams() { const selectedTeam = teams.find((team) => team.team_id === selected_teams_team) diff --git a/frontend/src/lib/components/ScheduleEditorInner.svelte b/frontend/src/lib/components/ScheduleEditorInner.svelte index 4d19aa19910c2..722354c8df72b 100644 --- a/frontend/src/lib/components/ScheduleEditorInner.svelte +++ b/frontend/src/lib/components/ScheduleEditorInner.svelte @@ -344,7 +344,6 @@ failedTimes = s.on_failure_times ?? 1 failedExact = s.on_failure_exact ?? false errorHandlerExtraArgs = s.on_failure_extra_args ?? {} - console.log('errorHandlerExtraArgs', errorHandlerExtraArgs) errorHandlerSelected = getHandlerType('error', errorHandlerPath) } else { errorHandlerPath = undefined From f1d9922688bf9caabddf8d690aedaf56efc43ad8 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 23:07:39 +0100 Subject: [PATCH 10/41] chore(main): release 1.463.0 (#5293) * chore(main): release 1.463.0 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 17 ++++++ backend/Cargo.lock | 58 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 63 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a535cc09f7d5e..f1063c11aaecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.463.0](https://github.com/windmill-labs/windmill/compare/v1.462.1...v1.463.0) (2025-02-14) + + +### Features + +* adding docker log rotation by default in docker compose ([#5295](https://github.com/windmill-labs/windmill/issues/5295)) ([dad829a](https://github.com/windmill-labs/windmill/commit/dad829adf4bff97e998f7d18e0bbafb8497d4198)) +* parse script for preprocessor/no_main_func on deploy ([#5292](https://github.com/windmill-labs/windmill/issues/5292)) ([28558e6](https://github.com/windmill-labs/windmill/commit/28558e674f60fef1b165a79c039b1b450759d500)) + + +### Bug Fixes + +* display branch chosen even if emoty branch ([77a8eed](https://github.com/windmill-labs/windmill/commit/77a8eedc96171e9f84463407bdc5aec9b7b10d62)) +* improve handling of empty branches and loops ([e7d4582](https://github.com/windmill-labs/windmill/commit/e7d458278969897aa7312dcd20a8091aaad772d7)) +* improve runs page load time ([266f820](https://github.com/windmill-labs/windmill/commit/266f82046ad287163d24910902393cd63156ca1d)) +* static website serving ([#5298](https://github.com/windmill-labs/windmill/issues/5298)) ([41eecc1](https://github.com/windmill-labs/windmill/commit/41eecc1437301bea557fb467cc48b502162de419)) +* users should be able to see their own jobs ([9ccadb6](https://github.com/windmill-labs/windmill/commit/9ccadb6085498119bdfcc172d52c7fce1eb3336e)) + ## [1.462.3](https://github.com/windmill-labs/windmill/compare/v1.462.1...v1.462.2) (2025-02-14) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 9c02a43c36f53..edb01c756a1a2 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -6608,9 +6608,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" +checksum = "f58e5423e24c18cc840e1c98370b3993c6649cd1678b4d24318bcf0a083cbe88" dependencies = [ "cc", ] @@ -6737,9 +6737,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.462.3" +version = "1.463.0" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.462.3" +version = "1.463.0" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.462.3" +version = "1.463.0" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.462.3" +version = "1.463.0" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.462.3" +version = "1.463.0" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.462.3" +version = "1.463.0" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 3e60f4d8785f2..3952f0b5c1497 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.462.3" +version = "1.463.0" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.462.3" +version = "1.463.0" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 2b9bfe7c0f232..87af4c763d63c 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.462.3 + version: 1.463.0 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index d55c7261398d2..12d38c179765e 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.462.3"; +export const VERSION = "v1.463.0"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 1ae97653b6c91..847d32c1d3bed 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.462.3"; +export const VERSION = "1.463.0"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 87f3664686b95..bf535a2d6e584 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.462.3", + "version": "1.463.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.462.3", + "version": "1.463.0", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 14762e9b43a9e..1bb507930e307 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.462.3", + "version": "1.463.0", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 15339d6e59861..0628a6f79ae55 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.462.3" -wmill_pg = ">=1.462.3" +wmill = ">=1.463.0" +wmill_pg = ">=1.463.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 18bc00e8476d9..e48c92ac39111 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.462.3 + version: 1.463.0 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 13f17174b8622..7c4e2f0fef092 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.462.3' + ModuleVersion = '1.463.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 7b7cdcbd0bece..402ecfad42b72 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.462.3" +version = "1.463.0" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 10fcb541c62db..e0de24be3b62f 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.462.3" +version = "1.463.0" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 71c58a044dc77..2a86dfa9f719a 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.462.3", + "version": "1.463.0", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index ed36b757b99b3..aaf238c29237d 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.462.3", + "version": "1.463.0", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 7cce9443de8d1..2b5a684cd4161 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.462.3 +1.463.0 From 53f47bcfc84ed747b55d3a7d84ccf13ff1c43c97 Mon Sep 17 00:00:00 2001 From: pyranota <92104930+pyranota@users.noreply.github.com> Date: Sat, 15 Feb 2025 22:39:37 +0300 Subject: [PATCH 11/41] fix: not able to filter runs by schedule (#5302) --- backend/windmill-api/src/jobs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 092d6b69b11d6..ccb408c020460 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1319,7 +1319,7 @@ pub fn filter_list_queue_query( } if let Some(p) = &lq.schedule_path { sqlb.and_where_eq("trigger", "?".bind(p)); - sqlb.and_where_eq("trigger_kind", "schedule"); + sqlb.and_where_eq("trigger_kind", "'schedule'"); } if let Some(h) = &lq.script_hash { sqlb.and_where_eq("runnable_id", "?".bind(h)); From cad14c25f6a06c6592fb034722c4d2ae187d8694 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 15 Feb 2025 20:44:26 +0100 Subject: [PATCH 12/41] chore(main): release 1.463.1 (#5303) * chore(main): release 1.463.1 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 ++ backend/Cargo.lock | 80 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 64 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1063c11aaecc..d1b0d4de9297d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.463.1](https://github.com/windmill-labs/windmill/compare/v1.463.0...v1.463.1) (2025-02-15) + + +### Bug Fixes + +* not able to filter runs by schedule ([#5302](https://github.com/windmill-labs/windmill/issues/5302)) ([53f47bc](https://github.com/windmill-labs/windmill/commit/53f47bcfc84ed747b55d3a7d84ccf13ff1c43c97)) + ## [1.463.0](https://github.com/windmill-labs/windmill/compare/v1.462.1...v1.463.0) (2025-02-14) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index edb01c756a1a2..1a6859b98e87e 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -3209,9 +3209,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -5776,9 +5776,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.70" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", "cfg-if", @@ -5817,9 +5817,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.105" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -6796,7 +6796,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.0", - "zerocopy 0.8.17", + "zerocopy 0.8.18", ] [[package]] @@ -6854,7 +6854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" dependencies = [ "getrandom 0.3.1", - "zerocopy 0.8.17", + "zerocopy 0.8.18", ] [[package]] @@ -8150,9 +8150,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" dependencies = [ "serde", ] @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.0" +version = "1.463.1" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.0" +version = "1.463.1" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.0" +version = "1.463.1" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.0" +version = "1.463.1" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.0" +version = "1.463.1" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.0" +version = "1.463.1" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-recursion", @@ -11783,11 +11783,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.17" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713" +checksum = "79386d31a42a4996e3336b0919ddb90f81112af416270cff95b5f5af22b839c2" dependencies = [ - "zerocopy-derive 0.8.17", + "zerocopy-derive 0.8.18", ] [[package]] @@ -11803,9 +11803,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.17" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626" +checksum = "76331675d372f91bf8d17e13afbd5fe639200b73d01f0fc748bb059f9cca2db7" dependencies = [ "proc-macro2", "quote", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 3952f0b5c1497..f9067b4361615 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.0" +version = "1.463.1" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.0" +version = "1.463.1" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 87af4c763d63c..bc4043804f2a9 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.0 + version: 1.463.1 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 12d38c179765e..68139f65e5c77 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.463.0"; +export const VERSION = "v1.463.1"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 847d32c1d3bed..75029f10f25c9 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.0"; +export const VERSION = "1.463.1"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index bf535a2d6e584..af7e3d1e8445c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.0", + "version": "1.463.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.0", + "version": "1.463.1", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 1bb507930e307..d482f1176ba24 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.0", + "version": "1.463.1", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 0628a6f79ae55..b95612444b61f 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.0" -wmill_pg = ">=1.463.0" +wmill = ">=1.463.1" +wmill_pg = ">=1.463.1" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index e48c92ac39111..1d4d669e321f9 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.0 + version: 1.463.1 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 7c4e2f0fef092..55789555ab825 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.0' + ModuleVersion = '1.463.1' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 402ecfad42b72..aa50fe4e23271 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.0" +version = "1.463.1" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index e0de24be3b62f..1574c459c46c0 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.0" +version = "1.463.1" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 2a86dfa9f719a..d95c2d2258e0e 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.0", + "version": "1.463.1", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index aaf238c29237d..792708174f925 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.0", + "version": "1.463.1", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 2b5a684cd4161..2d18b487c4241 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.0 +1.463.1 From 062e6bc161b56215cb081209d37ad8e0cbd1dd99 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Sat, 15 Feb 2025 20:03:25 -0500 Subject: [PATCH 13/41] fix: show skipped flows as success (#5304) --- backend/windmill-api/src/jobs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index ccb408c020460..405a12cd1a0f8 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -2681,7 +2681,7 @@ const CJ_FIELDS: &[&str] = &[ "v2_job.runnable_path as script_path", "null as args", "v2_job_completed.duration_ms", - "v2_job_completed.status = 'success' as success", + "v2_job_completed.status = 'success' OR v2_job_completed.status = 'skipped' as success", "false as deleted", "v2_job_completed.status = 'canceled' as canceled", "v2_job_completed.canceled_by", @@ -5472,7 +5472,7 @@ async fn list_completed_jobs( "v2_job.created_at", "v2_job_completed.started_at", "v2_job_completed.duration_ms", - "v2_job_completed.status = 'success' as success", + "v2_job_completed.status = 'success' OR v2_job_completed.status = 'skipped' as success", "v2_job.runnable_id as script_hash", "v2_job.runnable_path as script_path", "false as deleted", From 449cbcf0c30d0c6046d48d388b8ed4fcdf5f02a3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 16 Feb 2025 02:07:01 +0100 Subject: [PATCH 14/41] chore(main): release 1.463.2 (#5305) * chore(main): release 1.463.2 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 +++ backend/Cargo.lock | 50 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 49 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1b0d4de9297d..897d3205a118b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.463.2](https://github.com/windmill-labs/windmill/compare/v1.463.1...v1.463.2) (2025-02-16) + + +### Bug Fixes + +* show skipped flows as success ([#5304](https://github.com/windmill-labs/windmill/issues/5304)) ([062e6bc](https://github.com/windmill-labs/windmill/commit/062e6bc161b56215cb081209d37ad8e0cbd1dd99)) + ## [1.463.1](https://github.com/windmill-labs/windmill/compare/v1.463.0...v1.463.1) (2025-02-15) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 1a6859b98e87e..f9b0598ab1f3f 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.1" +version = "1.463.2" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.1" +version = "1.463.2" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.1" +version = "1.463.2" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.1" +version = "1.463.2" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.1" +version = "1.463.2" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.1" +version = "1.463.2" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index f9067b4361615..69ae45d5ca5b4 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.1" +version = "1.463.2" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.1" +version = "1.463.2" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index bc4043804f2a9..7be948a7a093c 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.1 + version: 1.463.2 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 68139f65e5c77..29292e5b21ff8 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.463.1"; +export const VERSION = "v1.463.2"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 75029f10f25c9..28a6436cc6baa 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.1"; +export const VERSION = "1.463.2"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index af7e3d1e8445c..39e870f751ebd 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.1", + "version": "1.463.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.1", + "version": "1.463.2", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index d482f1176ba24..b9d79dccd1996 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.1", + "version": "1.463.2", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index b95612444b61f..c519e3a81c7d0 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.1" -wmill_pg = ">=1.463.1" +wmill = ">=1.463.2" +wmill_pg = ">=1.463.2" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 1d4d669e321f9..a2e58e4261fbc 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.1 + version: 1.463.2 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 55789555ab825..f73febb17ee6e 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.1' + ModuleVersion = '1.463.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index aa50fe4e23271..fee5c46ce8f37 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.1" +version = "1.463.2" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 1574c459c46c0..7df9b85b77602 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.1" +version = "1.463.2" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index d95c2d2258e0e..908d2f3417bd2 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.1", + "version": "1.463.2", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 792708174f925..37b158cd14165 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.1", + "version": "1.463.2", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 2d18b487c4241..fbc30c990c994 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.1 +1.463.2 From 3535016608b48fade48d87dd77656e528ab1190d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 11:49:06 +0100 Subject: [PATCH 15/41] improve version detection from source --- backend/windmill-common/src/utils.rs | 7 +++++-- backend/windmill-common/src/worker.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/windmill-common/src/utils.rs b/backend/windmill-common/src/utils.rs index 735c3d4a27afa..0a6117999afa3 100644 --- a/backend/windmill-common/src/utils.rs +++ b/backend/windmill-common/src/utils.rs @@ -47,8 +47,11 @@ lazy_static::lazy_static! { .connect_timeout(std::time::Duration::from_secs(10)) .build().unwrap(); pub static ref GIT_SEM_VERSION: Version = Version::parse( - // skip first `v` character. - GIT_VERSION.split_at(1).1 + if GIT_VERSION.starts_with('v') { + &GIT_VERSION[1..] + } else { + GIT_VERSION + } ).unwrap_or(Version::new(0, 1, 0)); } diff --git a/backend/windmill-common/src/worker.rs b/backend/windmill-common/src/worker.rs index 487a217d7fd4a..eb5bd1d6f1c4b 100644 --- a/backend/windmill-common/src/worker.rs +++ b/backend/windmill-common/src/worker.rs @@ -657,7 +657,7 @@ pub async fn update_min_version<'c, E: sqlx::Executor<'c, Database = sqlx::Postg let min_version = pings .iter() .filter(|x| !x.is_empty()) - .filter_map(|x| semver::Version::parse(x.split_at(1).1).ok()) + .filter_map(|x| semver::Version::parse(if x.starts_with('v') { &x[1..] } else { x }).ok()) .min() .unwrap_or_else(|| cur_version.clone()); From 3493185e2f6c66324f2de16b63cafd135c9aab4a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 14:34:22 +0100 Subject: [PATCH 16/41] nits --- backend/windmill-api/src/jobs.rs | 2 +- .../(logged)/workspace_settings/+page.svelte | 24 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 405a12cd1a0f8..6b0efa485d6cf 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1161,7 +1161,7 @@ pub struct ListableCompletedJob { pub parent_job: Option, pub created_by: String, pub created_at: chrono::DateTime, - pub started_at: chrono::DateTime, + pub started_at: Option>, pub duration_ms: i64, pub success: bool, #[serde(skip_serializing_if = "Option::is_none")] diff --git a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte index 55726138c0234..1a060debfb3b0 100644 --- a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte @@ -447,11 +447,14 @@ if (emptyString($enterpriseLicense)) { errorHandlerSelected = 'custom' } else { - errorHandlerSelected = - emptyString(errorHandlerScriptPath) ? 'custom' : - (errorHandlerScriptPath.startsWith('hub/') && errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-slack')) ? 'slack' : - (errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-teams')) ? 'teams' : - 'custom' + errorHandlerSelected = emptyString(errorHandlerScriptPath) + ? 'custom' + : errorHandlerScriptPath.startsWith('hub/') && + errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-slack') + ? 'slack' + : errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-teams') + ? 'teams' + : 'custom' } errorHandlerExtraArgs = settings.error_handler_extra_args ?? {} workspaceDefaultAppPath = settings.default_app @@ -812,8 +815,8 @@ {#if !$enterpriseLicense}
- Workspace Teams commands is a Windmill EE feature. It enables using your current Slack / Teams - connection to run a custom script and send notifications. + Workspace Teams commands is a Windmill EE feature. It enables using your current Slack + / Teams connection to run a custom script and send notifications.
{/if} @@ -867,12 +870,7 @@
- {#if $superadmin} -

- When deleting the workspace, it will be archived for a short period of time and then - permanently deleted. -

- {:else} + {#if !$superadmin}

Only instance superadmins can delete a workspace.

{/if} {#if $workspaceStore === 'admins' || $workspaceStore === 'starter'} From 0208f53541473aa51bed0e15d938def3d4530e3f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 15:20:39 +0100 Subject: [PATCH 17/41] fix: windmill_admin has implicit bypass rls on v2_job even if role not set --- ...0205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql | 1 + ...250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql create mode 100644 backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql diff --git a/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql new file mode 100644 index 0000000000000..d2f607c5b8bd6 --- /dev/null +++ b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql @@ -0,0 +1 @@ +-- Add down migration script here diff --git a/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql new file mode 100644 index 0000000000000..f83ee7f3482ff --- /dev/null +++ b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql @@ -0,0 +1,3 @@ +-- Add up migration script here +DROP POLICY IF EXISTS admin_policy ON v2_job; +CREATE POLICY admin_policy ON v2_job FOR ALL TO windmill_admin USING (true); From fe337293dace8c36e8b577ff3302619996fc9f1f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 15:41:06 +0100 Subject: [PATCH 18/41] chore(main): release 1.463.3 (#5308) * chore(main): release 1.463.3 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 ++ backend/Cargo.lock | 66 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 57 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 897d3205a118b..9c14a34e5b299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.463.3](https://github.com/windmill-labs/windmill/compare/v1.463.2...v1.463.3) (2025-02-17) + + +### Bug Fixes + +* windmill_admin has implicit bypass rls on v2_job even if role not set ([0208f53](https://github.com/windmill-labs/windmill/commit/0208f53541473aa51bed0e15d938def3d4530e3f)) + ## [1.463.2](https://github.com/windmill-labs/windmill/compare/v1.463.1...v1.463.2) (2025-02-16) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index f9b0598ab1f3f..7d86e09e302cb 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -6795,7 +6795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.0", + "rand_core 0.9.1", "zerocopy 0.8.18", ] @@ -6826,7 +6826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.0", + "rand_core 0.9.1", ] [[package]] @@ -6849,9 +6849,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +checksum = "a88e0da7a2c97baa202165137c158d0a2e824ac465d13d81046727b34cb247d3" dependencies = [ "getrandom 0.3.1", "zerocopy 0.8.18", @@ -7575,9 +7575,9 @@ checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "ryu-js" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" +checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15" [[package]] name = "safetensors" @@ -9297,9 +9297,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "a40f762a77d2afa88c2d919489e390a12bdd261ed568e60cfa7e48d4e20f0d33" dependencies = [ "cfg-if", "fastrand 2.3.0", @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.2" +version = "1.463.3" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.2" +version = "1.463.3" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.2" +version = "1.463.3" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.2" +version = "1.463.3" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.2" +version = "1.463.3" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.2" +version = "1.463.3" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 69ae45d5ca5b4..72c133e293571 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.2" +version = "1.463.3" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.2" +version = "1.463.3" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 7be948a7a093c..d22a3886d3f88 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.2 + version: 1.463.3 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 29292e5b21ff8..32b434eb2f1e0 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.463.2"; +export const VERSION = "v1.463.3"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 28a6436cc6baa..165ce2e8c8d4b 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.2"; +export const VERSION = "1.463.3"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 39e870f751ebd..b4fa6c0b8ac71 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.2", + "version": "1.463.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.2", + "version": "1.463.3", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index b9d79dccd1996..a22bfb038b1df 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.2", + "version": "1.463.3", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index c519e3a81c7d0..5e8f57d701b30 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.2" -wmill_pg = ">=1.463.2" +wmill = ">=1.463.3" +wmill_pg = ">=1.463.3" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index a2e58e4261fbc..bc0eed2d61089 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.2 + version: 1.463.3 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index f73febb17ee6e..b1e9637ce1fa0 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.2' + ModuleVersion = '1.463.3' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index fee5c46ce8f37..1942a928878e8 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.2" +version = "1.463.3" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 7df9b85b77602..1cf8de80e6ab6 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.2" +version = "1.463.3" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 908d2f3417bd2..d513475883177 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.2", + "version": "1.463.3", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 37b158cd14165..3c2ff4eee0784 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.2", + "version": "1.463.3", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index fbc30c990c994..a97045182239a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.2 +1.463.3 From 5e22690bd9257d6c515c07b9357f955c2fcbb298 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 17:48:02 +0100 Subject: [PATCH 19/41] fix: improve que job indices for faster performances --- ...5b252449bd569df374e40ce8820fc3d75a0f0.json | 12 +++++++++ ...4ff1d599049ebefdaf97a017c9cef8d52ce20.json | 12 +++++++++ ...cfecf48305f5f4b644b3c35355074e1ccce28.json | 12 +++++++++ ...d9347206d2deaa99f9a4541101e610f84a50a.json | 12 +++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- backend/windmill-api/src/db.rs | 17 ++++++++++++ backend/windmill-common/src/lib.rs | 26 +++++++++---------- 7 files changed, 79 insertions(+), 14 deletions(-) create mode 100644 backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json create mode 100644 backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json create mode 100644 backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json create mode 100644 backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json diff --git a/backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json b/backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json new file mode 100644 index 0000000000000..2f17b5e8db1f3 --- /dev/null +++ b/backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS queue_sort", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0" +} diff --git a/backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json b/backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json new file mode 100644 index 0000000000000..d804949078af9 --- /dev/null +++ b/backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS queue_sort_2", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20" +} diff --git a/backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json b/backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json new file mode 100644 index 0000000000000..815f1fed70ad9 --- /dev/null +++ b/backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "CREATE INDEX CONCURRENTLY queue_sort_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for, tag) WHERE running = false", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28" +} diff --git a/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json b/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json new file mode 100644 index 0000000000000..aa744f6f08cd4 --- /dev/null +++ b/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for) WHERE running = false", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index 5bfff47576491..c2dfed73a2a83 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - true + null ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index a034569fda1af..106b29a81055b 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -655,6 +655,23 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .await?; }); + run_windmill_migration!("v2_improve_v2_queued_jobs_indices", &db, |tx| { + sqlx::query!("CREATE INDEX CONCURRENTLY queue_sort_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for, tag) WHERE running = false") + .execute(db) + .await?; + + sqlx::query!("CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (tag, priority DESC NULLS LAST, scheduled_for) WHERE running = false") + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS queue_sort") + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS queue_sort_2") + .execute(db) + .await?; + }); Ok(()) } diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 802af6196b4a4..396eafdf7f91b 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -281,7 +281,7 @@ pub async fn connect_db( pub async fn connect( database_url: &str, max_connections: u32, - worker_mode: bool, + _worker_mode: bool, ) -> Result, error::Error> { use std::time::Duration; @@ -289,18 +289,18 @@ pub async fn connect( .min_connections((max_connections / 5).clamp(3, max_connections)) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins - .after_connect(move |conn, _| { - if worker_mode { - Box::pin(async move { - sqlx::query("SET enable_seqscan = OFF;") - .execute(conn) - .await?; - Ok(()) - }) - } else { - Box::pin(async move { Ok(()) }) - } - }) + // .after_connect(move |conn, _| { + // if worker_mode { + // Box::pin(async move { + // sqlx::query("SET enable_seqscan = OFF;") + // .execute(conn) + // .await?; + // Ok(()) + // }) + // } else { + // Box::pin(async move { Ok(()) }) + // } + // }) .connect_with( sqlx::postgres::PgConnectOptions::from_str(database_url)?.statement_cache_capacity(400), ) From 85c56e9450773c03a44a4c99821717de5aef287f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 19:17:30 +0100 Subject: [PATCH 20/41] fix: improve que job indices for faster performances --- ...d9347206d2deaa99f9a4541101e610f84a50a.json | 12 ---- backend/windmill-api/src/db.rs | 6 +- backend/windmill-api/src/jobs.rs | 7 +- benchmarks/benchmark_oneoff.ts | 64 ++++++++++++++----- benchmarks/benchmark_suite.ts | 2 +- 5 files changed, 58 insertions(+), 33 deletions(-) delete mode 100644 backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json diff --git a/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json b/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json deleted file mode 100644 index aa744f6f08cd4..0000000000000 --- a/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for) WHERE running = false", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a" -} diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index 106b29a81055b..a1e260b7d2167 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -660,9 +660,9 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .execute(db) .await?; - sqlx::query!("CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (tag, priority DESC NULLS LAST, scheduled_for) WHERE running = false") - .execute(db) - .await?; + // sqlx::query!("CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (tag, priority DESC NULLS LAST, scheduled_for) WHERE running = false") + // .execute(db) + // .await?; sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS queue_sort") .execute(db) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 6b0efa485d6cf..c678af5465997 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1800,13 +1800,13 @@ async fn list_jobs( } sqlc.unwrap().limit(per_page).offset(offset).query()? }; - let mut tx = user_db.begin(&authed).await?; + let mut tx: Transaction<'_, Postgres> = user_db.begin(&authed).await?; #[cfg(feature = "prometheus")] let start = Instant::now(); #[cfg(feature = "prometheus")] - if _api_list_jobs_query_duration.is_some() { + if _api_list_jobs_query_duration.is_some() || true { tracing::info!("list_jobs query: {}", sql); } @@ -4695,6 +4695,7 @@ struct BatchInfo { flow_value: Option, path: Option, rawscript: Option, + tag: Option, } #[tracing::instrument(level = "trace", skip_all)] @@ -4863,6 +4864,8 @@ async fn add_batch_jobs( } else { format!("{}", language.as_str()) } + } else if let Some(tag) = batch_info.tag { + tag } else { format!("{}", language.as_str()) }; diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 41321b3ec66b7..ccfbfc09d9917 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -152,7 +152,6 @@ export async function main({ await createBenchScript(kind, workspace); } - pastJobs = await getCompletedJobsCount(); const jobsSent = jobs; console.log(`Bulk creating ${jobsSent} jobs`); @@ -208,11 +207,43 @@ export async function main({ throw new Error("Unknown script pattern " + kind); } - const response = await fetch( - config.server + + let testOtherTag = false; + const otherTagTodo = 500000; + if (testOtherTag) { + let parsed = JSON.parse(body); + parsed.tag = "test"; + let nbody = JSON.stringify(parsed); + let response2 = await fetch( + config.server + "/api/w/" + config.workspace_id + - `/jobs/add_batch_jobs/${jobsSent}`, + `/jobs/add_batch_jobs/${otherTagTodo}`, + { + method: "POST", + headers: { + ["Authorization"]: "Bearer " + config.token, + "Content-Type": "application/json", + }, + body: nbody, + } + ); + if (!response2.ok) { + throw new Error( + "Failed to create jobs: " + + response2.statusText + + " " + + (await response2.text()) + ); + } + } + + pastJobs = await getCompletedJobsCount(); + + const response = await fetch( + config.server + + "/api/w/" + + config.workspace_id + + `/jobs/add_batch_jobs/${jobsSent}`, { method: "POST", headers: { @@ -222,20 +253,24 @@ export async function main({ body, } ); + + + + + if (!response.ok) { throw new Error( "Failed to create jobs: " + - response.statusText + - " " + - (await response.text()) + response.statusText + + " " + + (await response.text()) ); } const uuids = await response.json(); const end_create = Date.now(); const create_duration = end_create - start_create; console.log( - `Jobs successfully added to the queue in ${ - create_duration / 1000 + `Jobs successfully added to the queue in ${create_duration / 1000 }s. Windmill will start pulling them\n` ); let start = Date.now(); @@ -249,7 +284,7 @@ export async function main({ const loopStart = Date.now(); if (!didStart) { const actual_queue = await getQueueCount(); - if (actual_queue < jobsSent) { + if (actual_queue < jobsSent + otherTagTodo) { start = Date.now(); didStart = true; } @@ -263,9 +298,9 @@ export async function main({ const instThr = lastElapsed > 0 ? ( - ((completedJobs - lastCompletedJobs) / (elapsed - lastElapsed)) * - 1000 - ).toFixed(2) + ((completedJobs - lastCompletedJobs) / (elapsed - lastElapsed)) * + 1000 + ).toFixed(2) : 0; lastElapsed = elapsed; @@ -275,8 +310,7 @@ export async function main({ enc( `elapsed: ${(elapsed / 1000).toFixed( 2 - )} | jobs executed: ${completedJobs}/${jobsSent} (thr: inst ${instThr} - avg ${avgThr}) | remaining: ${ - jobsSent - completedJobs + )} | jobs executed: ${completedJobs}/${jobsSent} (thr: inst ${instThr} - avg ${avgThr}) | remaining: ${jobsSent - completedJobs } \r` ) ); diff --git a/benchmarks/benchmark_suite.ts b/benchmarks/benchmark_suite.ts index e03148ce99934..7828c62d9b73d 100644 --- a/benchmarks/benchmark_suite.ts +++ b/benchmarks/benchmark_suite.ts @@ -27,7 +27,7 @@ async function warmUp( token, workspace, kind: "noop", - jobs: 50000, + jobs: 100000, }); } From e0d7a54a2debfad9684d7581ef9c83075a188cc5 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 19:26:34 +0100 Subject: [PATCH 21/41] nit on bench scripts --- benchmarks/benchmark_oneoff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index ccfbfc09d9917..285d471df85c4 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -284,7 +284,7 @@ export async function main({ const loopStart = Date.now(); if (!didStart) { const actual_queue = await getQueueCount(); - if (actual_queue < jobsSent + otherTagTodo) { + if (actual_queue < jobsSent + (testOtherTag ? otherTagTodo : 0)) { start = Date.now(); didStart = true; } From 953082681e2c4fd71d5ac1acf372265ccc72297b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 21:26:46 +0100 Subject: [PATCH 22/41] fix: improve que job indices for faster performances --- ...f073a79e300f3dd48f14122d1782eee663cd.json} | 7 +++--- ...cb4bdd64075939a4aa2c117e18372511ea7e0.json | 12 ---------- ...8008a9479bf4b3d7231371ebf26382ecde365.json | 12 ++++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- backend/windmill-api/src/jobs.rs | 7 +++++- backend/windmill-common/src/lib.rs | 6 ++--- backend/windmill-queue/src/jobs.rs | 3 +++ backend/windmill-worker/src/worker.rs | 2 +- benchmarks/benchmark_oneoff.ts | 22 ++++++++++--------- benchmarks/benchmark_suite.ts | 2 +- 10 files changed, 43 insertions(+), 32 deletions(-) rename backend/.sqlx/{query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json => query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json} (72%) delete mode 100644 backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json create mode 100644 backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json diff --git a/backend/.sqlx/query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json b/backend/.sqlx/query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json similarity index 72% rename from backend/.sqlx/query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json rename to backend/.sqlx/query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json index 0c379a7bdb028..0a9e91b206ac2 100644 --- a/backend/.sqlx/query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json +++ b/backend/.sqlx/query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now()", + "query": "SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now() AND ($3::text[] IS NULL OR tag = ANY($3))", "describe": { "columns": [ { @@ -17,7 +17,8 @@ "parameters": { "Left": [ "Text", - "Bool" + "Bool", + "TextArray" ] }, "nullable": [ @@ -25,5 +26,5 @@ null ] }, - "hash": "19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395" + "hash": "0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd" } diff --git a/backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json b/backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json deleted file mode 100644 index 6ccaeece1ce0f..0000000000000 --- a/backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "VACUUM (skip_locked) v2_job_queue, v2_job_runtime, v2_job_status", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0" -} diff --git a/backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json b/backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json new file mode 100644 index 0000000000000..641c94c555b3b --- /dev/null +++ b/backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "VACUUM v2_job_queue, v2_job_runtime, v2_job_status", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index c2dfed73a2a83..5bfff47576491 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - null + true ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index c678af5465997..b5e1bc5a0867a 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1647,6 +1647,7 @@ struct QueueStats { #[derive(Deserialize)] pub struct CountQueueJobsQuery { all_workspaces: Option, + tags: Option, } async fn count_queue_jobs( @@ -1654,12 +1655,16 @@ async fn count_queue_jobs( Path(w_id): Path, Query(cq): Query, ) -> error::JsonResult { + let tags = cq + .tags + .map(|t| t.split(',').map(|s| s.to_string()).collect::>()); Ok(Json( sqlx::query_as!( QueueStats, - "SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now()", + "SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now() AND ($3::text[] IS NULL OR tag = ANY($3))", w_id, w_id == "admins" && cq.all_workspaces.unwrap_or(false), + tags.as_ref().map(|v| v.as_slice()) ) .fetch_one(&db) .await?, diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 396eafdf7f91b..c8996b3595e09 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -292,9 +292,9 @@ pub async fn connect( // .after_connect(move |conn, _| { // if worker_mode { // Box::pin(async move { - // sqlx::query("SET enable_seqscan = OFF;") - // .execute(conn) - // .await?; + // // sqlx::query("SET enable_seqscan = OFF;") + // // .execute(conn) + // // .await?; // Ok(()) // }) // } else { diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index 2d2025da921f1..5d360d3acbcdc 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -2108,12 +2108,15 @@ async fn pull_single_job_and_mark_as_running_no_concurrency_limit<'c>( for query in queries.iter() { // tracing::info!("Pulling job with query: {}", query); + // let instant = std::time::Instant::now(); let r = sqlx::query_as::<_, PulledJob>(query) .bind(worker_name) .fetch_optional(db) .await?; if let Some(pulled_job) = r { + // tracing::info!("pulled job: {:?}", instant.elapsed().as_micros()); + highest_priority_job = Some(pulled_job); break; } diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 5592e0d722ae7..590b57227c19a 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -1277,7 +1277,7 @@ pub async fn run_worker( tokio::task::spawn( (async move { tracing::info!(worker = %worker_name, hostname = %hostname, "vacuuming queue"); - if let Err(e) = sqlx::query!("VACUUM (skip_locked) v2_job_queue, v2_job_runtime, v2_job_status") + if let Err(e) = sqlx::query!("VACUUM v2_job_queue, v2_job_runtime, v2_job_status") .execute(&db2) .await { diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 285d471df85c4..62a3e3d5f7b02 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -37,6 +37,7 @@ async function verifyOutputs(uuids: string[], workspace: string) { console.log(`Incorrect results: ${incorrectResults}`); } +export const NON_TEST_TAGS = ["deno", "python", "go", "bash", "dedicated", "bun", "nativets", "flow"] export async function main({ host, email, @@ -96,11 +97,11 @@ export async function main({ windmill.setClient(final_token, host); const enc = (s: string) => new TextEncoder().encode(s); - async function getQueueCount() { + async function getQueueCount(tags?: string[]) { return ( await ( await fetch( - config.server + "/api/w/" + config.workspace_id + "/jobs/queue/count", + config.server + "/api/w/" + config.workspace_id + "/jobs/queue/count" + (tags && tags.length > 0 ? "?tags=" + tags.join(",") : ""), { headers: { ["Authorization"]: "Bearer " + config.token } } ) ).json() @@ -132,11 +133,11 @@ export async function main({ } let pastJobs = 0; - async function getCompletedJobsCount(): Promise { + async function getCompletedJobsCount(tags?: string[]): Promise { const completedJobs = ( await ( await fetch( - host + "/api/w/" + config.workspace_id + "/jobs/completed/count", + host + "/api/w/" + config.workspace_id + "/jobs/completed/count" + (tags && tags.length > 0 ? "?tags=" + tags.join(",") : ""), { headers: { ["Authorization"]: "Bearer " + config.token } } ) ).json() @@ -208,8 +209,9 @@ export async function main({ } let testOtherTag = false; - const otherTagTodo = 500000; if (testOtherTag) { + const otherTagTodo = 2000000; + let parsed = JSON.parse(body); parsed.tag = "test"; let nbody = JSON.stringify(parsed); @@ -237,7 +239,7 @@ export async function main({ } } - pastJobs = await getCompletedJobsCount(); + pastJobs = await getCompletedJobsCount(NON_TEST_TAGS); const response = await fetch( config.server + @@ -283,14 +285,14 @@ export async function main({ while (completedJobs < jobsSent) { const loopStart = Date.now(); if (!didStart) { - const actual_queue = await getQueueCount(); - if (actual_queue < jobsSent + (testOtherTag ? otherTagTodo : 0)) { + const actual_queue = await getQueueCount(NON_TEST_TAGS); + if (actual_queue < jobsSent) { start = Date.now(); didStart = true; } } else { const elapsed = start ? Date.now() - start : 0; - completedJobs = await getCompletedJobsCount(); + completedJobs = await getCompletedJobsCount(NON_TEST_TAGS); if (nStepsFlow > 0) { completedJobs = Math.floor(completedJobs / (nStepsFlow + 1)); } @@ -328,7 +330,7 @@ export async function main({ console.log(`avg. throughput (jobs/time): ${jobsSent / total_duration_sec}`); console.log("completed jobs", completedJobs); - console.log("queue length:", await getQueueCount()); + console.log("queue length:", await getQueueCount(NON_TEST_TAGS)); if ( !noVerify && diff --git a/benchmarks/benchmark_suite.ts b/benchmarks/benchmark_suite.ts index 7828c62d9b73d..e03148ce99934 100644 --- a/benchmarks/benchmark_suite.ts +++ b/benchmarks/benchmark_suite.ts @@ -27,7 +27,7 @@ async function warmUp( token, workspace, kind: "noop", - jobs: 100000, + jobs: 50000, }); } From 0dd0a795a6b5d0d58be2d32b76778ad1e455748d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 21:54:00 +0100 Subject: [PATCH 23/41] nit benchmarks improvement --- benchmarks/benchmark_oneoff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 62a3e3d5f7b02..2800eadebb640 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -26,7 +26,7 @@ async function verifyOutputs(uuids: string[], workspace: string) { incorrectResults++; } if (job.result !== uuid) { - console.log(`Job ${uuid} did not output the correct value`); + console.log(`Job ${uuid} did not output the correct value: ${JSON.stringify(job.result)}`); incorrectResults++; } } catch (_) { From c6b2e6653a6d4a8994e078d3a82fad64639714fe Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 22:20:33 +0100 Subject: [PATCH 24/41] output incorrect jobs in benchmarks --- benchmarks/benchmark_oneoff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 2800eadebb640..9ec48df3a4cb1 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -26,7 +26,7 @@ async function verifyOutputs(uuids: string[], workspace: string) { incorrectResults++; } if (job.result !== uuid) { - console.log(`Job ${uuid} did not output the correct value: ${JSON.stringify(job.result)}`); + console.log(`Job ${uuid} did not output the correct value: ${JSON.stringify(job)}`); incorrectResults++; } } catch (_) { From 935b5b799636c0f02597315837268d4a76f6709a Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Mon, 17 Feb 2025 16:44:26 -0500 Subject: [PATCH 25/41] fix: improve teams settings in workspace settings (#5316) --- ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ------------------- ...4caecda6335eda5b2e97e5a7370361653ff48.json | 26 +++++++++++++++++++ ...849e72bdc197c17c0fc51777c1dc9267e2daf.json | 12 +++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- ...a6bdb16a1be66e993a5cfadf6de2e3c8a5021.json | 12 +++++++++ ...2bcae9640cee7b936820cb46c011222a77ff0.json | 14 ++++++++++ backend/ee-repo-ref.txt | 2 +- 7 files changed, 66 insertions(+), 28 deletions(-) delete mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json create mode 100644 backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json create mode 100644 backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json create mode 100644 backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json create mode 100644 backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json deleted file mode 100644 index 704778d04a6b9..0000000000000 --- a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH assigned_teams AS (\n SELECT teams_team_id\n FROM workspace_settings\n ),\n all_teams AS (\n SELECT jsonb_array_elements(value::jsonb) AS team\n FROM global_settings\n WHERE name = 'teams'\n )\n SELECT team->>'team_name' AS team_name, team->>'team_internal_id' AS team_id\n FROM all_teams\n WHERE NOT EXISTS (\n SELECT 1\n FROM assigned_teams\n WHERE assigned_teams.teams_team_id = team->>'team_internal_id'\n )\n AND team->>'team_name' IS NOT NULL\n AND team->>'team_id' IS NOT NULL\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "team_name", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "team_id", - "type_info": "Text" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - null, - null - ] - }, - "hash": "2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966" -} diff --git a/backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json b/backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json new file mode 100644 index 0000000000000..f3dc15325474d --- /dev/null +++ b/backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH assigned_teams AS (\n SELECT teams_team_id\n FROM workspace_settings\n ),\n all_teams AS (\n SELECT jsonb_array_elements(CASE\n WHEN jsonb_typeof(value::jsonb) = 'array' THEN value::jsonb\n ELSE '[]'::jsonb\n END) AS team\n FROM global_settings\n WHERE name = 'teams'\n )\n SELECT team->>'team_name' AS team_name, team->>'team_internal_id' AS team_id\n FROM all_teams\n WHERE NOT EXISTS (\n SELECT 1\n FROM assigned_teams\n WHERE assigned_teams.teams_team_id = team->>'team_internal_id'\n )\n AND team->>'team_name' IS NOT NULL\n AND team->>'team_id' IS NOT NULL\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "team_name", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "team_id", + "type_info": "Text" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + null, + null + ] + }, + "hash": "50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48" +} diff --git a/backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json b/backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json new file mode 100644 index 0000000000000..d52d46f1ddb7c --- /dev/null +++ b/backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE workspace_settings\n SET teams_command_script = NULL,\n teams_team_id = NULL,\n teams_team_name = NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index 5bfff47576491..c2dfed73a2a83 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - true + null ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json b/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json new file mode 100644 index 0000000000000..18f29062a6d60 --- /dev/null +++ b/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE global_settings\n SET value = (\n SELECT jsonb_agg(elem)\n FROM jsonb_array_elements(value) AS elem\n WHERE NOT (elem ? 'teams_channel')\n )\n WHERE name = 'critical_error_channels'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021" +} diff --git a/backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json b/backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json new file mode 100644 index 0000000000000..4c2cd96ca9945 --- /dev/null +++ b/backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE global_settings SET value = $1 WHERE name = 'teams'", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0" +} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index c94a57b20f853..83ad30b351ae8 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -703a03ac430b6f603a5a189e5b4ff9a42bb2bd7f \ No newline at end of file +e507af5589efb1a8a72ae4e231130f749bde738d \ No newline at end of file From 9234701f05316b5d14a4964df1b94e212837fb4a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 23:43:16 +0100 Subject: [PATCH 26/41] ensure index creation of root_job_by_path --- backend/windmill-api/src/db.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index a1e260b7d2167..b8d15160c7dab 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -545,8 +545,8 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .await?; }); - run_windmill_migration!("fix_job_index_1", &db, |tx| { - let migration_job_name = "fix_job_completed_index_4"; + run_windmill_migration!("fix_job_index_1_II", &db, |tx| { + let migration_job_name = "fix_job_index_1_II"; let mut i = 1; tracing::info!("step {i} of {migration_job_name} migration"); sqlx::query!("create index concurrently if not exists ix_job_workspace_id_created_at_new_3 ON v2_job (workspace_id, created_at DESC)") @@ -579,13 +579,20 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { i += 1; tracing::info!("step {i} of {migration_job_name} migration"); - sqlx::query!("create index concurrently if not exists root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL") + sqlx::query!("create index concurrently if not exists ix_job_root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL") .execute(db) .await?; i += 1; tracing::info!("step {i} of {migration_job_name} migration"); + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2") + .execute(db) + .await?; + + i += 1; + tracing::info!("step {i} of {migration_job_name} migration"); + sqlx::query!("create index concurrently if not exists ix_job_created_at ON v2_job (created_at DESC)") .execute(db) .await?; From 3d7882577fc01ef3cce008848e3de211e9416b41 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 00:00:51 +0100 Subject: [PATCH 27/41] chore(main): release 1.463.4 (#5309) * chore(main): release 1.463.4 * Update CHANGELOG.md * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 8 +++ ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ++++++++ ...8c6395e2440ea27553b7ccb18d7149b106728.json | 12 ++++ ...f9a71af5996bc76f328b3ba1cf68a71880462.json | 12 ++++ backend/Cargo.lock | 62 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 19 files changed, 106 insertions(+), 48 deletions(-) create mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json create mode 100644 backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json create mode 100644 backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c14a34e5b299..8d8093eecf96a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.463.4](https://github.com/windmill-labs/windmill/compare/v1.463.3...v1.463.4) (2025-02-17) + + +### Bug Fixes + +* improve queue job indices for faster performances ([9530826](https://github.com/windmill-labs/windmill/commit/953082681e2c4fd71d5ac1acf372265ccc72297b)) +* improve teams settings in workspace settings ([#5316](https://github.com/windmill-labs/windmill/issues/5316)) ([935b5b7](https://github.com/windmill-labs/windmill/commit/935b5b799636c0f02597315837268d4a76f6709a)) + ## [1.463.3](https://github.com/windmill-labs/windmill/compare/v1.463.2...v1.463.3) (2025-02-17) diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json new file mode 100644 index 0000000000000..704778d04a6b9 --- /dev/null +++ b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH assigned_teams AS (\n SELECT teams_team_id\n FROM workspace_settings\n ),\n all_teams AS (\n SELECT jsonb_array_elements(value::jsonb) AS team\n FROM global_settings\n WHERE name = 'teams'\n )\n SELECT team->>'team_name' AS team_name, team->>'team_internal_id' AS team_id\n FROM all_teams\n WHERE NOT EXISTS (\n SELECT 1\n FROM assigned_teams\n WHERE assigned_teams.teams_team_id = team->>'team_internal_id'\n )\n AND team->>'team_name' IS NOT NULL\n AND team->>'team_id' IS NOT NULL\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "team_name", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "team_id", + "type_info": "Text" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + null, + null + ] + }, + "hash": "2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966" +} diff --git a/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json b/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json new file mode 100644 index 0000000000000..fce1c4942adec --- /dev/null +++ b/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728" +} diff --git a/backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json b/backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json new file mode 100644 index 0000000000000..b3d20ccceab50 --- /dev/null +++ b/backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "create index concurrently if not exists ix_job_root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462" +} diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 7d86e09e302cb..f82041c837e63 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1668,9 +1668,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.29" +version = "4.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" +checksum = "92b7b18d71fad5313a1e320fa9897994228ce274b60faa4d694fe0ea89cd9e6d" dependencies = [ "clap_builder", "clap_derive", @@ -1678,9 +1678,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.29" +version = "4.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" +checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c" dependencies = [ "anstream", "anstyle", @@ -9297,9 +9297,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.17.0" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40f762a77d2afa88c2d919489e390a12bdd261ed568e60cfa7e48d4e20f0d33" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand 2.3.0", @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.3" +version = "1.463.4" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.3" +version = "1.463.4" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.3" +version = "1.463.4" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.3" +version = "1.463.4" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.3" +version = "1.463.4" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.3" +version = "1.463.4" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 72c133e293571..0b8c02d1fa472 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.3" +version = "1.463.4" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.3" +version = "1.463.4" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index d22a3886d3f88..0e9b0328d46f2 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.3 + version: 1.463.4 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 32b434eb2f1e0..fc4f611794475 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.463.3"; +export const VERSION = "v1.463.4"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 165ce2e8c8d4b..51c8bd0809149 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.3"; +export const VERSION = "1.463.4"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b4fa6c0b8ac71..9a8bce288988b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.3", + "version": "1.463.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.3", + "version": "1.463.4", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index a22bfb038b1df..1ece7bb7649a0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.3", + "version": "1.463.4", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 5e8f57d701b30..18b12dfc57df0 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.3" -wmill_pg = ">=1.463.3" +wmill = ">=1.463.4" +wmill_pg = ">=1.463.4" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index bc0eed2d61089..043c7c77fbecd 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.3 + version: 1.463.4 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index b1e9637ce1fa0..7ab35ebe95eb5 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.3' + ModuleVersion = '1.463.4' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 1942a928878e8..29a80185e2d0a 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.3" +version = "1.463.4" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 1cf8de80e6ab6..ee2dac54aabfc 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.3" +version = "1.463.4" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index d513475883177..c4e0f34c3d241 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.3", + "version": "1.463.4", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 3c2ff4eee0784..ba672889732a7 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.3", + "version": "1.463.4", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index a97045182239a..c6fd9a4d69da8 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.3 +1.463.4 From 3b6585afdf004929be135b7c3f7cf1aa678f4d0c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 01:35:49 +0100 Subject: [PATCH 28/41] nit benchmarks --- ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ------------------- ...c3030216b5a4ed669f77962509d1c2c6cb780.json | 12 --------- benchmarks/benchmark_oneoff.ts | 2 +- benchmarks/lib.ts | 4 +-- 4 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json delete mode 100644 backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json deleted file mode 100644 index 704778d04a6b9..0000000000000 --- a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH assigned_teams AS (\n SELECT teams_team_id\n FROM workspace_settings\n ),\n all_teams AS (\n SELECT jsonb_array_elements(value::jsonb) AS team\n FROM global_settings\n WHERE name = 'teams'\n )\n SELECT team->>'team_name' AS team_name, team->>'team_internal_id' AS team_id\n FROM all_teams\n WHERE NOT EXISTS (\n SELECT 1\n FROM assigned_teams\n WHERE assigned_teams.teams_team_id = team->>'team_internal_id'\n )\n AND team->>'team_name' IS NOT NULL\n AND team->>'team_id' IS NOT NULL\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "team_name", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "team_id", - "type_info": "Text" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - null, - null - ] - }, - "hash": "2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966" -} diff --git a/backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json b/backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json deleted file mode 100644 index 200a5bf47f728..0000000000000 --- a/backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "create index concurrently if not exists root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780" -} diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 9ec48df3a4cb1..6685eae1c5cf2 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -201,7 +201,7 @@ export async function main({ kind: "rawscript", rawscript: { language: api.RawScript.language.BASH, - content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(25000) + "echo \"$WM_FLOW_JOB_ID\"\n", + content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(100) + "echo \"$WM_FLOW_JOB_ID\"\n", }, }); } else { diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index fc4f611794475..d7543a3d55bf4 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -25,7 +25,7 @@ async function waitForDeployment(workspace: string, hash: string) { if (resp.lock !== null) { return; } - } catch (err) {} + } catch (err) { } await sleep(0.5); } throw new Error("Script did not deploy in time"); @@ -246,7 +246,7 @@ export const getFlowPayload = (flowPattern: string): api.FlowPreview => { input_transforms: {}, language: api.RawScript.language.BASH, type: "rawscript", - content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(25000) + "echo \"$WM_FLOW_JOB_ID\"\n", + content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(100) + `if [[ -z $\{WM_FLOW_JOB_ID+x\} ]]; then\necho "not set"\nelif [[ -z "$WM_FLOW_JOB_ID" ]]; then\necho "empty"\nelse\necho "$WM_FLOW_JOB_ID"\nfi`, }, } ], From 588ff79364c632563f9977000cff8682bf94b4f3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 08:43:03 +0100 Subject: [PATCH 29/41] make benchmarks even more stable --- ...9c2e1e9ca0ed33077ade8d7560e7cc21fa06.json} | 5 ++-- ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- backend/pg_log_tail | 0 backend/windmill-common/src/lib.rs | 26 +++++++++---------- backend/windmill-queue/src/jobs.rs | 20 +++++++------- 5 files changed, 26 insertions(+), 27 deletions(-) rename backend/.sqlx/{query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json => query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json} (60%) create mode 100644 backend/pg_log_tail diff --git a/backend/.sqlx/query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json b/backend/.sqlx/query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json similarity index 60% rename from backend/.sqlx/query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json rename to backend/.sqlx/query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json index 2872c1655ba8f..8a4b957c2a69a 100644 --- a/backend/.sqlx/query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json +++ b/backend/.sqlx/query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "DELETE FROM v2_job_queue WHERE workspace_id = $1 AND id = $2 RETURNING 1", + "query": "DELETE FROM v2_job_queue WHERE id = $1 RETURNING 1", "describe": { "columns": [ { @@ -11,7 +11,6 @@ ], "parameters": { "Left": [ - "Text", "Uuid" ] }, @@ -19,5 +18,5 @@ null ] }, - "hash": "d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745" + "hash": "c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06" } diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index c2dfed73a2a83..5bfff47576491 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - null + true ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/pg_log_tail b/backend/pg_log_tail new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index c8996b3595e09..802af6196b4a4 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -281,7 +281,7 @@ pub async fn connect_db( pub async fn connect( database_url: &str, max_connections: u32, - _worker_mode: bool, + worker_mode: bool, ) -> Result, error::Error> { use std::time::Duration; @@ -289,18 +289,18 @@ pub async fn connect( .min_connections((max_connections / 5).clamp(3, max_connections)) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins - // .after_connect(move |conn, _| { - // if worker_mode { - // Box::pin(async move { - // // sqlx::query("SET enable_seqscan = OFF;") - // // .execute(conn) - // // .await?; - // Ok(()) - // }) - // } else { - // Box::pin(async move { Ok(()) }) - // } - // }) + .after_connect(move |conn, _| { + if worker_mode { + Box::pin(async move { + sqlx::query("SET enable_seqscan = OFF;") + .execute(conn) + .await?; + Ok(()) + }) + } else { + Box::pin(async move { Ok(()) }) + } + }) .connect_with( sqlx::postgres::PgConnectOptions::from_str(database_url)?.statement_cache_capacity(400), ) diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index 5d360d3acbcdc..e582fa39dcb2a 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -566,6 +566,9 @@ pub async fn add_completed_job( let result_columns = result_columns.as_ref(); let _job_id = queued_job.id; let (opt_uuid, _duration, _skip_downstream_error_handlers) = (|| async { + + // let start = std::time::Instant::now(); + let mut tx = db.begin().await?; let job_id = queued_job.id; @@ -663,7 +666,7 @@ pub async fn add_completed_job( // tracing::error!("Added completed job {:#?}", queued_job); let mut _skip_downstream_error_handlers = false; - tx = delete_job(tx, &queued_job.workspace_id, job_id).await?; + tx = delete_job(tx, &job_id).await?; // tracing::error!("3 {:?}", start.elapsed()); if queued_job.is_flow_step { @@ -858,6 +861,7 @@ pub async fn add_completed_job( "inserted completed job: {} (success: {success})", queued_job.id ); + // tracing::info!("completed job: {:?}", start.elapsed().as_micros()); Ok((None, _duration, _skip_downstream_error_handlers)) as windmill_common::error::Result<(Option, i64, bool)> }) .retry( @@ -2597,21 +2601,17 @@ async fn extract_result_from_job_result( pub async fn delete_job<'c>( mut tx: Transaction<'c, Postgres>, - w_id: &str, - job_id: Uuid, + job_id: &Uuid, ) -> windmill_common::error::Result> { #[cfg(feature = "prometheus")] if METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed) { QUEUE_DELETE_COUNT.inc(); } - let job_removed = sqlx::query_scalar!( - "DELETE FROM v2_job_queue WHERE workspace_id = $1 AND id = $2 RETURNING 1", - w_id, - job_id - ) - .fetch_optional(&mut *tx) - .await; + let job_removed = + sqlx::query_scalar!("DELETE FROM v2_job_queue WHERE id = $1 RETURNING 1", job_id,) + .fetch_optional(&mut *tx) + .await; if let Err(job_removed) = job_removed { tracing::error!( From 0c391e92a22b89221f7754a1ed360c6ee6e80965 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 09:51:21 +0100 Subject: [PATCH 30/41] improve benchmarks --- .github/workflows/benchmark.yml | 2 ++ benchmarks/benchmark_suite.ts | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f95dee00daa0c..b48ad1c990be3 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -162,6 +162,7 @@ jobs: -c https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json --workers 4 + --factor 3 - name: Save benchmark results uses: actions/upload-artifact@v4 with: @@ -281,6 +282,7 @@ jobs: -c https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json --workers 8 + --factor 3 - name: Save benchmark results uses: actions/upload-artifact@v4 with: diff --git a/benchmarks/benchmark_suite.ts b/benchmarks/benchmark_suite.ts index e03148ce99934..f4840dda05265 100644 --- a/benchmarks/benchmark_suite.ts +++ b/benchmarks/benchmark_suite.ts @@ -39,6 +39,7 @@ async function main({ workspace, configPath, workers, + factor }: { host: string; email?: string; @@ -47,6 +48,7 @@ async function main({ workspace: string; configPath: string; workers: number; + factor?: number; }) { async function getConfig(configPath: string): Promise { if (configPath.startsWith("http")) { @@ -77,7 +79,7 @@ async function main({ token, workspace, kind: benchmark.kind, - jobs: benchmark.jobs, + jobs: benchmark.jobs * (factor ?? 1), }); if (benchmark.noSave) { @@ -153,6 +155,9 @@ await new Command() "Number of workers that are used to run the benchmarks (only affect graph title)", { default: 1 } ) + .option("--factor ", "Factor to multiply the number of jobs by.", { + default: 1, + }) .action(main) .command( "upgrade", From 1b46e0f08426497d549cf5007c93981df9ab41e5 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:25:42 +0100 Subject: [PATCH 31/41] fix: fix teams cleanup preventing start --- ...05ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json | 12 ++++++++++++ ...d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- ...611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json | 12 ------------ backend/ee-repo-ref.txt | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json delete mode 100644 backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json diff --git a/backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json b/backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json new file mode 100644 index 0000000000000..91718513bbb6b --- /dev/null +++ b/backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE global_settings\n SET value = (\n SELECT COALESCE(jsonb_agg(elem), '[]'::jsonb)\n FROM jsonb_array_elements(value) AS elem\n WHERE NOT (elem ? 'teams_channel')\n )\n WHERE name = 'critical_error_channels'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index 5bfff47576491..c2dfed73a2a83 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - true + null ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json b/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json deleted file mode 100644 index 18f29062a6d60..0000000000000 --- a/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE global_settings\n SET value = (\n SELECT jsonb_agg(elem)\n FROM jsonb_array_elements(value) AS elem\n WHERE NOT (elem ? 'teams_channel')\n )\n WHERE name = 'critical_error_channels'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021" -} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 83ad30b351ae8..23791d63cd4d8 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -e507af5589efb1a8a72ae4e231130f749bde738d \ No newline at end of file +d6aeb430a172cb8e969a4d29bd0e0727c2a25b9d \ No newline at end of file From 112361adbaa24780913f774a8f3cb3e5ffbfec91 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:32:38 +0100 Subject: [PATCH 32/41] chore(main): release 1.463.5 (#5318) * chore(main): release 1.463.4 * update * Update CHANGELOG.md --- CHANGELOG.md | 8 ++ backend/Cargo.lock | 109 +++++++----------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 69 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d8093eecf96a..458b3a19ff456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.463.5](https://github.com/windmill-labs/windmill/compare/v1.463.4...v1.463.5) (2025-02-18) + + +### Bug Fixes + +* fix teams cleanup preventing start ([1b46e0f](https://github.com/windmill-labs/windmill/commit/1b46e0f08426497d549cf5007c93981df9ab41e5)) + + ## [1.463.4](https://github.com/windmill-labs/windmill/compare/v1.463.3...v1.463.4) (2025-02-17) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index f82041c837e63..53223e672ca9e 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -263,7 +263,7 @@ dependencies = [ "arrow-data", "arrow-schema", "chrono", - "chrono-tz 0.9.0", + "chrono-tz", "half", "hashbrown 0.14.5", "num", @@ -1610,18 +1610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", - "chrono-tz-build 0.3.0", - "phf", -] - -[[package]] -name = "chrono-tz" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c6ac4f2c0bf0f44e9161aec9675e1050aa4a530663c4a9e37e108fa948bca9f" -dependencies = [ - "chrono", - "chrono-tz-build 0.4.0", + "chrono-tz-build", "phf", ] @@ -1636,16 +1625,6 @@ dependencies = [ "phf_codegen", ] -[[package]] -name = "chrono-tz-build" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" -dependencies = [ - "parse-zoneinfo", - "phf_codegen", -] - [[package]] name = "cipher" version = "0.3.0" @@ -10858,7 +10837,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "axum", @@ -10901,7 +10880,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "argon2", @@ -10913,14 +10892,14 @@ dependencies = [ "async_zip", "axum", "base32", - "base64 0.22.1", + "base64 0.13.1", "byteorder", "bytes", "candle-core", "candle-nn", "candle-transformers", "chrono", - "chrono-tz 0.10.1", + "chrono-tz", "const_format", "cookie 0.17.0", "cron", @@ -10932,7 +10911,7 @@ dependencies = [ "hmac", "http 1.2.0", "hyper 1.6.0", - "itertools 0.14.0", + "itertools 0.10.5", "jsonwebtoken", "lazy_static", "magic-crypt", @@ -10974,7 +10953,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "tower 0.5.2", + "tower 0.4.13", "tower-cookies", "tower-http", "tracing", @@ -10995,9 +10974,9 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.4" +version = "1.463.5" dependencies = [ - "base64 0.22.1", + "base64 0.13.1", "chrono", "openapiv3", "prettyplease 0.1.25", @@ -11013,7 +10992,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.4" +version = "1.463.5" dependencies = [ "chrono", "serde", @@ -11026,7 +11005,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "serde", @@ -11040,7 +11019,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-stream", @@ -11049,7 +11028,7 @@ dependencies = [ "axum", "bytes", "chrono", - "chrono-tz 0.10.1", + "chrono-tz", "const_format", "crc", "cron", @@ -11062,7 +11041,7 @@ dependencies = [ "hmac", "hyper 1.6.0", "indexmap 2.7.1", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "magic-crypt", "mail-send", @@ -11099,7 +11078,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.4" +version = "1.463.5" dependencies = [ "regex", "serde", @@ -11113,7 +11092,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "bytes", @@ -11136,9 +11115,9 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.4" +version = "1.463.5" dependencies = [ - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "proc-macro2", "quote", @@ -11148,7 +11127,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.4" +version = "1.463.5" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "serde_json", @@ -11181,11 +11160,11 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "gosyn", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "regex", "windmill-parser", @@ -11193,7 +11172,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11205,10 +11184,10 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.10.5", "php-parser-rs", "serde_json", "windmill-parser", @@ -11216,10 +11195,10 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.10.5", "rustpython-parser", "serde_json", "windmill-parser", @@ -11227,11 +11206,11 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-recursion", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "malachite", "malachite-bigint", @@ -11247,11 +11226,11 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "convert_case 0.6.0", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "pulldown-cmark", "quote", @@ -11264,7 +11243,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11255,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11273,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11295,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "serde_json", @@ -11326,20 +11305,20 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-recursion", "axum", "backon", "chrono", - "chrono-tz 0.10.1", + "chrono-tz", "cron", "futures", "futures-core", "hex", "hmac", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "prometheus", "regex", @@ -11359,7 +11338,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.4" +version = "1.463.5" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,12 +11348,12 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-recursion", "backon", - "base64 0.22.1", + "base64 0.13.1", "bit-vec", "bollard", "bytes", @@ -11397,7 +11376,7 @@ dependencies = [ "gcp_auth", "git-version", "hex", - "itertools 0.14.0", + "itertools 0.10.5", "jsonwebtoken", "lazy_static", "mappable-rc", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 0b8c02d1fa472..2cb3e25aeb7e3 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.4" +version = "1.463.5" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.4" +version = "1.463.5" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 0e9b0328d46f2..c41a002fc81ba 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.4 + version: 1.463.5 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index d7543a3d55bf4..311c804d6c565 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.463.4"; +export const VERSION = "v1.463.5"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 51c8bd0809149..34d713357709c 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.4"; +export const VERSION = "1.463.5"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9a8bce288988b..22ed0a5141cda 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.4", + "version": "1.463.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.4", + "version": "1.463.5", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 1ece7bb7649a0..84c3029eaf374 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.4", + "version": "1.463.5", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 18b12dfc57df0..bb8f223315ff1 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.4" -wmill_pg = ">=1.463.4" +wmill = ">=1.463.5" +wmill_pg = ">=1.463.5" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 043c7c77fbecd..ebad73b1a5c64 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.4 + version: 1.463.5 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 7ab35ebe95eb5..1f5f2a972f42d 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.4' + ModuleVersion = '1.463.5' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 29a80185e2d0a..e41d4d318d32e 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.4" +version = "1.463.5" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index ee2dac54aabfc..ba4af4d219d61 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.4" +version = "1.463.5" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index c4e0f34c3d241..c5958e2f682ca 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.4", + "version": "1.463.5", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index ba672889732a7..6c750f83171dd 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.4", + "version": "1.463.5", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index c6fd9a4d69da8..5d003b1aa7a45 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.4 +1.463.5 From 24ff5a6261e82eda06f84f43c47749e7aa609bdb Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:40:17 +0100 Subject: [PATCH 33/41] fix: make teams cleanup non critical --- backend/ee-repo-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 23791d63cd4d8..562c9841143c1 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -d6aeb430a172cb8e969a4d29bd0e0727c2a25b9d \ No newline at end of file +5d25cf2cd15c1953794045fd7debea14a33c7519 \ No newline at end of file From b4088faae1998f4a9efbae903cbdb85d5c6099af Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:50:03 +0100 Subject: [PATCH 34/41] fix: pin chrono tz version to 0.10.1 --- backend/Cargo.lock | 128 ++++++++++++++++++++++++++------------------- backend/Cargo.toml | 2 +- 2 files changed, 76 insertions(+), 54 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 53223e672ca9e..d0053f30febbb 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -263,7 +263,7 @@ dependencies = [ "arrow-data", "arrow-schema", "chrono", - "chrono-tz", + "chrono-tz 0.9.0", "half", "hashbrown 0.14.5", "num", @@ -713,7 +713,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -1222,15 +1222,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" +checksum = "1230237285e3e10cde447185e8975408ae24deaa67205ce684805c25bc0c7937" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", + "memmap2", ] [[package]] @@ -1610,7 +1611,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", - "chrono-tz-build", + "chrono-tz-build 0.3.0", + "phf", +] + +[[package]] +name = "chrono-tz" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6ac4f2c0bf0f44e9161aec9675e1050aa4a530663c4a9e37e108fa948bca9f" +dependencies = [ + "chrono", + "chrono-tz-build 0.4.0", "phf", ] @@ -1625,6 +1637,16 @@ dependencies = [ "phf_codegen", ] +[[package]] +name = "chrono-tz-build" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" +dependencies = [ + "parse-zoneinfo", + "phf_codegen", +] + [[package]] name = "cipher" version = "0.3.0" @@ -2242,7 +2264,7 @@ dependencies = [ "tokio", "tokio-util", "url", - "uuid 1.13.1", + "uuid 1.13.2", "xz2", "zstd", ] @@ -2342,7 +2364,7 @@ dependencies = [ "regex", "sha2 0.10.8", "unicode-segmentation", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -2509,7 +2531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ "serde", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -2804,7 +2826,7 @@ dependencies = [ "serde", "thiserror 1.0.69", "tokio", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -5384,7 +5406,7 @@ dependencies = [ "sha2 0.10.8", "subprocess", "thiserror 1.0.69", - "uuid 1.13.1", + "uuid 1.13.2", "zstd", ] @@ -6345,7 +6367,7 @@ dependencies = [ "postgres-protocol 0.6.8", "serde", "serde_json", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -7201,7 +7223,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -7592,7 +7614,7 @@ dependencies = [ "serde", "thiserror 1.0.69", "url", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -7630,7 +7652,7 @@ dependencies = [ "schemars_derive", "serde", "serde_json", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -8365,7 +8387,7 @@ dependencies = [ "tokio-stream", "tracing", "url", - "uuid 1.13.1", + "uuid 1.13.2", "webpki-roots", ] @@ -8449,7 +8471,7 @@ dependencies = [ "stringprep", "thiserror 2.0.11", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "whoami", ] @@ -8490,7 +8512,7 @@ dependencies = [ "stringprep", "thiserror 2.0.11", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "whoami", ] @@ -8516,7 +8538,7 @@ dependencies = [ "sqlx-core", "tracing", "url", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -9163,7 +9185,7 @@ dependencies = [ "tempfile", "thiserror 1.0.69", "time", - "uuid 1.13.1", + "uuid 1.13.2", "winapi", ] @@ -9393,7 +9415,7 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-util", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -10100,9 +10122,9 @@ dependencies = [ [[package]] name = "tree-sitter-language" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eee4db33814de3d004de9d8d825627ed3320d0989cce0dea30efaf5be4736c" +checksum = "c4013970217383f67b18aef68f6fb2e8d409bc5755227092d32efb0422ba24b8" [[package]] name = "triomphe" @@ -10174,9 +10196,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "typify" @@ -10229,7 +10251,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab82fc73182c29b02e2926a6df32f2241dbadb5cfc111fd595515b3598f46bb3" dependencies = [ "rand 0.9.0", - "uuid 1.13.1", + "uuid 1.13.2", "web-time", ] @@ -10511,9 +10533,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +checksum = "8c1f41ffb7cf259f1ecc2876861a17e7142e63ead296f671f81f6ae85903e0d6" dependencies = [ "getrandom 0.3.1", "serde", @@ -10866,7 +10888,7 @@ dependencies = [ "tokio", "tracing", "url", - "uuid 1.13.1", + "uuid 1.13.2", "v8", "windmill-api", "windmill-api-client", @@ -10892,14 +10914,14 @@ dependencies = [ "async_zip", "axum", "base32", - "base64 0.13.1", + "base64 0.22.1", "byteorder", "bytes", "candle-core", "candle-nn", "candle-transformers", "chrono", - "chrono-tz", + "chrono-tz 0.10.1", "const_format", "cookie 0.17.0", "cron", @@ -10911,7 +10933,7 @@ dependencies = [ "hmac", "http 1.2.0", "hyper 1.6.0", - "itertools 0.10.5", + "itertools 0.14.0", "jsonwebtoken", "lazy_static", "magic-crypt", @@ -10953,7 +10975,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "tower 0.4.13", + "tower 0.5.2", "tower-cookies", "tower-http", "tracing", @@ -10961,7 +10983,7 @@ dependencies = [ "ulid", "url", "urlencoding", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-audit", "windmill-common", "windmill-git-sync", @@ -10976,7 +10998,7 @@ dependencies = [ name = "windmill-api-client" version = "1.463.5" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "chrono", "openapiv3", "prettyplease 0.1.25", @@ -10987,7 +11009,7 @@ dependencies = [ "serde", "serde_json", "syn 1.0.109", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -11012,7 +11034,7 @@ dependencies = [ "serde_json", "sqlx", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-common", "windmill-queue", ] @@ -11028,7 +11050,7 @@ dependencies = [ "axum", "bytes", "chrono", - "chrono-tz", + "chrono-tz 0.10.1", "const_format", "crc", "cron", @@ -11041,7 +11063,7 @@ dependencies = [ "hmac", "hyper 1.6.0", "indexmap 2.7.1", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "magic-crypt", "mail-send", @@ -11072,7 +11094,7 @@ dependencies = [ "tracing-loki", "tracing-opentelemetry", "tracing-subscriber", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-macros", ] @@ -11085,7 +11107,7 @@ dependencies = [ "serde_json", "sqlx", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-common", "windmill-queue", ] @@ -11109,7 +11131,7 @@ dependencies = [ "tokio", "tokio-tar", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-common", ] @@ -11117,7 +11139,7 @@ dependencies = [ name = "windmill-macros" version = "1.463.5" dependencies = [ - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "proc-macro2", "quote", @@ -11164,7 +11186,7 @@ version = "1.463.5" dependencies = [ "anyhow", "gosyn", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "regex", "windmill-parser", @@ -11187,7 +11209,7 @@ name = "windmill-parser-php" version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.14.0", "php-parser-rs", "serde_json", "windmill-parser", @@ -11198,7 +11220,7 @@ name = "windmill-parser-py" version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.14.0", "rustpython-parser", "serde_json", "windmill-parser", @@ -11210,7 +11232,7 @@ version = "1.463.5" dependencies = [ "anyhow", "async-recursion", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "malachite", "malachite-bigint", @@ -11230,7 +11252,7 @@ version = "1.463.5" dependencies = [ "anyhow", "convert_case 0.6.0", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "pulldown-cmark", "quote", @@ -11312,13 +11334,13 @@ dependencies = [ "axum", "backon", "chrono", - "chrono-tz", + "chrono-tz 0.10.1", "cron", "futures", "futures-core", "hex", "hmac", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "prometheus", "regex", @@ -11331,7 +11353,7 @@ dependencies = [ "tokio", "tracing", "ulid", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-audit", "windmill-common", ] @@ -11353,7 +11375,7 @@ dependencies = [ "anyhow", "async-recursion", "backon", - "base64 0.13.1", + "base64 0.22.1", "bit-vec", "bollard", "bytes", @@ -11376,7 +11398,7 @@ dependencies = [ "gcp_auth", "git-version", "hex", - "itertools 0.10.5", + "itertools 0.14.0", "jsonwebtoken", "lazy_static", "mappable-rc", @@ -11405,7 +11427,7 @@ dependencies = [ "tokio-util", "tracing", "urlencoding", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-audit", "windmill-common", "windmill-git-sync", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 2cb3e25aeb7e3..f3b95d4c78792 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -174,7 +174,7 @@ uuid = { version = "^1", features = ["serde", "v4"] } thiserror = "^2" anyhow = "^1" chrono = { version = "0.4.35", features = ["serde"] } -chrono-tz = "^0" +chrono-tz = "^0.10.1" tracing = "^0" tracing-subscriber = { version = "^0", features = ["env-filter", "json"] } tracing-appender = "^0" From 1069ad39992940e32e5d8566ef2283970525be1a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 13:17:10 +0100 Subject: [PATCH 35/41] fix: improve v2 migration finalizer to avoid deadlocks --- backend/src/main.rs | 13 ++++- backend/windmill-api/src/db.rs | 84 +++++++++++++++++++++++++++++---- backend/windmill-api/src/lib.rs | 8 ++-- 3 files changed, 91 insertions(+), 14 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 432095580d931..58d22b6eee5e0 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -21,7 +21,7 @@ use std::{ net::{IpAddr, Ipv4Addr, SocketAddr}, time::Duration, }; -use tokio::{fs::File, io::AsyncReadExt}; +use tokio::{fs::File, io::AsyncReadExt, task::JoinHandle}; use uuid::Uuid; use windmill_api::HTTP_CLIENT; @@ -372,6 +372,7 @@ async fn windmill_main() -> anyhow::Result<()> { let is_agent = mode == Mode::Agent; + let mut migration_handle: Option> = None; #[cfg(feature = "parquet")] let disable_s3_store = std::env::var("DISABLE_S3_STORE") .ok() @@ -384,7 +385,7 @@ async fn windmill_main() -> anyhow::Result<()> { if !skip_migration { // migration code to avoid break - windmill_api::migrate_db(&db).await?; + migration_handle = windmill_api::migrate_db(&db).await?; } else { tracing::info!("SKIP_MIGRATION set, skipping db migration...") } @@ -682,6 +683,14 @@ Windmill Community Edition {GIT_VERSION} loop { tokio::select! { biased; + Some(_) = async { if let Some(jh) = migration_handle.take() { + tracing::info!("migration job finished"); + Some(jh.await) + } else { + None + }} => { + continue; + }, _ = monitor_killpill_rx.recv() => { tracing::info!("received killpill for monitor job"); break; diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index b8d15160c7dab..9b694ad3bfcc9 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -15,6 +15,7 @@ use sqlx::{ Executor, PgConnection, Pool, Postgres, }; +use tokio::task::JoinHandle; use windmill_audit::audit_ee::{AuditAuthor, AuditAuthorable}; use windmill_common::{ db::{Authable, Authed}, @@ -170,7 +171,7 @@ impl Migrate for CustomMigrator { } } -pub async fn migrate(db: &DB) -> Result<(), Error> { +pub async fn migrate(db: &DB) -> Result>, Error> { let migrator = db.acquire().await?; let mut custom_migrator = CustomMigrator { inner: migrator }; @@ -225,9 +226,10 @@ pub async fn migrate(db: &DB) -> Result<(), Error> { } }); - if !has_done_migration(db, "v2_finalize_disable_sync_III").await { + let mut jh = None; + if !has_done_migration(db, "v2_finalize_job_completed").await { let db2 = db.clone(); - let _ = tokio::task::spawn(async move { + let v2jh = tokio::task::spawn(async move { loop { if !*MIN_VERSION_IS_AT_LEAST_1_461.read().await { tracing::info!("Waiting for all workers to be at least version 1.461 before applying v2 finalize migration, sleeping for 5s..."); @@ -245,9 +247,10 @@ pub async fn migrate(db: &DB) -> Result<(), Error> { break; } }); + jh = Some(v2jh) } - Ok(()) + Ok(jh) } async fn fix_flow_versioning_migration( @@ -373,29 +376,91 @@ async fn v2_finalize(db: &DB) -> Result<(), Error> { run_windmill_migration!("v2_finalize_disable_sync_III", db, |tx| { tx.execute( r#" + LOCK TABLE v2_job_queue IN ACCESS EXCLUSIVE MODE; ALTER TABLE v2_job_queue DISABLE ROW LEVEL SECURITY; + "#, + ) + .await?; + }); + + run_windmill_migration!("v2_finalize_disable_sync_III_2", db, |tx| { + tx.execute( + r#" + LOCK TABLE v2_job_completed IN ACCESS EXCLUSIVE MODE; ALTER TABLE v2_job_completed DISABLE ROW LEVEL SECURITY; + "#, + ) + .await?; + }); + run_windmill_migration!("v2_finalize_disable_sync_III_3", db, |tx| { + tx.execute( + r#" + LOCK TABLE v2_job IN ACCESS EXCLUSIVE MODE; DROP FUNCTION IF EXISTS v2_job_after_update CASCADE; + "#, + ) + .await?; + }); + + run_windmill_migration!("v2_finalize_disable_sync_III_4", db, |tx| { + tx.execute( + r#" + LOCK TABLE v2_job_completed IN ACCESS EXCLUSIVE MODE; DROP FUNCTION IF EXISTS v2_job_completed_before_insert CASCADE; - DROP FUNCTION IF EXISTS v2_job_completed_before_update CASCADE; + DROP FUNCTION IF EXISTS v2_job_completed_before_update CASCADE; + "#, + ) + .await?; + }); + + run_windmill_migration!("v2_finalize_disable_sync_III_5", db, |tx| { + tx.execute( + r#" + LOCK TABLE v2_job_queue IN ACCESS EXCLUSIVE MODE; DROP FUNCTION IF EXISTS v2_job_queue_after_insert CASCADE; DROP FUNCTION IF EXISTS v2_job_queue_before_insert CASCADE; - DROP FUNCTION IF EXISTS v2_job_queue_before_update CASCADE; + DROP FUNCTION IF EXISTS v2_job_queue_before_update CASCADE; + "#, + ) + .await?; + }); + + run_windmill_migration!("v2_finalize_disable_sync_III_6", db, |tx| { + tx.execute( + r#" + LOCK TABLE v2_job_runtime IN ACCESS EXCLUSIVE MODE; DROP FUNCTION IF EXISTS v2_job_runtime_before_insert CASCADE; - DROP FUNCTION IF EXISTS v2_job_runtime_before_update CASCADE; + DROP FUNCTION IF EXISTS v2_job_runtime_before_update CASCADE; + "#, + ) + .await?; + }); + + run_windmill_migration!("v2_finalize_disable_sync_III_7", db, |tx| { + tx.execute( + r#" + LOCK TABLE v2_job_status IN ACCESS EXCLUSIVE MODE; DROP FUNCTION IF EXISTS v2_job_status_before_insert CASCADE; - DROP FUNCTION IF EXISTS v2_job_status_before_update CASCADE; + DROP FUNCTION IF EXISTS v2_job_status_before_update CASCADE; + "#, + ) + .await?; + }); + run_windmill_migration!("v2_finalize_disable_sync_III_8", db, |tx| { + tx.execute( + r#" DROP VIEW IF EXISTS completed_job, completed_job_view, job, queue, queue_view CASCADE; - "#, ) .await?; }); + run_windmill_migration!("v2_finalize_job_queue", db, |tx| { tx.execute( r#" + LOCK TABLE v2_job_queue IN ACCESS EXCLUSIVE MODE; ALTER TABLE v2_job_queue DROP COLUMN IF EXISTS __parent_job CASCADE, DROP COLUMN IF EXISTS __created_by CASCADE, @@ -434,6 +499,7 @@ async fn v2_finalize(db: &DB) -> Result<(), Error> { run_windmill_migration!("v2_finalize_job_completed", db, |tx| { tx.execute( r#" + LOCK TABLE v2_job_completed IN ACCESS EXCLUSIVE MODE; ALTER TABLE v2_job_completed DROP COLUMN IF EXISTS __parent_job CASCADE, DROP COLUMN IF EXISTS __created_by CASCADE, diff --git a/backend/windmill-api/src/lib.rs b/backend/windmill-api/src/lib.rs index b4c262b9eb87c..4199494ed4f32 100644 --- a/backend/windmill-api/src/lib.rs +++ b/backend/windmill-api/src/lib.rs @@ -34,6 +34,7 @@ use http::HeaderValue; use reqwest::Client; #[cfg(feature = "oauth2")] use std::collections::HashMap; +use tokio::task::JoinHandle; use windmill_common::global_settings::load_value_from_global_settings; use windmill_common::global_settings::EMAIL_DOMAIN_SETTING; use windmill_common::worker::HUB_CACHE_DIR; @@ -641,7 +642,8 @@ async fn openapi_json() -> &'static str { include_str!("../openapi-deref.json") } -pub async fn migrate_db(db: &DB) -> anyhow::Result<()> { - db::migrate(db).await?; - Ok(()) +pub async fn migrate_db(db: &DB) -> anyhow::Result>> { + db::migrate(db) + .await + .map_err(|e| anyhow::anyhow!("Error migrating db: {e:#}")) } From 52e12d1021831adc2ce9b7b0946a93562038017e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 14:35:23 +0100 Subject: [PATCH 36/41] fix: fix reactivity issue on loading live flow on runs page --- frontend/src/lib/utils.ts | 8 ++++++ .../(root)/(logged)/run/[...run]/+page.svelte | 28 +++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index 71eecc14a342a..d32b18d594895 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -1099,6 +1099,14 @@ export function isFlowPreview(job_kind: Job['job_kind'] | undefined) { return !!job_kind && (job_kind === 'flowpreview' || job_kind === 'flownode') } +export function isNotFlow(job_kind: Job['job_kind'] | undefined) { + return ( + job_kind !== 'flow' && + job_kind !== 'singlescriptflow' && + !isFlowPreview(job_kind) + ) +} + export function isScriptPreview(job_kind: Job['job_kind'] | undefined) { return ( !!job_kind && (job_kind === 'preview' || job_kind === 'flowscript' || job_kind === 'appscript') diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 1b817d15d6a56..d7a8fdb365878 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -20,6 +20,7 @@ emptyString, encodeState, isFlowPreview, + isNotFlow, isScriptPreview, truncateHash, truncateRev @@ -119,7 +120,7 @@ let showExplicitProgressTip: boolean = (localStorage.getItem('hideExplicitProgressTip') ?? 'false') == 'false' - $: job?.logs == undefined && job && viewTab == 'logs' && getLogs?.() + $: job?.logs == undefined && job && viewTab == 'logs' && isNotFlow(job?.job_kind) && getLogs?.() let lastJobId: string | undefined = undefined let concurrencyKey: string | undefined = undefined @@ -222,15 +223,19 @@ }) } - if (job === undefined || job.job_kind !== 'script' || job.script_hash === undefined) { - return - } - const script = await ScriptService.getScriptByHash({ - workspace: $workspaceStore!, - hash: job.script_hash - }) - if (script.restart_unless_cancelled ?? false) { - persistentScriptDefinition = script + if ( + job && + job.job_kind === 'script' && + job.script_hash && + persistentScriptDefinition === undefined + ) { + const script = await ScriptService.getScriptByHash({ + workspace: $workspaceStore!, + hash: job.script_hash + }) + if (script.restart_unless_cancelled ?? false) { + persistentScriptDefinition = script + } } } @@ -241,6 +246,7 @@ function onRunsPageChange() { job = undefined + persistentScriptDefinition = undefined } $: $workspaceStore && $page.params.run && onRunsPageChange() $: $workspaceStore && $page.params.run && testJobLoader && onRunsPageChangeWithLoader() @@ -846,7 +852,7 @@

Scheduled to be executed later: {displayDate(job?.['scheduled_for'])}

{/if} - {#if job?.job_kind !== 'flow' && job?.job_kind !== 'singlescriptflow' && !isFlowPreview(job?.job_kind)} + {#if isNotFlow(job?.job_kind)} {#if ['python3', 'bun', 'deno'].includes(job?.language ?? '') && (job?.job_kind == 'script' || isScriptPreview(job?.job_kind))} {/if} From 07237a0eb1465f47284952bee0e84929bfa18528 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 14:43:46 +0100 Subject: [PATCH 37/41] chore(main): release 1.463.6 (#5320) * chore(main): release 1.463.6 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 8 +++ backend/Cargo.lock | 54 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 52 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 458b3a19ff456..d87d723777e5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.463.6](https://github.com/windmill-labs/windmill/compare/v1.463.5...v1.463.6) (2025-02-18) + + +### Bug Fixes + +* fix reactivity issue on loading live flow on runs page ([52e12d1](https://github.com/windmill-labs/windmill/commit/52e12d1021831adc2ce9b7b0946a93562038017e)) +* improve v2 migration finalizer to avoid deadlocks ([1069ad3](https://github.com/windmill-labs/windmill/commit/1069ad39992940e32e5d8566ef2283970525be1a)) + ## [1.463.5](https://github.com/windmill-labs/windmill/compare/v1.463.4...v1.463.5) (2025-02-18) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index d0053f30febbb..fa585a18a1530 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1007,9 +1007,9 @@ dependencies = [ [[package]] name = "backon" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" +checksum = "49fef586913a57ff189f25c9b3d034356a5bf6b3fa9a7f067588fe1698ba1f5d" dependencies = [ "fastrand 2.3.0", "gloo-timers", @@ -10859,7 +10859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "axum", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "argon2", @@ -10996,7 +10996,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.5" +version = "1.463.6" dependencies = [ "base64 0.22.1", "chrono", @@ -11014,7 +11014,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.5" +version = "1.463.6" dependencies = [ "chrono", "serde", @@ -11027,7 +11027,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "serde", @@ -11041,7 +11041,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-stream", @@ -11100,7 +11100,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.5" +version = "1.463.6" dependencies = [ "regex", "serde", @@ -11114,7 +11114,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "bytes", @@ -11137,7 +11137,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.5" +version = "1.463.6" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11149,7 +11149,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.5" +version = "1.463.6" dependencies = [ "convert_case 0.6.0", "serde", @@ -11158,7 +11158,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11170,7 +11170,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "serde_json", @@ -11182,7 +11182,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "gosyn", @@ -11194,7 +11194,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11206,7 +11206,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11217,7 +11217,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11228,7 +11228,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-recursion", @@ -11248,7 +11248,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11265,7 +11265,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11277,7 +11277,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11295,7 +11295,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11317,7 +11317,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "serde_json", @@ -11327,7 +11327,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-recursion", @@ -11360,7 +11360,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.5" +version = "1.463.6" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11370,7 +11370,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index f3b95d4c78792..d4a4337aff3fc 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.5" +version = "1.463.6" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.5" +version = "1.463.6" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index c41a002fc81ba..da8f9ffda542f 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.5 + version: 1.463.6 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 311c804d6c565..7e143464cbced 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.463.5"; +export const VERSION = "v1.463.6"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 34d713357709c..f5959f40edfda 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.5"; +export const VERSION = "1.463.6"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 22ed0a5141cda..54f84d32a8784 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.5", + "version": "1.463.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.5", + "version": "1.463.6", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 84c3029eaf374..d99d4ad864016 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.5", + "version": "1.463.6", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index bb8f223315ff1..9a995b30c039a 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.5" -wmill_pg = ">=1.463.5" +wmill = ">=1.463.6" +wmill_pg = ">=1.463.6" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index ebad73b1a5c64..28babee7c4499 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.5 + version: 1.463.6 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 1f5f2a972f42d..6680bc5b846e9 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.5' + ModuleVersion = '1.463.6' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index e41d4d318d32e..a19e6e3280371 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.5" +version = "1.463.6" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index ba4af4d219d61..78a5a89f9d359 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.5" +version = "1.463.6" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index c5958e2f682ca..15c80ae5339d9 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.5", + "version": "1.463.6", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 6c750f83171dd..23a2b2a3c0238 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.5", + "version": "1.463.6", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 5d003b1aa7a45..225d2d44c31e5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.5 +1.463.6 From 138cedf1da91290f97c19513daf0c1981488a94a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 15:13:28 +0100 Subject: [PATCH 38/41] fix(bash): improve bash last line as result reliability using bash process substitution (#5321) --- backend/windmill-worker/src/bash_executor.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/backend/windmill-worker/src/bash_executor.rs b/backend/windmill-worker/src/bash_executor.rs index 7b536afdae6eb..ea3274f623710 100644 --- a/backend/windmill-worker/src/bash_executor.rs +++ b/backend/windmill-worker/src/bash_executor.rs @@ -97,7 +97,7 @@ cleanup() {{ trap '' SIGTERM SIGINT # Kill the process group of the script (negative PID value) - pkill -P $$ + pkill -P $$ 2>/dev/null || true exit }} @@ -105,14 +105,9 @@ cleanup() {{ # Trap SIGTERM (or other signals) and call cleanup function trap cleanup SIGTERM SIGINT -# Create a named pipe -mkfifo bp - -# Start background processes -cat bp | tail -1 >> ./result2.out & # Run main.sh in the same process group -{bash} ./main.sh "$@" 2>&1 | tee bp & +{bash} ./main.sh "$@" 2>&1 | tee >(tail -1 >> ./result2.out) & pid=$! @@ -121,7 +116,6 @@ wait $pid exit_status=$? # Clean up the named pipe and background processes -rm -f bp pkill -P $$ || true # Exit with the captured status @@ -624,7 +618,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"", write_file( job_dir, "wrapper.sh", - &format!("set -o pipefail\nset -e\nmkfifo bp\ncat bp | tail -1 > ./result2.out &\n{} -F ./main.ps1 \"$@\" 2>&1 | tee bp\nwait $!", POWERSHELL_PATH.as_str()), + &format!("set -o pipefail\nset -e\n{} -F ./main.ps1 \"$@\" 2>&1 | tee >(tail -1 >> ./result2.out) &\nwait $!", POWERSHELL_PATH.as_str()), )?; #[cfg(windows)] From d4f61f13fd6a9c2e5707738fba960b7fd926230c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 16:46:42 +0100 Subject: [PATCH 39/41] fix(bash): allow process substitution on nsjail --- .../windmill-worker/nsjail/run.bash.config.proto | 14 ++++++++++++++ .../nsjail/run.powershell.config.proto | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/backend/windmill-worker/nsjail/run.bash.config.proto b/backend/windmill-worker/nsjail/run.bash.config.proto index 4f86c66a329ad..63018f7655e87 100644 --- a/backend/windmill-worker/nsjail/run.bash.config.proto +++ b/backend/windmill-worker/nsjail/run.bash.config.proto @@ -21,10 +21,24 @@ mount { is_bind: true } +mount { + src: "/proc/self/fd" + dst: "/dev/fd" + is_symlink: true + mandatory: false +} + +mount { + src: "/bin" + dst: "/bin" + is_bind: true +} + mount { src: "/opt/microsoft" dst: "/opt/microsoft" is_bind: true + mandatory: false } mount { diff --git a/backend/windmill-worker/nsjail/run.powershell.config.proto b/backend/windmill-worker/nsjail/run.powershell.config.proto index 27a36548b4275..93a48d4fec583 100644 --- a/backend/windmill-worker/nsjail/run.powershell.config.proto +++ b/backend/windmill-worker/nsjail/run.powershell.config.proto @@ -21,6 +21,13 @@ mount { is_bind: true } +mount { + src: "/proc/self/fd" + dst: "/dev/fd" + is_symlink: true + mandatory: false +} + mount { src: "/opt/microsoft" dst: "/opt/microsoft" From 52ad48a910002c07ac38635445c14e302c26de83 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 20:08:25 +0100 Subject: [PATCH 40/41] back to pipe in bash for efficiency purposes --- backend/windmill-worker/src/bash_executor.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/backend/windmill-worker/src/bash_executor.rs b/backend/windmill-worker/src/bash_executor.rs index ea3274f623710..da043052b7846 100644 --- a/backend/windmill-worker/src/bash_executor.rs +++ b/backend/windmill-worker/src/bash_executor.rs @@ -96,6 +96,8 @@ cleanup() {{ # Ignore SIGTERM and SIGINT trap '' SIGTERM SIGINT + rm -f bp 2>/dev/null + # Kill the process group of the script (negative PID value) pkill -P $$ 2>/dev/null || true exit @@ -105,17 +107,26 @@ cleanup() {{ # Trap SIGTERM (or other signals) and call cleanup function trap cleanup SIGTERM SIGINT +# Create a named pipe +mkfifo bp -# Run main.sh in the same process group -{bash} ./main.sh "$@" 2>&1 | tee >(tail -1 >> ./result2.out) & +# Start background processes +cat bp | tail -1 >> ./result2.out & +tail_pid=$! +# Run main.sh in the same process group +{bash} ./main.sh "$@" 2>&1 | tee bp & pid=$! # Wait for main.sh to finish and capture its exit status wait $pid exit_status=$? +# Ensure tail has finished before cleanup +wait $tail_pid 2>/dev/null || true + # Clean up the named pipe and background processes +rm -f bp pkill -P $$ || true # Exit with the captured status @@ -618,7 +629,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"", write_file( job_dir, "wrapper.sh", - &format!("set -o pipefail\nset -e\n{} -F ./main.ps1 \"$@\" 2>&1 | tee >(tail -1 >> ./result2.out) &\nwait $!", POWERSHELL_PATH.as_str()), + &format!("set -o pipefail\nset -e\nmkfifo bp\ncat bp | tail -1 > ./result2.out &\n{} -F ./main.ps1 \"$@\" 2>&1 | tee bp\nwait $!", POWERSHELL_PATH.as_str()), )?; #[cfg(windows)] From 0d0ada6d8d5a90437710628df472f9f0633df756 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 21:03:11 +0100 Subject: [PATCH 41/41] feat: add ready endpoints for workers to enterprise --- backend/src/main.rs | 19 +++++++---- backend/windmill-common/src/lib.rs | 34 +++++++++++++------ backend/windmill-worker/src/worker_flow.rs | 1 + .../src/lib/components/InstanceSetting.svelte | 26 ++++++++++++++ .../lib/components/InstanceSettings.svelte | 28 --------------- 5 files changed, 63 insertions(+), 45 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 58d22b6eee5e0..56eae30332ee1 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -901,14 +901,21 @@ Windmill Community Edition {GIT_VERSION} }; let metrics_f = async { - if METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed) { - #[cfg(not(feature = "enterprise"))] + let enabled = METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed); + #[cfg(not(feature = "enterprise"))] + if enabled { tracing::error!("Metrics are only available in the EE, ignoring..."); - - #[cfg(feature = "enterprise")] - windmill_common::serve_metrics(*METRICS_ADDR, _killpill_phase2_rx, num_workers > 0) - .await; } + + #[cfg(all(feature = "enterprise", feature = "prometheus"))] + windmill_common::serve_metrics( + *METRICS_ADDR, + _killpill_phase2_rx, + num_workers > 0, + enabled, + ) + .await; + Ok(()) as anyhow::Result<()> }; diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 802af6196b4a4..1bbc89072856b 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -155,8 +155,6 @@ pub async fn shutdown_signal( } use tokio::sync::RwLock; -#[cfg(feature = "prometheus")] -use tokio::task::JoinHandle; use utils::rd_string; #[cfg(feature = "prometheus")] @@ -164,23 +162,31 @@ pub async fn serve_metrics( addr: SocketAddr, mut rx: tokio::sync::broadcast::Receiver<()>, ready_worker_endpoint: bool, -) -> JoinHandle<()> { - use std::sync::atomic::Ordering; - + metrics_endpoint: bool, +) -> anyhow::Result<()> { + if !metrics_endpoint && !ready_worker_endpoint { + return Ok(()); + } use axum::{ routing::{get, post}, Router, }; use hyper::StatusCode; - let router = Router::new() - .route("/metrics", get(metrics)) - .route("/reset", post(reset)); + let router = Router::new(); + + let router = if metrics_endpoint { + router + .route("/metrics", get(metrics)) + .route("/reset", post(reset)) + } else { + router + }; let router = if ready_worker_endpoint { router.route( "/ready", get(|| async { - if IS_READY.load(Ordering::Relaxed) { + if IS_READY.load(std::sync::atomic::Ordering::Relaxed) { (StatusCode::OK, "ready") } else { (StatusCode::INTERNAL_SERVER_ERROR, "not ready") @@ -193,8 +199,12 @@ pub async fn serve_metrics( tokio::spawn(async move { tracing::info!("Serving metrics at: {addr}"); - let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); - if let Err(e) = axum::serve(listener, router.into_make_service()) + let listener = tokio::net::TcpListener::bind(addr).await; + if let Err(e) = listener { + tracing::error!("Error binding to metrics address: {}", e); + return; + } + if let Err(e) = axum::serve(listener.unwrap(), router.into_make_service()) .with_graceful_shutdown(async move { rx.recv().await.ok(); tracing::info!("Graceful shutdown of metrics"); @@ -204,6 +214,8 @@ pub async fn serve_metrics( tracing::error!("Error serving metrics: {}", e); } }) + .await?; + Ok(()) } #[cfg(feature = "prometheus")] diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 864f3002b1743..50f6ee8607f57 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -615,6 +615,7 @@ pub async fn update_flow_status_after_job_completion_internal( "error while deleting parallel_monitor_lock: {e:#}" )) })?; + if r.is_some() { tracing::info!( "parallel flow has removed lock on its parent, last ping was {:?}", diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index 599ca28229517..03ac00aa02ce8 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -61,6 +61,8 @@ let renewing = false let opening = false + let to: string = '' + async function reloadKeyrenewalAttemptInfo() { latestKeyRenewalAttempt = await SettingService.getLatestKeyRenewalAttempt() } @@ -747,6 +749,30 @@ {:else if setting.fieldType == 'smtp_connect'}
{#if $values[setting.key]} +
+
- {#if category == 'SMTP'} - {@const smtp = $values['smtp_settings']} -
-
- {/if} {/each}