Merge remote-tracking branch 'origin/main' into glm/fix-edit-nested-schema

This commit is contained in:
Guilhem
2025-01-15 18:38:15 +01:00
20 changed files with 156 additions and 125 deletions
+23
View File
@@ -1,5 +1,28 @@
# Changelog
## [1.447.1](https://github.com/windmill-labs/windmill/compare/v1.447.0...v1.447.1) (2025-01-15)
### Bug Fixes
* **backend:** better deleted user error ([#5060](https://github.com/windmill-labs/windmill/issues/5060)) ([bc3d93b](https://github.com/windmill-labs/windmill/commit/bc3d93b9357114ac1210bf677a8615c459bb914d))
* **backend:** bun cache hash consistency ([#5067](https://github.com/windmill-labs/windmill/issues/5067)) ([2b0878e](https://github.com/windmill-labs/windmill/commit/2b0878ec2ba591fad003abf9ad1d024f9264e442))
* improve runnable permissions ([#5063](https://github.com/windmill-labs/windmill/issues/5063)) ([4a68ce9](https://github.com/windmill-labs/windmill/commit/4a68ce9ac30c544e2ef87ffeb5915312df885169))
## [1.447.0](https://github.com/windmill-labs/windmill/compare/v1.446.0...v1.447.0) (2025-01-15)
### Features
* add oracle db support on ee ([#5062](https://github.com/windmill-labs/windmill/issues/5062)) ([77d8255](https://github.com/windmill-labs/windmill/commit/77d825540f7bb38f5a378557138214b368a0942f))
* on behalf of ([#5058](https://github.com/windmill-labs/windmill/issues/5058)) ([04fbda2](https://github.com/windmill-labs/windmill/commit/04fbda28e829db50cd9b1289e997c1ec84c4a566))
### Bug Fixes
* remove bg-red in custom ui builder ([74385ef](https://github.com/windmill-labs/windmill/commit/74385ef70b0f93085d2a97de62528d95a45269cc))
* update ms sql template ([#5059](https://github.com/windmill-labs/windmill/issues/5059)) ([8c2f2eb](https://github.com/windmill-labs/windmill/commit/8c2f2ebb1e0ff8e0c307e30eb6a49534662cc20c))
## [1.446.0](https://github.com/windmill-labs/windmill/compare/v1.445.1...v1.446.0) (2025-01-14)
+64 -64
View File
@@ -808,9 +808,9 @@ dependencies = [
[[package]]
name = "aws-smithy-async"
version = "1.2.3"
version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "427cb637d15d63d6f9aae26358e1c9a9c09d5aa490d64b09354c8217cfef0f28"
checksum = "fa59d1327d8b5053c54bf2eaae63bf629ba9e904434d0835a28ed3c0ed0a614e"
dependencies = [
"futures-util",
"pin-project-lite",
@@ -819,9 +819,9 @@ dependencies = [
[[package]]
name = "aws-smithy-http"
version = "0.60.11"
version = "0.60.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6"
checksum = "7809c27ad8da6a6a68c454e651d4962479e81472aa19ae99e59f9aba1f9713cc"
dependencies = [
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -839,9 +839,9 @@ dependencies = [
[[package]]
name = "aws-smithy-json"
version = "0.61.1"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee4e69cc50921eb913c6b662f8d909131bb3e6ad6cb6090d3a39b66fc5c52095"
checksum = "623a51127f24c30776c8b374295f2df78d92517386f77ba30773f15a30ce1422"
dependencies = [
"aws-smithy-types",
]
@@ -858,9 +858,9 @@ dependencies = [
[[package]]
name = "aws-smithy-runtime"
version = "1.7.6"
version = "1.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a05dd41a70fc74051758ee75b5c4db2c0ca070ed9229c3df50e9475cda1cb985"
checksum = "865f7050bbc7107a6c98a397a9fcd9413690c27fa718446967cf03b2d3ac517e"
dependencies = [
"aws-smithy-async",
"aws-smithy-http",
@@ -902,9 +902,9 @@ dependencies = [
[[package]]
name = "aws-smithy-types"
version = "1.2.11"
version = "1.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38ddc9bd6c28aeb303477170ddd183760a956a03e083b3902a990238a7e3792d"
checksum = "a28f6feb647fb5e0d5b50f0472c19a7db9462b74e2fec01bb0b44eedcc834e97"
dependencies = [
"base64-simd 0.8.0",
"bytes",
@@ -1076,7 +1076,7 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195"
dependencies = [
"outref 0.5.1",
"outref 0.5.2",
"vsimd",
]
@@ -1123,7 +1123,7 @@ version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"cexpr",
"clang-sys",
"itertools 0.12.1",
@@ -1146,7 +1146,7 @@ version = "0.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"cexpr",
"clang-sys",
"itertools 0.13.0",
@@ -1166,7 +1166,7 @@ version = "0.71.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"cexpr",
"clang-sys",
"itertools 0.13.0",
@@ -1201,9 +1201,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.7.0"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be"
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
dependencies = [
"serde",
]
@@ -1953,9 +1953,9 @@ dependencies = [
[[package]]
name = "cron"
version = "0.14.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbe58904b68d95ad2c69a2e9607ffc70ce196c1910f83a340029c1448e06ed65"
checksum = "5877d3fbf742507b66bc2a1945106bd30dd8504019d596901ddd012a4dd01740"
dependencies = [
"chrono",
"once_cell",
@@ -2223,9 +2223,9 @@ dependencies = [
[[package]]
name = "data-encoding"
version = "2.6.0"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
checksum = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f"
[[package]]
name = "data-url"
@@ -4891,7 +4891,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"libc",
"redox_syscall 0.5.8",
]
@@ -5379,7 +5379,7 @@ checksum = "ed90d09e2ca55764bf65030ff5a387fdee42282fe3b89a38fa8f96a809882bc1"
dependencies = [
"base64 0.22.1",
"bindgen 0.71.1",
"bitflags 2.7.0",
"bitflags 2.8.0",
"btoi",
"byteorder",
"bytes",
@@ -5434,7 +5434,7 @@ version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"cfg-if",
"libc",
]
@@ -5776,7 +5776,7 @@ version = "0.10.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"cfg-if",
"foreign-types",
"libc",
@@ -5958,9 +5958,9 @@ checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4"
[[package]]
name = "outref"
version = "0.5.1"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a"
checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e"
[[package]]
name = "overload"
@@ -6591,7 +6591,7 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"getopts",
"memchr",
"unicase",
@@ -6888,7 +6888,7 @@ version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
]
[[package]]
@@ -7293,7 +7293,7 @@ version = "0.38.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"errno",
"libc",
"linux-raw-sys",
@@ -7634,7 +7634,7 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"core-foundation 0.9.4",
"core-foundation-sys",
"libc",
@@ -7647,7 +7647,7 @@ version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"core-foundation 0.10.0",
"core-foundation-sys",
"libc",
@@ -8357,7 +8357,7 @@ dependencies = [
"atoi",
"base64 0.22.1",
"bigdecimal",
"bitflags 2.7.0",
"bitflags 2.8.0",
"byteorder",
"bytes",
"chrono",
@@ -8402,7 +8402,7 @@ dependencies = [
"atoi",
"base64 0.22.1",
"bigdecimal",
"bitflags 2.7.0",
"bitflags 2.8.0",
"byteorder",
"chrono",
"crc",
@@ -8683,7 +8683,7 @@ version = "0.118.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6f866d12e4d519052b92a0a86d1ac7ff17570da1272ca0c89b3d6f802cd79df"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"is-macro",
"num-bigint",
"phf",
@@ -8769,7 +8769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65f21494e75d0bd8ef42010b47cabab9caaed8f2207570e809f6f4eb51a710d1"
dependencies = [
"better_scoped_tls",
"bitflags 2.7.0",
"bitflags 2.8.0",
"indexmap 2.7.0",
"once_cell",
"phf",
@@ -9006,7 +9006,7 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7dddc5f0fee506baf8b9fdb989e242f17e4b11c61dfbb0635b705217199eea"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"byteorder",
"enum-as-inner",
"libc",
@@ -9031,7 +9031,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
dependencies = [
"bitflags 2.7.0",
"bitflags 2.8.0",
"core-foundation 0.9.4",
"system-configuration-sys 0.6.0",
]
@@ -9829,7 +9829,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697"
dependencies = [
"async-compression",
"bitflags 2.7.0",
"bitflags 2.8.0",
"bytes",
"futures-core",
"http 1.2.0",
@@ -10441,7 +10441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a511192602f7b435b0a241c1947aa743eb7717f20a9195f4b5e8ed1952e01db1"
dependencies = [
"bindgen 0.70.1",
"bitflags 2.7.0",
"bitflags 2.8.0",
"fslock",
"gzip-header",
"home",
@@ -10743,7 +10743,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windmill"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"axum",
@@ -10784,7 +10784,7 @@ dependencies = [
[[package]]
name = "windmill-api"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"argon2",
@@ -10871,7 +10871,7 @@ dependencies = [
[[package]]
name = "windmill-api-client"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -10889,7 +10889,7 @@ dependencies = [
[[package]]
name = "windmill-audit"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"chrono",
"serde",
@@ -10902,7 +10902,7 @@ dependencies = [
[[package]]
name = "windmill-autoscaling"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"serde",
@@ -10916,7 +10916,7 @@ dependencies = [
[[package]]
name = "windmill-common"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"async-stream",
@@ -10975,7 +10975,7 @@ dependencies = [
[[package]]
name = "windmill-git-sync"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"regex",
"serde",
@@ -10989,7 +10989,7 @@ dependencies = [
[[package]]
name = "windmill-indexer"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"bytes",
@@ -11012,7 +11012,7 @@ dependencies = [
[[package]]
name = "windmill-macros"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"itertools 0.14.0",
"lazy_static",
@@ -11024,7 +11024,7 @@ dependencies = [
[[package]]
name = "windmill-parser"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"convert_case 0.6.0",
"serde",
@@ -11033,7 +11033,7 @@ dependencies = [
[[package]]
name = "windmill-parser-bash"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -11045,7 +11045,7 @@ dependencies = [
[[package]]
name = "windmill-parser-csharp"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"serde_json",
@@ -11057,7 +11057,7 @@ dependencies = [
[[package]]
name = "windmill-parser-go"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"gosyn",
@@ -11069,7 +11069,7 @@ dependencies = [
[[package]]
name = "windmill-parser-graphql"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -11081,7 +11081,7 @@ dependencies = [
[[package]]
name = "windmill-parser-php"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"itertools 0.14.0",
@@ -11092,7 +11092,7 @@ dependencies = [
[[package]]
name = "windmill-parser-py"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"itertools 0.14.0",
@@ -11103,7 +11103,7 @@ dependencies = [
[[package]]
name = "windmill-parser-py-imports"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"async-recursion",
@@ -11121,7 +11121,7 @@ dependencies = [
[[package]]
name = "windmill-parser-rust"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"convert_case 0.6.0",
@@ -11138,7 +11138,7 @@ dependencies = [
[[package]]
name = "windmill-parser-sql"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -11150,7 +11150,7 @@ dependencies = [
[[package]]
name = "windmill-parser-ts"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -11168,7 +11168,7 @@ dependencies = [
[[package]]
name = "windmill-parser-wasm"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"getrandom 0.2.15",
@@ -11190,7 +11190,7 @@ dependencies = [
[[package]]
name = "windmill-parser-yaml"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"serde_json",
@@ -11200,7 +11200,7 @@ dependencies = [
[[package]]
name = "windmill-queue"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"async-recursion",
@@ -11234,7 +11234,7 @@ dependencies = [
[[package]]
name = "windmill-sql-datatype-parser-wasm"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"wasm-bindgen",
"wasm-bindgen-test",
@@ -11244,7 +11244,7 @@ dependencies = [
[[package]]
name = "windmill-worker"
version = "1.446.0"
version = "1.447.1"
dependencies = [
"anyhow",
"async-recursion",
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "windmill"
version = "1.446.0"
version = "1.447.1"
authors.workspace = true
edition.workspace = true
@@ -30,7 +30,7 @@ members = [
]
[workspace.package]
version = "1.446.0"
version = "1.447.1"
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
edition = "2021"
@@ -71,7 +71,9 @@ pub fn parse_expr_for_imports(code: &str) -> anyhow::Result<Vec<String>> {
let mut visitor = ImportsFinder { imports: HashSet::new() };
visitor.visit_module(&expr);
Ok(visitor.imports.into_iter().collect())
let mut imports: Vec<_> = visitor.imports.into_iter().collect();
imports.sort();
Ok(imports)
}
struct OutputFinder {
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.446.0
version: 1.447.1
title: Windmill API
contact:
+42 -37
View File
@@ -524,28 +524,8 @@ async fn force_cancel(
}
}
pub async fn get_path_for_hash<'c>(
db: &mut Transaction<'c, Postgres>,
w_id: &str,
hash: i64,
) -> error::Result<String> {
let path = sqlx::query_scalar!(
"select path from script where hash = $1 AND workspace_id = $2",
hash,
w_id
)
.fetch_one(&mut **db)
.await
.map_err(|e| {
Error::InternalErr(format!(
"querying getting path for hash {hash} in {w_id}: {e:#}"
))
})?;
Ok(path)
}
pub async fn get_path_tag_limits_cache_for_hash(
tx: &DB,
mut tx: Transaction<'_, Postgres>,
w_id: &str,
hash: i64,
) -> error::Result<(
@@ -569,7 +549,7 @@ pub async fn get_path_tag_limits_cache_for_hash(
hash,
w_id
)
.fetch_optional(tx)
.fetch_optional(&mut *tx)
.await
.map_err(|e| {
Error::InternalErr(format!(
@@ -3042,6 +3022,7 @@ pub async fn run_flow_by_path_inner(
let flow_path = flow_path.to_path();
check_scopes(&authed, || format!("run:flow/{flow_path}"))?;
let mut tx = user_db.clone().begin(&authed).await?;
let (tag, dedicated_worker, has_preprocessor, on_behalf_of_email, edited_by) = sqlx::query!(
"SELECT tag, dedicated_worker, flow_version.value->>'preprocessor_module' IS NOT NULL as has_preprocessor, on_behalf_of_email, edited_by
FROM flow
@@ -3051,7 +3032,7 @@ pub async fn run_flow_by_path_inner(
flow_path,
w_id
)
.fetch_optional(&db)
.fetch_optional(&mut *tx)
.await?
.map(|x| (x.tag, x.dedicated_worker, x.has_preprocessor, x.on_behalf_of_email, x.edited_by))
.ok_or_else(|| {
@@ -3059,6 +3040,7 @@ pub async fn run_flow_by_path_inner(
"flow not found at path {flow_path} in workspace {w_id}"
))
})?;
drop(tx);
let tag = run_query.tag.clone().or(tag);
@@ -3151,14 +3133,16 @@ pub async fn restart_flow(
) -> error::Result<(StatusCode, String)> {
check_license_key_valid().await?;
let mut tx = user_db.clone().begin(&authed).await?;
let completed_job = sqlx::query_as::<_, CompletedJob>(
"SELECT *, result->'wm_labels' as labels from completed_job WHERE id = $1 and workspace_id = $2",
)
.bind(job_id)
.bind(&w_id)
.fetch_optional(&db)
.fetch_optional(&mut *tx)
.await?
.with_context(|| "Unable to find completed job with the given job UUID")?;
drop(tx);
let flow_path = completed_job
.script_path
@@ -3248,8 +3232,10 @@ pub async fn run_script_by_path_inner(
check_scopes(&authed, || format!("run:script/{script_path}"))?;
let mut tx = user_db.clone().begin(&authed).await?;
let (job_payload, tag, _delete_after_use, timeout, on_behalf_of) =
script_path_to_payload(script_path, &db, &w_id, run_query.skip_preprocessor).await?;
script_path_to_payload(script_path, &mut *tx, &w_id, run_query.skip_preprocessor).await?;
drop(tx);
let scheduled_for = run_query.get_scheduled_for(&db).await?;
let tag = run_query.tag.clone().or(tag);
@@ -3367,8 +3353,14 @@ pub async fn run_workflow_as_code(
None,
),
JobKind::Script => {
script_path_to_payload(job.script_path(), &db, &w_id, run_query.skip_preprocessor)
.await?
let mut tx = user_db.clone().begin(&authed).await?;
script_path_to_payload(
job.script_path(),
&mut *tx,
&w_id,
run_query.skip_preprocessor,
)
.await?
}
_ => return Err(anyhow::anyhow!("Not supported").into()),
};
@@ -3852,8 +3844,10 @@ pub async fn run_wait_result_job_by_path_get(
let script_path = script_path.to_path();
check_scopes(&authed, || format!("run:script/{script_path}"))?;
let mut tx = user_db.clone().begin(&authed).await?;
let (job_payload, tag, delete_after_use, timeout, on_behalf_authed) =
script_path_to_payload(script_path, &db, &w_id, run_query.skip_preprocessor).await?;
script_path_to_payload(script_path, &mut *tx, &w_id, run_query.skip_preprocessor).await?;
drop(tx);
let tag = run_query.tag.clone().or(tag);
check_tag_available_for_workspace(&w_id, &tag, &authed).await?;
@@ -3988,8 +3982,9 @@ pub async fn run_wait_result_script_by_path_internal(
let script_path = script_path.to_path();
check_scopes(&authed, || format!("run:script/{script_path}"))?;
let mut tx = user_db.clone().begin(&authed).await?;
let (job_payload, tag, delete_after_use, timeout, on_behalf_of) =
script_path_to_payload(script_path, &db, &w_id, run_query.skip_preprocessor).await?;
script_path_to_payload(script_path, &mut *tx, &w_id, run_query.skip_preprocessor).await?;
let tag = run_query.tag.clone().or(tag);
check_tag_available_for_workspace(&w_id, &tag, &authed).await?;
@@ -4078,7 +4073,8 @@ pub async fn run_wait_result_script_by_hash(
has_preprocessor,
on_behalf_of_email,
created_by,
) = get_path_tag_limits_cache_for_hash(&db, &w_id, hash).await?;
) = get_path_tag_limits_cache_for_hash(user_db.clone().begin(&authed).await?, &w_id, hash)
.await?;
if let Some(run_query_cache_ttl) = run_query.cache_ttl {
cache_ttl = Some(run_query_cache_ttl);
}
@@ -4186,6 +4182,7 @@ pub async fn run_wait_result_flow_by_path_internal(
let scheduled_for = run_query.get_scheduled_for(&db).await?;
let mut tx = user_db.clone().begin(&authed).await?;
let (tag, dedicated_worker, early_return, has_preprocessor, on_behalf_of_email, edited_by) = sqlx::query!(
"SELECT tag, dedicated_worker, flow_version.value->>'early_return' as early_return, flow_version.value->>'preprocessor_module' IS NOT NULL as has_preprocessor, on_behalf_of_email, edited_by
FROM flow
@@ -4195,7 +4192,7 @@ pub async fn run_wait_result_flow_by_path_internal(
flow_path,
w_id
)
.fetch_optional(&db)
.fetch_optional(&mut *tx)
.await?
.map(|x| (x.tag, x.dedicated_worker, x.early_return, x.has_preprocessor, x.on_behalf_of_email, x.edited_by))
.ok_or_else(|| {
@@ -4646,6 +4643,7 @@ struct BatchInfo {
async fn add_batch_jobs(
authed: ApiAuthed,
Extension(db): Extension<DB>,
Extension(user_db): Extension<UserDB>,
Path((w_id, n)): Path<(String, i32)>,
Json(batch_info): Json<BatchInfo>,
) -> error::JsonResult<Vec<Uuid>> {
@@ -4668,6 +4666,7 @@ async fn add_batch_jobs(
) = match batch_info.kind.as_str() {
"script" => {
if let Some(path) = batch_info.path {
let mut tx = user_db.clone().begin(&authed).await?;
let (
script_hash,
_tag,
@@ -4683,7 +4682,7 @@ async fn add_batch_jobs(
_,
_, // TODO: consider on_behalf_of_email and created_by for batch jobs
_, // ------------------------------------------
) = get_latest_deployed_hash_for_path(&db, &w_id, &path).await?;
) = get_latest_deployed_hash_for_path(&mut *tx, &w_id, &path).await?;
(
Some(script_hash),
Some(path),
@@ -4732,6 +4731,7 @@ async fn add_batch_jobs(
let (mut value, job_kind, path) = if let Some(value) = batch_info.flow_value {
(value, JobKind::FlowPreview, None)
} else if let Some(path) = batch_info.path {
let mut tx = user_db.clone().begin(&authed).await?;
let value_json = sqlx::query!(
"SELECT coalesce(flow_version_lite.value, flow_version.value) as \"value!: sqlx::types::Json<Box<RawValue>>\" FROM flow
LEFT JOIN flow_version
@@ -4741,7 +4741,7 @@ async fn add_batch_jobs(
WHERE flow.path = $1 AND flow.workspace_id = $2 LIMIT 1",
&path, &w_id
)
.fetch_optional(&db)
.fetch_optional(&mut *tx)
.await?
.ok_or_else(|| Error::InternalErr(format!("not found flow at path {:?}", path)))?;
let value =
@@ -4809,6 +4809,8 @@ async fn add_batch_jobs(
format!("{}", language.as_str())
};
let mut tx = user_db.begin(&authed).await?;
let uuids = sqlx::query_scalar!(
r#"WITH uuid_table as (
select gen_random_uuid() as uuid from generate_series(1, $5)
@@ -4823,7 +4825,7 @@ async fn add_batch_jobs(
raw_flow.map(sqlx::types::Json) as Option<sqlx::types::Json<FlowValue>>,
n
)
.fetch_all(&db)
.fetch_all(&mut *tx)
.await?;
let uuids = sqlx::query_scalar!(
@@ -4850,7 +4852,7 @@ async fn add_batch_jobs(
timeout,
flow_status.map(sqlx::types::Json) as Option<sqlx::types::Json<FlowStatus>>
)
.fetch_all(&db)
.fetch_all(&mut *tx)
.await?;
if let Some(custom_concurrency_key) = custom_concurrency_key {
@@ -4859,10 +4861,12 @@ async fn add_batch_jobs(
custom_concurrency_key,
&uuids
)
.execute(&db)
.execute(&mut *tx)
.await?;
}
tx.commit().await?;
Ok(Json(uuids))
}
@@ -4970,7 +4974,8 @@ pub async fn run_job_by_hash_inner(
has_preprocessor,
on_behalf_of_email,
created_by,
) = get_path_tag_limits_cache_for_hash(&db, &w_id, hash).await?;
) = get_path_tag_limits_cache_for_hash(user_db.clone().begin(&authed).await?, &w_id, hash)
.await?;
check_scopes(&authed, || format!("run:script/{path}"))?;
if let Some(run_query_cache_ttl) = run_query.cache_ttl {
cache_ttl = Some(run_query_cache_ttl);
+5 -4
View File
@@ -118,13 +118,14 @@ pub async fn fetch_authed_from_permissioned_as(
name,
&w_id
)
.fetch_one(db)
.await
.ok();
.fetch_optional(db)
.await?;
if let Some(r) = r {
(r.is_admin, r.operator)
} else {
(false, true)
return Err(Error::InternalErr(format!(
"user {name} not found in workspace {w_id}"
)));
}
};
+2 -2
View File
@@ -377,9 +377,9 @@ pub struct OnBehalfOf {
pub permissioned_as: String,
}
pub async fn script_path_to_payload(
pub async fn script_path_to_payload<'e, E: sqlx::Executor<'e, Database = Postgres>>(
script_path: &str,
db: &DB,
db: E,
w_id: &str,
skip_preprocessor: Option<bool>,
) -> error::Result<(
+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.446.0";
export const VERSION = "v1.447.1";
export async function login(email: string, password: string): Promise<string> {
return await windmill.UserService.login({
+1 -1
View File
@@ -60,7 +60,7 @@ export {
// }
// });
export const VERSION = "1.446.0";
export const VERSION = "1.447.1";
const command = new Command()
.name("wmill")
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "windmill-components",
"version": "1.446.0",
"version": "1.447.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "windmill-components",
"version": "1.446.0",
"version": "1.447.1",
"license": "AGPL-3.0",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "windmill-components",
"version": "1.446.0",
"version": "1.447.1",
"scripts": {
"dev": "vite dev",
"build": "vite build",
+2 -2
View File
@@ -4,8 +4,8 @@ verify_ssl = true
name = "pypi"
[packages]
wmill = ">=1.446.0"
wmill_pg = ">=1.446.0"
wmill = ">=1.447.1"
wmill_pg = ">=1.447.1"
sendgrid = "*"
mysql-connector-python = "*"
pymongo = "*"
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.446.0
version: 1.447.1
title: OpenFlow Spec
contact:
name: Ruben Fiszel
@@ -12,7 +12,7 @@
RootModule = 'WindmillClient.psm1'
# Version number of this module.
ModuleVersion = '1.446.0'
ModuleVersion = '1.447.1'
# Supported PSEditions
# CompatiblePSEditions = @()
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "wmill"
version = "1.446.0"
version = "1.447.1"
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.446.0"
version = "1.447.1"
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.446.0",
"version": "1.447.1",
"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.446.0",
"version": "1.447.1",
"author": "Ruben Fiszel",
"license": "Apache 2.0",
"devDependencies": {
+1 -1
View File
@@ -1 +1 @@
1.446.0
1.447.1