Merge branch 'main' into fr/xyflow

This commit is contained in:
Faton Ramadani
2024-08-14 16:04:15 +02:00
committed by GitHub
24 changed files with 153 additions and 78 deletions
+10
View File
@@ -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)
+10 -4
View File
@@ -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
+23 -22
View File
@@ -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",
+2 -2
View File
@@ -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 <ruben@windmill.dev>"]
edition = "2021"
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.379.3
version: 1.379.4
title: Windmill API
contact:
+6
View File
@@ -213,6 +213,12 @@ pub struct Suspend {
pub self_approval_disabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hide_cancel: Option<bool>,
#[serde(skip_serializing_if = "false_or_empty")]
pub continue_on_disapprove_timeout: Option<bool>,
}
fn false_or_empty(v: &Option<bool>) -> bool {
v.is_none() || v.as_ref().is_some_and(|x| !x)
}
#[derive(Deserialize, Serialize, Debug, Clone)]
@@ -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);
@@ -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<R: rsmq_async::RsmqConnection + Send + Sync + Clone>
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 { .. }
+1 -1
View File
@@ -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<string> {
return await windmill.UserService.login({
+1 -1
View File
@@ -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")
+2 -2
View File
@@ -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",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "windmill-components",
"version": "1.379.3",
"version": "1.379.4",
"scripts": {
"dev": "vite dev",
"build": "vite build",
@@ -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}</div
>
{:else}<div
{:else if resultKind == 'nondisplayable'}<div class="text-red-400">Non displayable object</div
>{:else}<div
class="inline-highlight relative grow {['plain', 'markdown'].includes(resultKind ?? '')
? ''
: 'min-h-[200px]'}"
@@ -659,6 +659,18 @@
bgRuns.update((runs) => 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
}
}
</script>
{#each Object.entries(fields ?? {}) as [key, v] (key)}
@@ -753,7 +765,7 @@
<Alert type="warning" size="xs" class="mt-2 px-1" title="Missing runnable">
Please select a runnable
</Alert>
{:else if result?.error && $mode === 'preview' && !errorHandledByComponent}
{:else if getError(result) && $mode === 'preview' && !errorHandledByComponent}
<div
title="Error"
class={classNames(
@@ -29,7 +29,7 @@ return async function (context, state, createProxy, goto, setTab, recompute, get
"use strict";
${
contextKeys && contextKeys.length > 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) => {
@@ -118,6 +118,21 @@
<SecondsInput disabled />
{/if}
</Label>
<!-- <Toggle
options={{
right: 'Continue on disapproval/timeout',
rightTooltip:
'Instead of failing the flow, continue to the next step to be processed by a branchone. If any disapproval/timeout event is received, the resume payload will be an object containing an `error` field'
}}
checked={Boolean(flowModule.suspend?.continue_on_disapprove_timeout)}
disabled={!Boolean(flowModule.suspend)}
on:change={(e) => {
if (flowModule.suspend) {
flowModule.suspend.continue_on_disapprove_timeout = e.detail
}
}}
/> -->
</div>
{:else if suspendTabSelected === 'permissions'}
<div class="flex flex-col mt-4 gap-4">
+2 -2
View File
@@ -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 = "*"
+3 -1
View File
@@ -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:
@@ -12,7 +12,7 @@
RootModule = 'WindmillClient.psm1'
# Version number of this module.
ModuleVersion = '1.379.3'
ModuleVersion = '1.379.4'
# Supported PSEditions
# CompatiblePSEditions = @()
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"]
+1 -1
View File
@@ -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": {
+1 -1
View File
@@ -1 +1 @@
1.379.3
1.379.4