diff --git a/CHANGELOG.md b/CHANGELOG.md index bfe137eaed..e6fcdac9a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.379.4](https://github.com/windmill-labs/windmill/compare/v1.379.3...v1.379.4) (2024-08-14) + + +### Bug Fixes + +* add missing change for better key renewal ([#4237](https://github.com/windmill-labs/windmill/issues/4237)) ([f88efc2](https://github.com/windmill-labs/windmill/commit/f88efc2380bf5b055b2633b24cb94fc46e6cdca5)) +* fix transformer issue after proxy change for apps ([ad69876](https://github.com/windmill-labs/windmill/commit/ad698768e8fdbcc4a90f138f74ceee20d2d68a9b)) +* handle time with tz col type in pg ([#4239](https://github.com/windmill-labs/windmill/issues/4239)) ([c09f078](https://github.com/windmill-labs/windmill/commit/c09f078928fb9f4b52df641580505d98bb728aa0)) +* use job timeout for snowflake timeout ([#4240](https://github.com/windmill-labs/windmill/issues/4240)) ([3bd461f](https://github.com/windmill-labs/windmill/commit/3bd461ffa1fcbe19c9007b1b15970be21cff08ef)) + ## [1.379.3](https://github.com/windmill-labs/windmill/compare/v1.379.2...v1.379.3) (2024-08-13) diff --git a/Dockerfile b/Dockerfile index 1044244797..7fd89ba6fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,7 +59,9 @@ ARG features="" COPY --from=planner /windmill/recipe.json recipe.json -RUN apt-get update && apt-get install -y libxml2-dev libxmlsec1-dev clang libclang-dev cmake +RUN apt-get update && apt-get install -y libxml2-dev=2.9.* libxmlsec1-dev=1.2.* clang=1:14.0-55.* libclang-dev=1:14.0-55.* cmake=3.25.* && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ @@ -92,14 +94,17 @@ ARG WITH_HELM=true RUN apt-get update \ && apt-get install -y ca-certificates wget curl git jq unzip build-essential unixodbc xmlsec1 software-properties-common \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN if [ "$WITH_POWERSHELL" = "true" ]; then \ - if [ "$TARGETPLATFORM" = "linux/amd64" ]; then apt-get update -y && apt install libicu-dev -y && wget -O 'pwsh.deb' "https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell_${POWERSHELL_DEB_VERSION}.deb_amd64.deb" && \ + if [ "$TARGETPLATFORM" = "linux/amd64" ]; then apt-get update -y && apt install libicu-dev -y && wget -O 'pwsh.deb' "https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell_${POWERSHELL_DEB_VERSION}.deb_amd64.deb" && apt-get clean \ + && rm -rf /var/lib/apt/lists/* && \ dpkg --install 'pwsh.deb' && \ rm 'pwsh.deb'; \ - elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then apt-get update -y && apt install libicu-dev -y && wget -O powershell.tar.gz "https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-arm64.tar.gz" && \ + elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then apt-get update -y && apt install libicu-dev -y && wget -O powershell.tar.gz "https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-arm64.tar.gz" && apt-get clean \ + && rm -rf /var/lib/apt/lists/* && \ mkdir -p /opt/microsoft/powershell/7 && \ tar zxf powershell.tar.gz -C /opt/microsoft/powershell/7 && \ chmod +x /opt/microsoft/powershell/7/pwsh && \ @@ -143,7 +148,8 @@ ENV PATH="${PATH}:/usr/local/go/bin" ENV GO_PATH=/usr/local/go/bin/go RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - -RUN apt-get -y update && apt-get install -y curl nodejs awscli +RUN apt-get -y update && apt-get install -y curl nodejs awscli && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # go build is slower the first time it is ran, so we prewarm it in the build RUN mkdir -p /tmp/gobuildwarm && cd /tmp/gobuildwarm && go mod init gobuildwarm && printf "package foo\nimport (\"fmt\")\nfunc main() { fmt.Println(42) }" > warm.go && go mod tidy && go build -x && rm -rf /tmp/gobuildwarm diff --git a/backend/Cargo.lock b/backend/Cargo.lock index c50d92967d..61e1aff51c 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1613,12 +1613,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "5fb8dd288a69fc53a1996d7ecfbf4a20d59065bff137ce7e56bbd620de191189" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -10408,7 +10409,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "axum", @@ -10448,7 +10449,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "argon2", @@ -10532,7 +10533,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.379.3" +version = "1.379.4" dependencies = [ "base64 0.21.7", "chrono", @@ -10550,7 +10551,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.379.3" +version = "1.379.4" dependencies = [ "chrono", "serde", @@ -10563,7 +10564,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "async-stream", @@ -10604,7 +10605,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.379.3" +version = "1.379.4" dependencies = [ "regex", "rsmq_async", @@ -10619,7 +10620,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "bytes", @@ -10640,7 +10641,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.379.3" +version = "1.379.4" dependencies = [ "serde", "serde_json", @@ -10648,7 +10649,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "lazy_static", @@ -10659,7 +10660,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "gosyn", @@ -10671,7 +10672,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "lazy_static", @@ -10682,7 +10683,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -10696,7 +10697,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "itertools 0.13.0", @@ -10707,7 +10708,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "async-recursion", @@ -10724,7 +10725,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "lazy_static", @@ -10735,7 +10736,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -10754,7 +10755,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -10773,7 +10774,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "async-recursion", @@ -10806,7 +10807,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.379.3" +version = "1.379.4" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -10816,7 +10817,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.379.3" +version = "1.379.4" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 4cb4a7c5a2..a7563cfa99 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.379.3" +version = "1.379.4" authors.workspace = true edition.workspace = true @@ -25,7 +25,7 @@ members = [ ] [workspace.package] -version = "1.379.3" +version = "1.379.4" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 81feee52f2..e845d94a2b 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.379.3 + version: 1.379.4 title: Windmill API contact: diff --git a/backend/windmill-common/src/flows.rs b/backend/windmill-common/src/flows.rs index ea27fa7422..dbc44afdd9 100644 --- a/backend/windmill-common/src/flows.rs +++ b/backend/windmill-common/src/flows.rs @@ -213,6 +213,12 @@ pub struct Suspend { pub self_approval_disabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub hide_cancel: Option, + #[serde(skip_serializing_if = "false_or_empty")] + pub continue_on_disapprove_timeout: Option, +} + +fn false_or_empty(v: &Option) -> bool { + v.is_none() || v.as_ref().is_some_and(|x| !x) } #[derive(Deserialize, Serialize, Debug, Clone)] diff --git a/backend/windmill-worker/src/snowflake_executor.rs b/backend/windmill-worker/src/snowflake_executor.rs index ad0c77c0fb..aac2210356 100644 --- a/backend/windmill-worker/src/snowflake_executor.rs +++ b/backend/windmill-worker/src/snowflake_executor.rs @@ -17,7 +17,7 @@ use windmill_queue::{CanceledBy, HTTP_CLIENT}; use serde::{Deserialize, Serialize}; -use crate::common::run_future_with_polling_update_job_poller; +use crate::common::{resolve_job_timeout, run_future_with_polling_update_job_poller}; use crate::{common::build_args_values, AuthedClientBackgroundTask}; #[derive(Serialize)] @@ -304,7 +304,11 @@ pub async fn do_snowflake( json!(database.database.unwrap().to_uppercase()), ); } - body.insert("timeout".to_string(), json!(10)); // in seconds + let timeout = resolve_job_timeout(&db, &job.workspace_id, job.id, job.timeout) + .await + .0 + .as_secs(); + body.insert("timeout".to_string(), json!(timeout)); let queries = parse_sql_blocks(query); diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index b81f7324bb..771595ab77 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -760,6 +760,7 @@ pub async fn update_flow_status_after_job_completion_internal< // tracing::error!( // "UPDATE FLOW STATUS 3: {module:#?} {unrecoverable} {} {is_last_step} {success} {skip_error_handler}", flow_job.canceled // ); + let should_continue_flow = match success { _ if stop_early => false, _ if flow_job.canceled => false, @@ -1749,6 +1750,8 @@ async fn push_next_flow_job tx.commit().await?; /* not enough messages to do this job, "park"/suspend until there are */ + } else if suspend.continue_on_disapprove_timeout.unwrap_or(false) { + todo!() } else if matches!( &status_module, FlowStatusModule::WaitingForPriorSteps { .. } diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index a3a5734b01..a08f04fc5f 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.379.3"; +export const VERSION = "v1.379.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 6d241cfb5b..32aa91ebdf 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -34,7 +34,7 @@ addEventListener("error", (event) => { } }); -export const VERSION = "v1.379.3"; +export const VERSION = "v1.379.4"; let command: any = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 4e61d29524..5145759350 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.379.3", + "version": "1.379.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.379.3", + "version": "1.379.4", "license": "AGPL-3.0", "dependencies": { "@aws-crypto/sha256-js": "^4.0.0", diff --git a/frontend/package.json b/frontend/package.json index 557277ec49..3ab9210938 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.379.3", + "version": "1.379.4", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index 0105fa06b9..884d869dc6 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -70,6 +70,7 @@ | 'plain' | 'markdown' | 'map' + | 'nondisplayable' | undefined $: resultKind = inferResultKind(result) @@ -121,9 +122,13 @@ let is_render_all = false let download_as_csv = false function inferResultKind(result: any) { - if (result == 'WINDMILL_TOO_BIG') { - largeObject = true - return 'json' + try { + if (result == 'WINDMILL_TOO_BIG') { + largeObject = true + return 'json' + } + } catch (err) { + return 'nondisplayable' } if (result !== undefined) { @@ -245,7 +250,12 @@ let s3FileViewer: S3FilePicker function toJsonStr(result: any) { - return JSON.stringify(result ?? null, null, 4) ?? 'null' + try { + // console.log(result) + return JSON.stringify(result ?? null, null, 4) ?? 'null' + } catch (e) { + return 'error stringifying object: ' + e.toString() + } } function contentOrRootString(obj: string | { filename: string; content: string }) { @@ -379,7 +389,8 @@ /> {/each} -{:else}
Non displayable object
{:else}
runs.filter((r) => r !== id)) } } + + function getError(obj: any) { + try { + if (obj?.error) { + return obj.error + } + return undefined + } catch (e) { + console.error('Error accessing error from result', e) + return undefined + } + } {#each Object.entries(fields ?? {}) as [key, v] (key)} @@ -753,7 +765,7 @@ Please select a runnable - {:else if result?.error && $mode === 'preview' && !errorHandledByComponent} + {:else if getError(result) && $mode === 'preview' && !errorHandledByComponent}
0 - ? `let ${contextKeys.map((key) => ` ${key} = createProxy('${key}', context['${key}'] ?? {})`)};` + ? `let ${contextKeys.map((key) => ` ${key} = createProxy('${key}', context['${key}'])`)};` : `` } ${ @@ -123,33 +123,38 @@ export async function eval_like( groupContextId: string | undefined ) { const createProxy = (name: string, obj: any) => { - if (name == 'group' && groupContextId) { - return createGroupProxy(groupContextId, obj) - } - return new Proxy(obj, { - set(target, key, value) { - if (name != 'state') { - throw new Error( - 'Cannot set value on objects that are neither the global state or a container group field' - ) - } - if (typeof key !== 'string') { - throw new Error('Invalid key') - } - target[key] = value - let o = worldStore?.newOutput(name, key, value) - o?.set(value, true) - - return true - }, - get(obj, prop) { - if (name != 'state' && prop == 'group') { - return createGroupProxy(name, obj[prop]) - } else { - return obj[prop] - } + // console.log('Creating proxy', name, obj) + if (obj != null && obj != undefined && typeof obj == 'object') { + if (name == 'group' && groupContextId) { + return createGroupProxy(groupContextId, obj) } - }) + return new Proxy(obj, { + set(target, key, value) { + if (name != 'state') { + throw new Error( + 'Cannot set value on objects that are neither the global state or a container group field' + ) + } + if (typeof key !== 'string') { + throw new Error('Invalid key') + } + target[key] = value + let o = worldStore?.newOutput(name, key, value) + o?.set(value, true) + + return true + }, + get(obj, prop) { + if (name != 'state' && prop == 'group') { + return createGroupProxy(name, obj[prop]) + } else { + return obj[prop] + } + } + }) + } else { + return obj + } } const createGroupProxy = (name: string, obj: any) => { diff --git a/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte b/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte index 23abc8140a..522340565a 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte @@ -118,6 +118,21 @@ {/if} + +
{:else if suspendTabSelected === 'permissions'}
diff --git a/lsp/Pipfile b/lsp/Pipfile index cd2c2d1e33..b552cf200b 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.379.3" -wmill_pg = ">=1.379.3" +wmill = ">=1.379.4" +wmill_pg = ">=1.379.4" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 7b4c132de0..c9d66315bc 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.379.3 + version: 1.379.4 title: OpenFlow Spec contact: name: Ruben Fiszel @@ -139,6 +139,8 @@ components: type: boolean hide_cancel: type: boolean + continue_on_disapprove_timeout: + type: boolean priority: type: number continue_on_error: diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index d23fb54524..ef73424ec9 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.379.3' +ModuleVersion = '1.379.4' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 71b01e9691..badb515871 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.379.3" +version = "1.379.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 19f7b665fe..12e7df7917 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.379.3" +version = "1.379.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 14d3bcc565..e427f9ba86 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.379.3", + "version": "1.379.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 da4b2fc5b2..1cdbb4a31b 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.379.3", + "version": "1.379.4", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 9ba556dc1b..c7ee26c002 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.379.3 +1.379.4