From 52e12d1021831adc2ce9b7b0946a93562038017e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 14:35:23 +0100 Subject: [PATCH 1/7] 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 71eecc14a3..d32b18d594 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 1b817d15d6..d7a8fdb365 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 2/7] 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 458b3a19ff..d87d723777 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 d0053f30fe..fa585a18a1 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 f3b95d4c78..d4a4337aff 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 c41a002fc8..da8f9ffda5 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 311c804d6c..7e143464cb 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 34d7133577..f5959f40ed 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 22ed0a5141..54f84d32a8 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 84c3029eaf..d99d4ad864 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 bb8f223315..9a995b30c0 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 ebad73b1a5..28babee7c4 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 1f5f2a972f..6680bc5b84 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 e41d4d318d..a19e6e3280 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 ba4af4d219..78a5a89f9d 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 c5958e2f68..15c80ae533 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 6c750f8317..23a2b2a3c0 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 5d003b1aa7..225d2d44c3 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 3/7] 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 7b536afdae..ea3274f623 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 4/7] 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 4f86c66a32..63018f7655 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 27a36548b4..93a48d4fec 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 673e02315f50f218d140d0db2deeb5d6e99b4041 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Tue, 18 Feb 2025 18:17:22 +0000 Subject: [PATCH 5/7] remove unused Portal --- .../lib/components/meltComponents/Menu.svelte | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/frontend/src/lib/components/meltComponents/Menu.svelte b/frontend/src/lib/components/meltComponents/Menu.svelte index cb609ecce5..80300fe57d 100644 --- a/frontend/src/lib/components/meltComponents/Menu.svelte +++ b/frontend/src/lib/components/meltComponents/Menu.svelte @@ -1,8 +1,8 @@ @@ -248,14 +258,14 @@
(moreOpen = true)} - on:mouseleave={() => (moreOpen = false)} + on:mouseenter={() => debouncedSetMoreOpen(true)} + on:mouseleave={() => debouncedSetMoreOpen(false)} role="none" >
(moreOpen = true)} - on:m-focusout={() => (moreOpen = false)} + on:m-focusin={() => debouncedSetMoreOpen(true)} + on:m-focusout={() => debouncedSetMoreOpen(false)} > {#if !moreOpen || secondMenuLinks.length === 0}
More...
@@ -271,8 +281,8 @@ 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-primary' )} use:melt={item} - on:m-focusin={() => (moreOpen = true)} - on:m-focusout={() => (moreOpen = false)} + on:m-focusin={() => debouncedSetMoreOpen(true)} + on:m-focusout={() => debouncedSetMoreOpen(false)} > {menuLink.label} @@ -283,8 +293,8 @@
{#if $enterpriseLicense}
(moreOpen = true)} - on:mouseleave={() => (moreOpen = false)} + on:mouseenter={() => debouncedSetMoreOpen(true)} + on:mouseleave={() => debouncedSetMoreOpen(false)} role="none" > From 8ed283f8124d5e4a49f2bdcb3cb8e07239123773 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Tue, 18 Feb 2025 19:23:23 +0000 Subject: [PATCH 7/7] fix component jumping due to z-index --- frontend/src/lib/components/meltComponents/Menu.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/meltComponents/Menu.svelte b/frontend/src/lib/components/meltComponents/Menu.svelte index 80300fe57d..b26030c9bd 100644 --- a/frontend/src/lib/components/meltComponents/Menu.svelte +++ b/frontend/src/lib/components/meltComponents/Menu.svelte @@ -42,6 +42,8 @@ async function getMenuElements(): Promise { return Array.from(document.querySelectorAll('[data-menu]')) as HTMLElement[] } + + const zIndex = zIndexes.contextMenu
@@ -66,7 +68,7 @@ -
+