mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-29 08:06:46 +00:00
Merge remote-tracking branch 'origin/main' into artifacts-page
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "1.865.0"
|
||||
".": "1.866.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## [1.866.0](https://github.com/windmill-labs/windmill/compare/v1.865.0...v1.866.0) (2026-11-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* configurable columns and csv/json/xlsx export on the runs page ([#12302](https://github.com/windmill-labs/windmill/issues/12302)) ([47005d5](https://github.com/windmill-labs/windmill/commit/47005d5fcfe43251b2b184fbe625e7790b9a2adc))
|
||||
* show when each job started in the ai session jobs popover ([#12301](https://github.com/windmill-labs/windmill/issues/12301)) ([8b40416](https://github.com/windmill-labs/windmill/commit/8b404164e3487aead898d439de39993e313125be))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* keep flow nodes on rename and stop masking flow load errors ([#12303](https://github.com/windmill-labs/windmill/issues/12303)) ([3bf4864](https://github.com/windmill-labs/windmill/commit/3bf486415bd88ffea9787f004874d15bbd433265))
|
||||
* never break running flows when their flow is deleted ([#12306](https://github.com/windmill-labs/windmill/issues/12306)) ([e3ff8be](https://github.com/windmill-labs/windmill/commit/e3ff8bee3d1e36c5ed1ea4982e8c6e02e24f7b50))
|
||||
* pin rsa to 0.9 so the lock refresh stops pulling 0.10 ([#12299](https://github.com/windmill-labs/windmill/issues/12299)) ([188b6cc](https://github.com/windmill-labs/windmill/commit/188b6ccf151e13aeef6d6a25c565ce59f7f02550))
|
||||
* read the git sync callback script with the runnable parser ([#12304](https://github.com/windmill-labs/windmill/issues/12304)) ([2e422b4](https://github.com/windmill-labs/windmill/commit/2e422b497ee6f9691fe14812af1cb3646f928b34))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* list audit logs by timestamp so only recent partitions are read ([#12309](https://github.com/windmill-labs/windmill/issues/12309)) ([a6ec7d0](https://github.com/windmill-labs/windmill/commit/a6ec7d0c18c0168bcda1ba6ccc9216b2bd5077a6))
|
||||
|
||||
## [1.865.0](https://github.com/windmill-labs/windmill/compare/v1.864.1...v1.865.0) (2026-11-09)
|
||||
|
||||
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO flow_version\n (workspace_id, path, value, schema, created_by)\n\n SELECT v.workspace_id, v.path, v.value, v.schema, v.created_by\n FROM flow_version v\n JOIN flow f ON f.workspace_id = v.workspace_id AND f.path = v.path\n WHERE v.path = $1 AND v.workspace_id = $2 AND v.id = $3\n FOR SHARE OF f\n\n RETURNING id\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text",
|
||||
"Int8"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "0deba337ceb95584bfd4fa280310eb31e21c1f7b23210bc65595a86b53c2908d"
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE flow_node SET path = $1 WHERE path = $2 AND workspace_id = $3",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Varchar",
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "120756fe619d9497cb2cf0a40687d51895cc0f1294be9e5ad106ea4de8cbb2b5"
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "WITH RECURSIVE chain(id, parent_job, flow_innermost_root_job, runnable_id, runnable_path, raw_flow, depth) AS (\n SELECT id, parent_job, flow_innermost_root_job, runnable_id, runnable_path, raw_flow, 0\n FROM v2_job\n WHERE id = $1 AND workspace_id = $2\n UNION ALL\n SELECT j.id, j.parent_job, j.flow_innermost_root_job, j.runnable_id, j.runnable_path, j.raw_flow, c.depth + 1\n FROM v2_job j\n JOIN chain c\n ON j.id = COALESCE(c.flow_innermost_root_job, c.parent_job)\n WHERE j.workspace_id = $2 AND c.depth < $3\n )\n SELECT\n CASE\n WHEN flow_version.id IS NOT NULL THEN\n flow_version.value -> 'flow_env'\n ELSE\n chain.raw_flow -> 'flow_env'\n END AS \"flow_env: Json<HashMap<String, Box<RawValue>>>\"\n FROM chain\n LEFT JOIN flow_version\n ON flow_version.id = chain.runnable_id\n AND flow_version.path = chain.runnable_path\n AND flow_version.workspace_id = $2\n WHERE (CASE\n WHEN flow_version.id IS NOT NULL THEN flow_version.value -> 'flow_env'\n ELSE chain.raw_flow -> 'flow_env'\n END) IS NOT NULL\n ORDER BY chain.depth ASC\n LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "flow_env: Json<HashMap<String, Box<RawValue>>>",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "14c2784a68f06e7349941671abe5a9108b6f32490cb61b14de71102bb305f71d"
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT policy->>'execution_mode' = 'anonymous' FROM app\n WHERE path = $1 AND workspace_id = $2",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "?column?",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "1642ab69bebc6cde3760a4124fdb1192d9d25ebd688bf39806e92f8fe6e84529"
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM trashbin WHERE workspace_id = $1 AND id = $2",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Int8"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "1d995dd5a094631ae96c16d68026fdeb22714af38162e87c02b052a5b8ec2645"
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM flow_version WHERE workspace_id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "29fba245ac4b45d904ee50f424828e8d181651d7a4324c5b42c34de5b747ab95"
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM trashbin WHERE workspace_id = $1",
|
||||
"query": "DELETE FROM flow_node WHERE workspace_id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
@@ -10,5 +10,5 @@
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "bae31609123da68d16bea8e0f1c4624403b6f97e13f13f056501fe2f4efb0f06"
|
||||
"hash": "2d2a3beec12407c9a7ff29ad83a03d6cdd6a5a399a3a026ade25ac1bdb8a8c9b"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM trashbin WHERE expires_at <= now()",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3453c0b7dd3c4d2c9bc639f379901741955502c9345e82a9b7fbbf3d3c7ab517"
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "WITH RECURSIVE chain(id, parent_job, flow_innermost_root_job, runnable_id, kind, raw_flow, depth) AS (\n SELECT id, parent_job, flow_innermost_root_job, runnable_id, kind, raw_flow, 0\n FROM v2_job\n WHERE id = $1 AND workspace_id = $2\n UNION ALL\n SELECT j.id, j.parent_job, j.flow_innermost_root_job, j.runnable_id, j.kind, j.raw_flow, c.depth + 1\n FROM v2_job j\n JOIN chain c\n ON j.id = COALESCE(c.flow_innermost_root_job, c.parent_job)\n WHERE j.workspace_id = $2 AND c.depth < $3\n )\n SELECT\n CASE\n WHEN flow_version.id IS NOT NULL THEN\n flow_version.value -> 'flow_env'\n ELSE\n chain.raw_flow -> 'flow_env'\n END AS \"flow_env: Json<HashMap<String, Box<RawValue>>>\"\n FROM chain\n LEFT JOIN flow_version\n ON flow_version.id = chain.runnable_id\n AND chain.kind IN ('flow', 'unassigned_flow')\n AND flow_version.workspace_id = $2\n WHERE (CASE\n WHEN flow_version.id IS NOT NULL THEN flow_version.value -> 'flow_env'\n ELSE chain.raw_flow -> 'flow_env'\n END) IS NOT NULL\n ORDER BY chain.depth ASC\n LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "flow_env: Json<HashMap<String, Box<RawValue>>>",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "5e312a063a660a1d4da462b8d6e8493a674bcad0f0a4900323475f68d549c79c"
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE flow_node SET path = REGEXP_REPLACE(path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3",
|
||||
"query": "UPDATE flow_node SET path = REGEXP_REPLACE(path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3 AND NOT EXISTS (SELECT 1 FROM flow_node d WHERE d.workspace_id = $3 AND d.hash_v2 = flow_node.hash_v2 AND d.path = REGEXP_REPLACE(flow_node.path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1'))",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
@@ -12,5 +12,5 @@
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "ed12d54e9cdc18672bbb34d2500adc18b72323e06a1f32e7a1a7589649888927"
|
||||
"hash": "6842391724392d3244f98c8fb8d443f8c19ba123fab9abccba5be75b0e677964"
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE flow_node SET path = REGEXP_REPLACE(path, 'u/' || $2 || '/(.*)', $1 || '/\\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3",
|
||||
"query": "UPDATE flow_node SET path = REGEXP_REPLACE(path, 'u/' || $2 || '/(.*)', $1 || '/\\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3 AND NOT EXISTS (SELECT 1 FROM flow_node d WHERE d.workspace_id = $3 AND d.hash_v2 = flow_node.hash_v2 AND d.path = REGEXP_REPLACE(flow_node.path, 'u/' || $2 || '/(.*)', $1 || '/\\1'))",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
@@ -12,5 +12,5 @@
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "d1a33665e47e10c4f992e018e234496935fc3415c7aa00642626494a2940cdf2"
|
||||
"hash": "6cdd377dc2987bd46604b187ce7a54c7ce282621ef23ae0b8427b98474b41fef"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE flow_node n SET path = $1 WHERE path = $2 AND workspace_id = $3\n AND NOT EXISTS (\n SELECT 1 FROM flow_node d\n WHERE d.path = $1 AND d.workspace_id = $3 AND d.hash_v2 = n.hash_v2\n )",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "72597c62d560fcb8604eb5307bbc0442e976e96f13721ffdd63f0739fce516cd"
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE app SET policy = jsonb_set(policy, '{execution_mode}', '\"publisher\"')\n WHERE workspace_id = $1 AND policy->>'execution_mode' = 'anonymous'",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "8aca507d5a1a548ddce49244b1222bbca953b9436f3b9541677e664c84d443ed"
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO flow_version\n (workspace_id, path, value, schema, created_by)\n\n SELECT workspace_id, path, value, schema, created_by\n FROM flow_version WHERE path = $1 AND workspace_id = $2 AND id = $3\n\n RETURNING id\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text",
|
||||
"Int8"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "a6a973dcd92d2e40fd9a1c1be42052fcd350bd47ee4f63832448b6e6f0f472f0"
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, workspace_id, path, value, schema, created_by, created_at\n FROM flow_version\n WHERE workspace_id = $1\n ORDER BY path, created_at",
|
||||
"query": "SELECT id, workspace_id, path, value, schema, created_by, created_at\n FROM flow_version\n WHERE workspace_id = $1\n AND NOT starts_with(path, '__deleted/')\n ORDER BY path, created_at",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -54,5 +54,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "c98a28cdeced035b21b8893041c4f94e2564a609eb5b8b9c562a0dbded4d5b96"
|
||||
"hash": "b840d72656c29477d2c4554d24aa40ad9224be03c4033f0bab943fb78e92ff57"
|
||||
}
|
||||
Generated
+97
-97
@@ -243,9 +243,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "arc-swap"
|
||||
version = "1.9.4"
|
||||
version = "1.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db4c94f57a570fce5d381be3289b3f79aef6332d72948fe82ab5772e423ccf92"
|
||||
checksum = "84a22b5d51209f6de83d37a0b33d320acb8da88823e42a94c075140708f032a5"
|
||||
dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
@@ -2858,9 +2858,9 @@ checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853"
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.5.4"
|
||||
version = "1.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04"
|
||||
checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
@@ -7254,9 +7254,9 @@ checksum = "4754a1731458af0443709c9667302793d3f63cc90ec4ba4c8259f2b9515478e5"
|
||||
|
||||
[[package]]
|
||||
name = "jiff"
|
||||
version = "0.2.41"
|
||||
version = "0.2.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcefdcefac59ac8f8401852e3427d55610481fc41e6625c39bac62d2d771623a"
|
||||
checksum = "fefca06093eeaed707a905795e68206da0edca4edef23d2a3997a3ddbee462aa"
|
||||
dependencies = [
|
||||
"jiff-core",
|
||||
"jiff-static",
|
||||
@@ -7280,9 +7280,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jiff-static"
|
||||
version = "0.2.41"
|
||||
version = "0.2.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "203edf9b0ce4083ec8fbf4adc823eac89768ea994b4953fc0dab1b90083234dd"
|
||||
checksum = "41d3213549742662eea1a18e6c5af9be5dfbabeb7611ab71356a54928ec398f0"
|
||||
dependencies = [
|
||||
"jiff-core",
|
||||
"proc-macro2",
|
||||
@@ -7831,9 +7831,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.32"
|
||||
version = "1.1.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69965d2409bff8c8cea3829009fff66a86f05a0570656552ef70f616e8e4bd85"
|
||||
checksum = "fee3f59f4321dab0c78d828942e7aa09d0bd8ad6e78a501977e6bf3d02938045"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@@ -9622,9 +9622,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
||||
|
||||
[[package]]
|
||||
name = "pest"
|
||||
version = "2.9.5"
|
||||
version = "2.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8db75153506001cb36ed924f08cadc862eb3f8c4d0d534139f29074769d7660"
|
||||
checksum = "5ec53fd1d256900a9a771bf2720d42cef6f8bc91b4e25065fbd291e3e7222576"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"pest_stack_guard",
|
||||
@@ -9633,9 +9633,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pest_derive"
|
||||
version = "2.9.5"
|
||||
version = "2.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20aa17e11fb35664b67d5214a0afac57a360d231b6ec53d6eba0700b27d933b4"
|
||||
checksum = "adcf794fd301ddc20818a6b4de85ed507f4b45300245cec948982e69e12e3bd7"
|
||||
dependencies = [
|
||||
"pest",
|
||||
"pest_generator",
|
||||
@@ -9643,9 +9643,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pest_generator"
|
||||
version = "2.9.5"
|
||||
version = "2.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "626ec5afccf44ccbfeb2b232316510bb55b4bf34d891afcb0fb07d2b17d7fe9d"
|
||||
checksum = "c3073afae5db334c25dea9fc3e230a4f191e920c1df080cb9c0b37c9ce1dbb41"
|
||||
dependencies = [
|
||||
"pest",
|
||||
"pest_meta",
|
||||
@@ -9656,9 +9656,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pest_meta"
|
||||
version = "2.9.5"
|
||||
version = "2.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3f45b6caa65c1b08186832745159c2529994146340a7bf44168095469720f5d"
|
||||
checksum = "7bc7f614b3742541642af1685faaa910bf6333e3cd3729c2cccd118146a57327"
|
||||
dependencies = [
|
||||
"pest",
|
||||
]
|
||||
@@ -15601,7 +15601,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-nats",
|
||||
@@ -15691,7 +15691,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-ai"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"async-trait",
|
||||
@@ -15726,7 +15726,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-alerting"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -15739,7 +15739,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
@@ -15881,7 +15881,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-agent-workers"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -15905,7 +15905,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-assets"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -15922,7 +15922,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-auth"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -15948,7 +15948,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-client"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"reqwest 0.12.28",
|
||||
"serde",
|
||||
@@ -15958,7 +15958,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-configs"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -15975,7 +15975,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-debug"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"base64 0.22.1",
|
||||
@@ -15997,7 +15997,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-embeddings"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -16020,7 +16020,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-flow-conversations"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16036,7 +16036,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-flows"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16058,7 +16058,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-groups"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16080,7 +16080,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-inputs"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16094,7 +16094,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-integration-tests"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-nats",
|
||||
@@ -16130,7 +16130,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-jobs"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -16156,7 +16156,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-npm-proxy"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16184,7 +16184,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-openapi"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -16206,7 +16206,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-schedule"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16225,7 +16225,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-scripts"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -16267,7 +16267,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-settings"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -16297,7 +16297,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-sse"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"serde",
|
||||
@@ -16309,7 +16309,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-users"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"argon2",
|
||||
"axum",
|
||||
@@ -16333,7 +16333,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-workers"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16348,7 +16348,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-workspaces"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
@@ -16387,7 +16387,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-audit"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"lazy_static",
|
||||
@@ -16402,7 +16402,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-autoscaling"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -16421,7 +16421,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-common"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"aho-corasick",
|
||||
@@ -16540,7 +16540,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-dep-map"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"futures",
|
||||
@@ -16560,7 +16560,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-git-sync"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"regex",
|
||||
"serde",
|
||||
@@ -16577,7 +16577,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-indexer"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"astral-tokio-tar",
|
||||
@@ -16604,7 +16604,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-jseval"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures",
|
||||
@@ -16621,7 +16621,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-macros"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"lazy_static",
|
||||
@@ -16637,7 +16637,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-mcp"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -16659,7 +16659,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-native-triggers"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -16691,7 +16691,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-oauth"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -16716,7 +16716,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-object-store"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
@@ -16752,7 +16752,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-operator"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures",
|
||||
@@ -16771,7 +16771,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"convert_case 0.6.0",
|
||||
"serde",
|
||||
@@ -16780,7 +16780,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-bash"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -16792,7 +16792,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-csharp"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde_json",
|
||||
@@ -16804,7 +16804,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-go"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"gosyn",
|
||||
@@ -16816,7 +16816,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-graphql"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -16828,7 +16828,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-java"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde_json",
|
||||
@@ -16840,7 +16840,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-nu"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"nu-parser",
|
||||
@@ -16851,7 +16851,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-php"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.14.0",
|
||||
@@ -16862,7 +16862,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.14.0",
|
||||
@@ -16874,7 +16874,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py-asset"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ruff_python_ast",
|
||||
@@ -16885,7 +16885,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py-imports"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
@@ -16908,7 +16908,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-r"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde_json",
|
||||
@@ -16920,7 +16920,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ruby"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -16934,7 +16934,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-rust"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"convert_case 0.6.0",
|
||||
@@ -16951,7 +16951,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-sql"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -16964,7 +16964,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-sql-asset"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
@@ -16976,7 +16976,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ts"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -16994,7 +16994,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ts-asset"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde-wasm-bindgen",
|
||||
@@ -17010,7 +17010,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-wac"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ruff_python_ast",
|
||||
@@ -17027,7 +17027,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-yaml"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -17041,7 +17041,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-queue"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
@@ -17079,7 +17079,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-runtime-nativets"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"const_format",
|
||||
@@ -17117,7 +17117,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-sql-datatype-parser-wasm"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
"wasm-bindgen",
|
||||
@@ -17128,7 +17128,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-store"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
@@ -17163,7 +17163,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-test-utils"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17187,7 +17187,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17220,7 +17220,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-amqp"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17247,7 +17247,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-azure"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17280,7 +17280,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-email"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17300,7 +17300,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-gcp"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17334,7 +17334,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-http"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17371,7 +17371,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-kafka"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17394,7 +17394,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-mqtt"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17418,7 +17418,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-nats"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-nats",
|
||||
@@ -17442,7 +17442,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-postgres"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17477,7 +17477,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-sqs"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17505,7 +17505,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-trigger-websocket"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -17531,7 +17531,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-types"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.13.2",
|
||||
@@ -17550,7 +17550,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-worker"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-once-cell",
|
||||
@@ -17668,7 +17668,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-worker-volumes"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "windmill"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
@@ -88,7 +88,7 @@ members = [
|
||||
exclude = ["./windmill-duckdb-ffi-internal", "./parsers/windmill-parser-wasm"]
|
||||
|
||||
[workspace.package]
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
effb55d778943537b96a9b0af26c2e24ca8b4686
|
||||
d7d509d0955c52f83afd0bf8b61a0e811162c16f
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
DELETE FROM flow_version v
|
||||
WHERE NOT EXISTS (SELECT 1 FROM flow f WHERE f.workspace_id = v.workspace_id AND f.path = v.path);
|
||||
ALTER TABLE flow_version ADD CONSTRAINT flow_version_workspace_id_path_fkey
|
||||
FOREIGN KEY (workspace_id, path) REFERENCES flow (workspace_id, path) ON DELETE CASCADE;
|
||||
-- flow_node's constraint is not restored: a node left at a deleted flow's path can be
|
||||
-- shared by content with a live flow's versions, so deleting orphans could break that flow.
|
||||
@@ -0,0 +1,5 @@
|
||||
-- A deleted flow's versions and nodes outlive its row so that runs in flight can finish:
|
||||
-- its versions are set aside (trashbin::set_aside_flow_versions) and purged with its trash
|
||||
-- entry, its nodes stay until the workspace is deleted.
|
||||
ALTER TABLE flow_version DROP CONSTRAINT IF EXISTS flow_version_workspace_id_path_fkey;
|
||||
ALTER TABLE flow_node DROP CONSTRAINT IF EXISTS flow_node_path_workspace_id_fkey;
|
||||
+24
-24
@@ -6340,7 +6340,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "windmill-common"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"aho-corasick",
|
||||
@@ -6430,7 +6430,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-macros"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -6442,7 +6442,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"serde",
|
||||
@@ -6451,7 +6451,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-bash"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -6463,7 +6463,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-csharp"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde_json",
|
||||
@@ -6475,7 +6475,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-go"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"gosyn",
|
||||
@@ -6487,7 +6487,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-graphql"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -6499,7 +6499,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-java"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde_json",
|
||||
@@ -6511,7 +6511,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-nu"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"nu-parser",
|
||||
@@ -6522,7 +6522,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-php"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.14.0",
|
||||
@@ -6533,7 +6533,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.14.0",
|
||||
@@ -6545,7 +6545,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py-asset"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ruff_python_ast",
|
||||
@@ -6556,7 +6556,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py-imports"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
@@ -6579,7 +6579,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-r"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde_json",
|
||||
@@ -6591,7 +6591,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ruby"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -6605,7 +6605,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-rust"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"convert_case",
|
||||
@@ -6622,7 +6622,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-sql"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -6635,7 +6635,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-sql-asset"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
@@ -6647,7 +6647,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ts"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -6665,7 +6665,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ts-asset"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde-wasm-bindgen",
|
||||
@@ -6681,7 +6681,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-wac"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ruff_python_ast",
|
||||
@@ -6698,7 +6698,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-wasm"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"getrandom 0.2.17",
|
||||
@@ -6730,7 +6730,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-yaml"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"lazy_static",
|
||||
@@ -6744,7 +6744,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-types"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags",
|
||||
|
||||
@@ -12,7 +12,7 @@ resolver = "2"
|
||||
members = ["."]
|
||||
|
||||
[workspace.package]
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
edition = "2021"
|
||||
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
//! On the shared cloud (`CLOUD_HOSTED`), public (`anonymous`) apps take a paid plan.
|
||||
//!
|
||||
//! One test in its own binary on purpose: `CLOUD_HOSTED` is read once into a
|
||||
//! `lazy_static`, so it must be set before anything reads it.
|
||||
#![cfg(feature = "cloud")]
|
||||
|
||||
use serde_json::json;
|
||||
use sqlx::{Pool, Postgres};
|
||||
use windmill_test_utils::*;
|
||||
|
||||
const ADMIN_TOKEN: &str = "SECRET_TOKEN";
|
||||
const APP_PATH: &str = "u/test-user/public_app";
|
||||
|
||||
fn post(url: String) -> reqwest::RequestBuilder {
|
||||
reqwest::Client::new()
|
||||
.post(url)
|
||||
.header("Authorization", format!("Bearer {ADMIN_TOKEN}"))
|
||||
}
|
||||
|
||||
fn public_app() -> serde_json::Value {
|
||||
json!({
|
||||
"path": APP_PATH,
|
||||
"summary": "Public app",
|
||||
"value": {},
|
||||
"policy": { "execution_mode": "anonymous", "triggerables": {} }
|
||||
})
|
||||
}
|
||||
|
||||
#[sqlx::test(fixtures("base"))]
|
||||
async fn public_apps_take_a_paid_plan(db: Pool<Postgres>) -> anyhow::Result<()> {
|
||||
unsafe { std::env::set_var("CLOUD_HOSTED", "true") };
|
||||
initialize_tracing().await;
|
||||
// A fork of a paid root draws the root's plan, though it is not premium itself.
|
||||
sqlx::raw_sql(
|
||||
"INSERT INTO workspace (id, name, owner, premium) VALUES ('paid-root', 'paid-root', 'test-user', true);
|
||||
INSERT INTO workspace (id, name, owner, parent_workspace_id)
|
||||
VALUES ('paid-fork', 'paid-fork', 'test-user', 'paid-root');
|
||||
INSERT INTO workspace_settings (workspace_id) VALUES ('paid-root'), ('paid-fork');
|
||||
INSERT INTO usr (workspace_id, email, username, is_admin, role)
|
||||
VALUES ('paid-fork', 'test@windmill.dev', 'test-user', true, 'Admin');",
|
||||
)
|
||||
.execute(&db)
|
||||
.await?;
|
||||
let server = ApiServer::start(db.clone()).await?;
|
||||
let api = format!("http://localhost:{}/api/w", server.addr.port());
|
||||
let ws = format!("{api}/test-workspace");
|
||||
|
||||
let resp = post(format!("{ws}/apps/create"))
|
||||
.json(&public_app())
|
||||
.send()
|
||||
.await?;
|
||||
assert_eq!(
|
||||
resp.status(),
|
||||
400,
|
||||
"a free workspace cannot create a public app"
|
||||
);
|
||||
assert!(resp.text().await?.contains("paid plan"));
|
||||
|
||||
// An app made public before the rule: its next version is refused too.
|
||||
let mut app = public_app();
|
||||
app["policy"]["execution_mode"] = json!("publisher");
|
||||
let resp = post(format!("{ws}/apps/create")).json(&app).send().await?;
|
||||
assert_eq!(resp.status(), 201, "{}", resp.text().await?);
|
||||
let resp = post(format!("{ws}/apps/update/{APP_PATH}"))
|
||||
.json(&json!({ "execution_mode": "anonymous" }))
|
||||
.send()
|
||||
.await?;
|
||||
assert_eq!(resp.status(), 400, "an app cannot be switched to public");
|
||||
sqlx::query(
|
||||
"UPDATE app SET policy = jsonb_set(policy, '{execution_mode}', '\"anonymous\"')
|
||||
WHERE path = $1 AND workspace_id = 'test-workspace'",
|
||||
)
|
||||
.bind(APP_PATH)
|
||||
.execute(&db)
|
||||
.await?;
|
||||
let resp = post(format!("{ws}/apps/update/{APP_PATH}"))
|
||||
.json(&json!({ "value": { "grid": [] } }))
|
||||
.send()
|
||||
.await?;
|
||||
assert_eq!(
|
||||
resp.status(),
|
||||
400,
|
||||
"an already-public app cannot be redeployed"
|
||||
);
|
||||
|
||||
// Taking it out of public stays allowed.
|
||||
let resp = post(format!("{ws}/apps/update/{APP_PATH}"))
|
||||
.json(&json!({ "execution_mode": "publisher" }))
|
||||
.send()
|
||||
.await?;
|
||||
assert_eq!(resp.status(), 200, "{}", resp.text().await?);
|
||||
|
||||
let resp = post(format!("{api}/paid-fork/apps/create"))
|
||||
.json(&public_app())
|
||||
.send()
|
||||
.await?;
|
||||
assert_eq!(
|
||||
resp.status(),
|
||||
201,
|
||||
"a fork of a paid root may publish: {}",
|
||||
resp.text().await?
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
@@ -1366,7 +1366,9 @@ async fn update_flow(
|
||||
windmill_common::feature_usage::log_feature_usage("job_token_scopes", "deploy", "step:set");
|
||||
}
|
||||
|
||||
sqlx::query!(
|
||||
// A version is inserted at the path below and nothing else ties it to a live flow: one
|
||||
// written for a flow deleted meanwhile would surface in a flow recreated there.
|
||||
let updated = sqlx::query!(
|
||||
"
|
||||
UPDATE
|
||||
flow
|
||||
@@ -1412,7 +1414,11 @@ async fn update_flow(
|
||||
.await
|
||||
.map_err(|e| {
|
||||
error::Error::internal_err(format!("Error updating flow due to flow update: {e:#}"))
|
||||
})?;
|
||||
})?
|
||||
.rows_affected();
|
||||
if updated == 0 {
|
||||
return Err(Error::NotFound(format!("Flow {flow_path} not found")));
|
||||
}
|
||||
if set_job_token_scopes {
|
||||
windmill_common::scopes::log_job_token_scopes_deploy("flow", job_token_scopes.as_deref());
|
||||
}
|
||||
@@ -1449,10 +1455,14 @@ async fn update_flow(
|
||||
))
|
||||
})?;
|
||||
|
||||
// Flow nodes cascade on the old path's deletion below; runs in flight and the
|
||||
// versions just moved still reference them.
|
||||
// Nodes are referenced by id, so moving them only keeps them deduplicated at the new
|
||||
// path. One a deleted flow left there with the same content stays where it is.
|
||||
sqlx::query!(
|
||||
"UPDATE flow_node SET path = $1 WHERE path = $2 AND workspace_id = $3",
|
||||
"UPDATE flow_node n SET path = $1 WHERE path = $2 AND workspace_id = $3
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM flow_node d
|
||||
WHERE d.path = $1 AND d.workspace_id = $3 AND d.hash_v2 = n.hash_v2
|
||||
)",
|
||||
nf.path,
|
||||
flow_path,
|
||||
w_id
|
||||
@@ -2152,7 +2162,6 @@ async fn delete_flow_by_path(
|
||||
}
|
||||
let mut tx = user_db.begin(&authed).await?;
|
||||
|
||||
// Capture all related data for trashbin before deleting (CASCADE will remove flow_version, flow_node)
|
||||
let trash_flow: Option<serde_json::Value> =
|
||||
sqlx::query_scalar("SELECT to_jsonb(t) FROM flow t WHERE path = $1 AND workspace_id = $2")
|
||||
.bind(path)
|
||||
@@ -2192,15 +2201,18 @@ async fn delete_flow_by_path(
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
sqlx::query!(
|
||||
let deleted = sqlx::query!(
|
||||
"DELETE FROM flow WHERE path = $1 AND workspace_id = $2",
|
||||
path,
|
||||
&w_id
|
||||
)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
.await?
|
||||
.rows_affected();
|
||||
|
||||
if let Some(flow_data) = trash_flow {
|
||||
// Row-level security can let a caller read a flow it may not delete; its versions must
|
||||
// then stay where they are.
|
||||
if let Some(flow_data) = trash_flow.filter(|_| deleted > 0) {
|
||||
let mut trash_data = serde_json::json!({"row": flow_data});
|
||||
if !trash_flow_versions.is_empty() {
|
||||
trash_data["flow_versions"] = serde_json::Value::Array(trash_flow_versions);
|
||||
@@ -2211,7 +2223,7 @@ async fn delete_flow_by_path(
|
||||
if !trash_drafts.is_empty() {
|
||||
trash_data["drafts"] = serde_json::Value::Array(trash_drafts);
|
||||
}
|
||||
windmill_common::trashbin::move_to_trash(
|
||||
let trash_id = windmill_common::trashbin::move_to_trash(
|
||||
&mut *tx,
|
||||
&w_id,
|
||||
"flow",
|
||||
@@ -2220,6 +2232,7 @@ async fn delete_flow_by_path(
|
||||
&authed.username,
|
||||
)
|
||||
.await?;
|
||||
windmill_common::trashbin::set_aside_flow_versions(&mut *tx, &w_id, path, trash_id).await?;
|
||||
}
|
||||
|
||||
if !query.keep_captures.unwrap_or(false) {
|
||||
|
||||
@@ -136,6 +136,51 @@ async fn test_job_run_is_searchable_by_token_and_by_caller(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Paging with the `(timestamp, id)` cursor must return every row once, in `timestamp DESC, id
|
||||
/// DESC` order, even where ids disagree with timestamps (an id is drawn at insert, the timestamp
|
||||
/// at transaction start).
|
||||
#[cfg(all(feature = "enterprise", feature = "private"))]
|
||||
#[sqlx::test(migrations = "../migrations", fixtures("base"))]
|
||||
async fn test_audit_list_cursor_follows_timestamp_order(db: Pool<Postgres>) -> anyhow::Result<()> {
|
||||
initialize_tracing().await;
|
||||
// Hours ahead stay inside the partitions created for the next days.
|
||||
sqlx::query(
|
||||
"INSERT INTO audit_partitioned (workspace_id, id, timestamp, username, operation, action_kind)
|
||||
SELECT 'test-workspace', id, date_trunc('second', now()) + h * interval '1 hour',
|
||||
'test-user', 'cursor.probe', 'create'
|
||||
FROM (VALUES (9000001, 1), (9000002, 3), (9000003, 2), (9000004, 2), (9000005, 1)) v(id, h)",
|
||||
)
|
||||
.execute(&db)
|
||||
.await?;
|
||||
let server = ApiServer::start(db.clone()).await?;
|
||||
let port = server.addr.port();
|
||||
|
||||
let mut seen = vec![];
|
||||
let mut cursor: Vec<(&str, String)> = vec![];
|
||||
loop {
|
||||
let url = format!("http://localhost:{port}/api/w/test-workspace/audit/list");
|
||||
let page = authed(client().get(url))
|
||||
.query(&[("operation", "cursor.probe"), ("per_page", "1")])
|
||||
.query(&cursor)
|
||||
.send()
|
||||
.await?
|
||||
.json::<Vec<serde_json::Value>>()
|
||||
.await?;
|
||||
let Some(row) = page.first() else { break };
|
||||
seen.push(row["id"].as_i64().unwrap());
|
||||
cursor = vec![
|
||||
("before_id", row["id"].to_string()),
|
||||
(
|
||||
"before_id_timestamp",
|
||||
row["timestamp"].as_str().unwrap().to_string(),
|
||||
),
|
||||
];
|
||||
}
|
||||
assert_eq!(seen, [9000002, 9000004, 9000003, 9000005, 9000001]);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The run filter must find a run's entries under each key they keep its id in: the run itself
|
||||
/// (`parameters.uuid`), a cancel (`resource`) and a resume (`parameters.job_id`), and only those.
|
||||
#[cfg(all(feature = "enterprise", feature = "private"))]
|
||||
|
||||
@@ -1324,3 +1324,41 @@ async fn test_create_workspace_validates_chosen_username(db: Pool<Postgres>) ->
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[sqlx::test(migrations = "../migrations", fixtures("base"))]
|
||||
async fn archiving_a_workspace_makes_its_public_apps_private(
|
||||
db: Pool<Postgres>,
|
||||
) -> anyhow::Result<()> {
|
||||
initialize_tracing().await;
|
||||
sqlx::query(
|
||||
"INSERT INTO app (workspace_id, path, summary, policy, versions) VALUES
|
||||
('test-workspace', 'u/test-user/public', '', '{\"execution_mode\": \"anonymous\"}', '{}'),
|
||||
('test-workspace', 'u/test-user/members', '', '{\"execution_mode\": \"publisher\"}', '{}')",
|
||||
)
|
||||
.execute(&db)
|
||||
.await?;
|
||||
let server = ApiServer::start(db.clone()).await?;
|
||||
let port = server.addr.port();
|
||||
|
||||
let resp = authed(client().post(format!(
|
||||
"http://localhost:{port}/api/w/test-workspace/workspaces/archive"
|
||||
)))
|
||||
.send()
|
||||
.await?;
|
||||
assert_eq!(resp.status(), 200, "{}", resp.text().await?);
|
||||
|
||||
let modes: Vec<(String, String)> = sqlx::query_as(
|
||||
"SELECT path, policy->>'execution_mode' FROM app
|
||||
WHERE workspace_id = 'test-workspace' ORDER BY path",
|
||||
)
|
||||
.fetch_all(&db)
|
||||
.await?;
|
||||
assert_eq!(
|
||||
modes,
|
||||
[
|
||||
("u/test-user/members".to_string(), "publisher".to_string()),
|
||||
("u/test-user/public".to_string(), "publisher".to_string()),
|
||||
]
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -8827,6 +8827,7 @@ async fn clone_flows(
|
||||
"SELECT id, workspace_id, path, value, schema, created_by, created_at
|
||||
FROM flow_version
|
||||
WHERE workspace_id = $1
|
||||
AND NOT starts_with(path, '__deleted/')
|
||||
ORDER BY path, created_at",
|
||||
source_workspace_id
|
||||
)
|
||||
@@ -11640,6 +11641,20 @@ pub(crate) async fn archive_workspace_impl(
|
||||
windmill_queue::schedule::clear_schedule(&mut tx, schedule_path, w_id).await?;
|
||||
}
|
||||
|
||||
// Public apps are served without a session, so nothing else about an archived workspace
|
||||
// stops them: take them private. `publisher`, not `viewer`: viewer mode runs as whoever opens
|
||||
// the app and skips its runnable allowlist, which an operator-built app must never get.
|
||||
// Unarchiving does not restore them.
|
||||
let unpublished_apps = sqlx::query!(
|
||||
"UPDATE app SET policy = jsonb_set(policy, '{execution_mode}', '\"publisher\"')
|
||||
WHERE workspace_id = $1 AND policy->>'execution_mode' = 'anonymous'",
|
||||
w_id
|
||||
)
|
||||
.execute(&mut *tx)
|
||||
.await?
|
||||
.rows_affected();
|
||||
tracing::info!("Made {unpublished_apps} public apps private in workspace {w_id}");
|
||||
|
||||
// Delete non-session tokens scoped to this workspace
|
||||
let deleted_tokens = sqlx::query_scalar!(
|
||||
"DELETE FROM token WHERE workspace_id = $1 AND label IS DISTINCT FROM 'session' RETURNING token_prefix",
|
||||
|
||||
@@ -1241,6 +1241,12 @@ pub(crate) async fn delete_workspace(
|
||||
sqlx::query!("DELETE FROM flow WHERE workspace_id = $1", &w_id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
sqlx::query!("DELETE FROM flow_version WHERE workspace_id = $1", &w_id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
sqlx::query!("DELETE FROM flow_node WHERE workspace_id = $1", &w_id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
sqlx::query!("DELETE FROM app WHERE workspace_id = $1", &w_id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: "3.0.3"
|
||||
|
||||
info:
|
||||
version: 1.865.0
|
||||
version: 1.866.0
|
||||
title: Windmill API
|
||||
|
||||
contact:
|
||||
@@ -271,12 +271,21 @@ paths:
|
||||
- name: before_id
|
||||
in: query
|
||||
description: >
|
||||
only return logs with an id strictly lower than this one. Logs are ordered by
|
||||
descending id, so this is a keyset cursor to stream a page in several batches
|
||||
without paying a growing offset.
|
||||
the id half of a keyset cursor. Logs are ordered by descending timestamp then
|
||||
id: pass the last row's id here and its timestamp as before_id_timestamp to
|
||||
stream a page in several batches without paying a growing offset. Alone, it
|
||||
only filters on id < before_id, which can skip or repeat rows across pages.
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
- name: before_id_timestamp
|
||||
in: query
|
||||
description: >
|
||||
the timestamp of the row whose id is before_id: with it, only logs strictly
|
||||
before that row in (timestamp, id) order are returned
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
- name: all_workspaces
|
||||
in: query
|
||||
description: get audit logs for all workspaces
|
||||
|
||||
@@ -378,6 +378,31 @@ fn refuse_guest_mode_where_unavailable(
|
||||
)))
|
||||
}
|
||||
|
||||
/// Whether this workspace may deploy apps that stay public (`Anonymous`). On the
|
||||
/// cloud that takes a paid plan, resolved through the fork/dev root; no workspace
|
||||
/// admin can lift it, unlike `RestrictAnonymousAppDeployment`. Every deploy that
|
||||
/// leaves an app public is refused, not only the transition into it, so a free
|
||||
/// workspace's existing public apps stay frozen until it upgrades.
|
||||
async fn public_apps_allowed(_db: &DB, _w_id: &str) -> Result<bool> {
|
||||
#[cfg(feature = "cloud")]
|
||||
if *CLOUD_HOSTED {
|
||||
return Ok(
|
||||
windmill_common::workspaces::get_team_plan_status(_db, _w_id)
|
||||
.await?
|
||||
.premium,
|
||||
);
|
||||
}
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
fn public_app_requires_plan(path: &str) -> Error {
|
||||
Error::BadRequest(format!(
|
||||
"app {path} is public (accessible without login), which requires a paid plan on \
|
||||
Windmill Cloud. Upgrade this workspace in Workspace Settings > Premium plans to publish \
|
||||
or update public apps, or change who can open the app."
|
||||
))
|
||||
}
|
||||
|
||||
/// Gate a viewer on the app's `execution_mode`, as far as can be decided without an
|
||||
/// ACL probe. `Ok(true)` means already authorized — anonymous admits anyone, guest
|
||||
/// admits anyone signed in; `Ok(false)` means the caller is a member and still owes
|
||||
@@ -2853,6 +2878,11 @@ async fn create_app_internal<'a>(
|
||||
"Summary must be less than 300 characters on cloud".to_string(),
|
||||
));
|
||||
}
|
||||
if app.policy.execution_mode() == ExecutionMode::Anonymous
|
||||
&& !public_apps_allowed(&db, w_id).await?
|
||||
{
|
||||
return Err(public_app_requires_plan(&app.path));
|
||||
}
|
||||
}
|
||||
// Resolve the on-behalf-of defaults on the (non-RLS) pool *before* opening
|
||||
// the RLS transaction below: doing these lookups mid-transaction would hold
|
||||
@@ -3878,6 +3908,10 @@ async fn update_app_internal<'a>(
|
||||
}
|
||||
}
|
||||
|
||||
// Resolved before the transaction for the reason above; checked against the row
|
||||
// as written, once every field below has landed.
|
||||
let public_apps_allowed = public_apps_allowed(&db, w_id).await?;
|
||||
|
||||
let mut tx = user_db.clone().begin(&authed).await?;
|
||||
|
||||
// `app_version.raw_app` is set by whichever endpoint writes the version, so a
|
||||
@@ -4232,6 +4266,19 @@ async fn update_app_internal<'a>(
|
||||
)));
|
||||
}
|
||||
};
|
||||
if !public_apps_allowed
|
||||
&& sqlx::query_scalar!(
|
||||
"SELECT policy->>'execution_mode' = 'anonymous' FROM app
|
||||
WHERE path = $1 AND workspace_id = $2",
|
||||
npath,
|
||||
w_id
|
||||
)
|
||||
.fetch_one(&mut *tx)
|
||||
.await?
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return Err(public_app_requires_plan(&npath));
|
||||
}
|
||||
// CLI / git-sync deploys ask us to preserve any existing user draft at this
|
||||
// path instead of wiping it as part of the deploy. Only wipe the deployer's
|
||||
// own draft (plus the legacy NULL-email row) — see create_app_internal.
|
||||
|
||||
@@ -484,7 +484,16 @@ pub async fn wait_for_migrations(
|
||||
"This worker is on Windmill version {GIT_VERSION} (migration version {latest_version}). Only servers run migrations. Waiting for a server with version >= {GIT_VERSION} to apply the migration..."
|
||||
);
|
||||
|
||||
let mut attempts = 0;
|
||||
// During a rolling upgrade, new workers start at the same time as the new
|
||||
// server, which needs a while to come up and migrate. Exiting early only
|
||||
// makes the pod restart and look like a crash loop, so wait long enough to
|
||||
// cover a normal rollout and only give up if the server is truly not coming.
|
||||
const RECHECK_SECS: u64 = 3;
|
||||
// Over 12 rollouts (3,430 worker starts) the longest wait was 94s and
|
||||
// p99 47s; 3 minutes covers that with margin.
|
||||
const MAX_WAIT_SECS: u64 = 3 * 60;
|
||||
const LOG_EVERY: u64 = 10;
|
||||
let mut attempts: u64 = 0;
|
||||
|
||||
loop {
|
||||
let is_applied: Result<Option<bool>, sqlx::Error> =
|
||||
@@ -500,16 +509,19 @@ pub async fn wait_for_migrations(
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
Ok(_) => {
|
||||
Ok(_) if attempts % LOG_EVERY == 0 => {
|
||||
tracing::info!(
|
||||
"Database not up to date yet. This worker (Windmill {GIT_VERSION}, migration version {latest_version}) is waiting for a server with version >= {GIT_VERSION} to run the migration. Rechecking in 3s..."
|
||||
"Database not up to date yet. This worker (Windmill {GIT_VERSION}, migration version {latest_version}) is waiting for a server with version >= {GIT_VERSION} to run the migration. Waited {}s so far, giving up after {MAX_WAIT_SECS}s...",
|
||||
attempts * RECHECK_SECS
|
||||
);
|
||||
}
|
||||
Err(e) => {
|
||||
Ok(_) => {}
|
||||
Err(e) if attempts % LOG_EVERY == 0 => {
|
||||
tracing::info!(
|
||||
"Could not check migration status (migrations table may not exist yet): {e:#}. Rechecking in 3s..."
|
||||
"Could not check migration status (migrations table may not exist yet): {e:#}. Rechecking every {RECHECK_SECS}s..."
|
||||
);
|
||||
}
|
||||
Err(_) => {}
|
||||
}
|
||||
|
||||
tokio::select! {
|
||||
@@ -517,13 +529,13 @@ pub async fn wait_for_migrations(
|
||||
tracing::info!("Killpill received, stopping migration wait");
|
||||
return Ok(());
|
||||
}
|
||||
_ = tokio::time::sleep(std::time::Duration::from_secs(3)) => {}
|
||||
_ = tokio::time::sleep(std::time::Duration::from_secs(RECHECK_SECS)) => {}
|
||||
}
|
||||
|
||||
attempts += 1;
|
||||
if attempts >= 10 {
|
||||
if attempts * RECHECK_SECS >= MAX_WAIT_SECS {
|
||||
tracing::error!(
|
||||
"Timed out after 10 attempts waiting for migration version {latest_version}. Exiting."
|
||||
"Timed out after {MAX_WAIT_SECS}s waiting for migration version {latest_version}. Exiting."
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
@@ -921,7 +921,7 @@ async fn offboard_user_from_workspace<'c>(
|
||||
).execute(&mut **tx).await?;
|
||||
|
||||
sqlx::query!(
|
||||
r#"UPDATE flow_node SET path = REGEXP_REPLACE(path, 'u/' || $2 || '/(.*)', $1 || '/\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3"#,
|
||||
r#"UPDATE flow_node SET path = REGEXP_REPLACE(path, 'u/' || $2 || '/(.*)', $1 || '/\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3 AND NOT EXISTS (SELECT 1 FROM flow_node d WHERE d.workspace_id = $3 AND d.hash_v2 = flow_node.hash_v2 AND d.path = REGEXP_REPLACE(flow_node.path, 'u/' || $2 || '/(.*)', $1 || '/\1'))"#,
|
||||
&new_prefix, username, w_id
|
||||
).execute(&mut **tx).await?;
|
||||
|
||||
|
||||
@@ -258,6 +258,8 @@ async fn restore_flow(tx: &mut sqlx::PgConnection, item: &TrashItemWithData) ->
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
trashbin::restore_flow_versions(&mut *tx, &item.workspace_id, &item.item_path, item.id).await?;
|
||||
|
||||
// Restore flow_versions
|
||||
if let Some(versions) = data.get("flow_versions").and_then(|v| v.as_array()) {
|
||||
for version in versions {
|
||||
|
||||
@@ -799,7 +799,7 @@ async fn update_username_in_workpsace<'c>(
|
||||
.await?;
|
||||
|
||||
sqlx::query!(
|
||||
r#"UPDATE flow_node SET path = REGEXP_REPLACE(path,'u/' || $2 || '/(.*)','u/' || $1 || '/\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3"#,
|
||||
r#"UPDATE flow_node SET path = REGEXP_REPLACE(path,'u/' || $2 || '/(.*)','u/' || $1 || '/\1') WHERE path LIKE ('u/' || $2 || '/%') AND workspace_id = $3 AND NOT EXISTS (SELECT 1 FROM flow_node d WHERE d.workspace_id = $3 AND d.hash_v2 = flow_node.hash_v2 AND d.path = REGEXP_REPLACE(flow_node.path,'u/' || $2 || '/(.*)','u/' || $1 || '/\1'))"#,
|
||||
new_username,
|
||||
old_username,
|
||||
w_id
|
||||
|
||||
@@ -38,9 +38,11 @@ pub struct ListAuditLogQuery {
|
||||
pub resource: Option<String>,
|
||||
pub before: Option<chrono::DateTime<chrono::Utc>>,
|
||||
pub after: Option<chrono::DateTime<chrono::Utc>>,
|
||||
// Keyset cursor on the `id DESC` ordering. Lets a client stream a page in small batches
|
||||
// without paying a growing OFFSET on every batch.
|
||||
// Keyset cursor on the `timestamp DESC, id DESC` ordering: the id and timestamp of the last
|
||||
// row seen. Lets a client stream a page in small batches without paying a growing OFFSET on
|
||||
// every batch. `before_id` alone filters on the id only.
|
||||
pub before_id: Option<i64>,
|
||||
pub before_id_timestamp: Option<chrono::DateTime<chrono::Utc>>,
|
||||
pub all_workspaces: Option<bool>,
|
||||
// The entries about one run: started, viewed, cancelled, resumed, deleted...
|
||||
pub job_id: Option<sqlx::types::Uuid>,
|
||||
|
||||
@@ -113,19 +113,82 @@ pub async fn get_trash_item<'e, E: sqlx::PgExecutor<'e>>(
|
||||
Ok(item)
|
||||
}
|
||||
|
||||
/// Where a deleted flow's versions wait while it is in the trash. Jobs load versions by id,
|
||||
/// so runs in flight keep working, while every lookup by path (history, relocks, versioned
|
||||
/// runs, renames) stops seeing them. Nodes stay at the flow's path: they are shared by
|
||||
/// content and referenced by id.
|
||||
fn set_aside_path(trash_id: i64) -> String {
|
||||
format!("__deleted/{trash_id}")
|
||||
}
|
||||
|
||||
/// No permission check: the caller must have deleted the flow at `path` itself, in `tx`.
|
||||
pub async fn set_aside_flow_versions(
|
||||
tx: &mut PgConnection,
|
||||
workspace_id: &str,
|
||||
path: &str,
|
||||
trash_id: i64,
|
||||
) -> Result<()> {
|
||||
sqlx::query("UPDATE flow_version SET path = $1 WHERE path = $2 AND workspace_id = $3")
|
||||
.bind(set_aside_path(trash_id))
|
||||
.bind(path)
|
||||
.bind(workspace_id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// No permission check: the caller must have authorized restoring trash item `trash_id`.
|
||||
pub async fn restore_flow_versions(
|
||||
tx: &mut PgConnection,
|
||||
workspace_id: &str,
|
||||
path: &str,
|
||||
trash_id: i64,
|
||||
) -> Result<()> {
|
||||
sqlx::query("UPDATE flow_version SET path = $1 WHERE path = $2 AND workspace_id = $3")
|
||||
.bind(path)
|
||||
.bind(set_aside_path(trash_id))
|
||||
.bind(workspace_id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// SQL deleting the trash rows matching `cond` and selecting how many there were, along with
|
||||
/// the versions their flows set aside, except those a queued job still references: those
|
||||
/// are kept for good. `v2_job.runnable_id` has no index, so the queue is read once against
|
||||
/// the set-aside ids: a check correlated per version scans `v2_job` once per version.
|
||||
fn remove_trash_sql(cond: &str) -> String {
|
||||
format!(
|
||||
"WITH removed AS (
|
||||
DELETE FROM trashbin WHERE {cond} RETURNING id, workspace_id, item_kind
|
||||
), aside AS MATERIALIZED (
|
||||
SELECT v.workspace_id, v.id FROM flow_version v JOIN removed r
|
||||
ON r.item_kind = 'flow' AND v.workspace_id = r.workspace_id
|
||||
AND v.path = '__deleted/' || r.id
|
||||
), in_use AS MATERIALIZED (
|
||||
SELECT DISTINCT j.runnable_id AS id
|
||||
FROM v2_job_queue q JOIN v2_job j ON j.id = q.id
|
||||
WHERE q.workspace_id IN (SELECT workspace_id FROM aside)
|
||||
AND j.runnable_id IN (SELECT id FROM aside)
|
||||
), _versions AS (
|
||||
DELETE FROM flow_version v USING aside a
|
||||
WHERE v.workspace_id = a.workspace_id AND v.id = a.id
|
||||
AND NOT EXISTS (SELECT 1 FROM in_use u WHERE u.id = v.id)
|
||||
)
|
||||
SELECT count(*) FROM removed"
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn permanently_delete_item<'e, E: sqlx::PgExecutor<'e>>(
|
||||
db: E,
|
||||
workspace_id: &str,
|
||||
id: i64,
|
||||
) -> Result<()> {
|
||||
let rows = sqlx::query!(
|
||||
"DELETE FROM trashbin WHERE workspace_id = $1 AND id = $2",
|
||||
workspace_id,
|
||||
id,
|
||||
)
|
||||
.execute(db)
|
||||
.await?
|
||||
.rows_affected();
|
||||
let rows: i64 = sqlx::query_scalar(&remove_trash_sql("workspace_id = $1 AND id = $2"))
|
||||
.bind(workspace_id)
|
||||
.bind(id)
|
||||
.fetch_one(db)
|
||||
.await?;
|
||||
|
||||
if rows == 0 {
|
||||
return Err(crate::error::Error::NotFound(
|
||||
@@ -137,19 +200,18 @@ pub async fn permanently_delete_item<'e, E: sqlx::PgExecutor<'e>>(
|
||||
}
|
||||
|
||||
pub async fn empty_trash<'e, E: sqlx::PgExecutor<'e>>(db: E, workspace_id: &str) -> Result<i64> {
|
||||
let rows = sqlx::query!("DELETE FROM trashbin WHERE workspace_id = $1", workspace_id,)
|
||||
.execute(db)
|
||||
.await?
|
||||
.rows_affected();
|
||||
let rows = sqlx::query_scalar(&remove_trash_sql("workspace_id = $1"))
|
||||
.bind(workspace_id)
|
||||
.fetch_one(db)
|
||||
.await?;
|
||||
|
||||
Ok(rows as i64)
|
||||
Ok(rows)
|
||||
}
|
||||
|
||||
pub async fn delete_expired_trash<'e, E: sqlx::PgExecutor<'e>>(db: E) -> Result<i64> {
|
||||
let rows = sqlx::query!("DELETE FROM trashbin WHERE expires_at <= now()")
|
||||
.execute(db)
|
||||
.await?
|
||||
.rows_affected();
|
||||
let rows = sqlx::query_scalar(&remove_trash_sql("expires_at <= now()"))
|
||||
.fetch_one(db)
|
||||
.await?;
|
||||
|
||||
Ok(rows as i64)
|
||||
Ok(rows)
|
||||
}
|
||||
|
||||
@@ -408,26 +408,44 @@ impl GitRepositorySettings {
|
||||
.unwrap_or(LATEST_GIT_SYNC_SCRIPT_PATH)
|
||||
}
|
||||
|
||||
pub fn is_script_meets_min_version(&self, min_version: u32) -> error::Result<bool> {
|
||||
let path = self.effective_script_path();
|
||||
// example: "hub/28102/sync-script-to-git-repo-windmill"
|
||||
let current = path
|
||||
.split("/") // -> ["hub" "28102" "sync-script-to-git-repo-windmill"]
|
||||
.skip(1) // omit "hub"
|
||||
.next() // get numeric id
|
||||
.ok_or(Error::InternalErr(format!(
|
||||
"cannot get script version id from: {}",
|
||||
path
|
||||
)))?
|
||||
.parse()
|
||||
.unwrap_or_else(|e| {
|
||||
tracing::warn!("cannot get script version id from: {}. e: {e}", path);
|
||||
|
||||
u32::MAX
|
||||
});
|
||||
|
||||
Ok(current >= min_version) // this works on assumption that all scripts in hub have sequential ids
|
||||
/// The path a deployment callback job is queued with.
|
||||
pub fn callback_path(&self) -> String {
|
||||
sync_callback_path(self.script_path.as_deref())
|
||||
}
|
||||
|
||||
pub fn is_script_meets_min_version(&self, min_version: u32) -> error::Result<bool> {
|
||||
Ok(sync_script_meets_min_version(
|
||||
&self.callback_path(),
|
||||
min_version,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
/// The path a git sync script (`None` for the latest one) is queued with: parsed when it
|
||||
/// parses. A setting that doesn't parse is kept as written, so its callback is still queued and
|
||||
/// fails visibly in the workspace's runs instead of the repository silently not syncing.
|
||||
pub fn sync_callback_path(script_path: Option<&str>) -> String {
|
||||
let raw = script_path.unwrap_or(LATEST_GIT_SYNC_SCRIPT_PATH);
|
||||
crate::runnable_ref::RunnableRef::from_path(raw, false)
|
||||
.map_or_else(|_| raw.to_string(), |script| script.path().to_string())
|
||||
}
|
||||
|
||||
/// Whether the git sync script queued at `path` (from [`sync_callback_path`]) is at least
|
||||
/// `min_version`. Never fails, so one repository's setting cannot stop the others' dispatch.
|
||||
pub fn sync_script_meets_min_version(path: &str, min_version: u32) -> bool {
|
||||
// Reading the queued path makes `/hub/28102/…` hub 28102. Not `hub_id()`: a workspace path
|
||||
// keeps its second segment as version (`f/28000/…`).
|
||||
let current = path
|
||||
.split('/')
|
||||
.nth(1)
|
||||
.and_then(|id| id.parse().ok())
|
||||
.unwrap_or_else(|| {
|
||||
tracing::warn!("cannot get script version id from: {}", path);
|
||||
|
||||
u32::MAX
|
||||
});
|
||||
|
||||
current >= min_version // this works on assumption that all scripts in hub have sequential ids
|
||||
}
|
||||
|
||||
/// How auto-pull triggers are delivered for a repository.
|
||||
@@ -3937,6 +3955,27 @@ mod tests {
|
||||
DataTableRoleTenants { tenants: list.iter().map(|t| t.to_string()).collect() }
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_script_version_is_the_second_segment_of_the_queued_path() {
|
||||
let meets = |p, min| sync_script_meets_min_version(&sync_callback_path(p), min);
|
||||
assert!(meets(None, 28956));
|
||||
assert!(!meets(Some("hub/28102/sync"), 28103));
|
||||
assert!(!meets(Some("/hub/28102/sync"), 28103));
|
||||
assert!(meets(Some("/hub/28103/sync"), 28103));
|
||||
assert!(!meets(Some("f/28000/sync"), 28103));
|
||||
assert!(meets(Some("u/admin/sync"), 28103));
|
||||
assert!(meets(Some("sync"), 28103));
|
||||
assert!(meets(Some("//hub/28102/sync"), 28103));
|
||||
assert_eq!(
|
||||
sync_callback_path(Some("/hub/28102/sync")),
|
||||
"hub/28102/sync"
|
||||
);
|
||||
assert_eq!(
|
||||
sync_callback_path(Some("//hub/28102/sync")),
|
||||
"//hub/28102/sync"
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "private", feature = "enterprise"))]
|
||||
#[test]
|
||||
fn a_tenant_list_covers_users_groups_folders_and_the_wildcard() {
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
use sqlx::{Pool, Postgres};
|
||||
use windmill_common::trashbin::{delete_expired_trash, set_aside_flow_versions};
|
||||
|
||||
/// A deleted flow's versions must survive its trash entry while a queued job references
|
||||
/// them, whatever path that job was queued under, and nothing else at the path is touched.
|
||||
#[sqlx::test(migrations = "../migrations", fixtures("base"))]
|
||||
async fn expired_trash_purges_set_aside_versions_no_queued_job_uses(db: Pool<Postgres>) {
|
||||
sqlx::raw_sql(
|
||||
"INSERT INTO flow_version (id, workspace_id, path, value, created_by) VALUES
|
||||
(100, 'test-workspace', 'f/t/a', '{}', 'u'),
|
||||
(101, 'test-workspace', 'f/t/a', '{}', 'u'),
|
||||
(200, 'test-workspace', 'f/t/a', '{}', 'u');
|
||||
WITH job AS (
|
||||
INSERT INTO v2_job (id, workspace_id, kind, runnable_path, runnable_id)
|
||||
VALUES (gen_random_uuid(), 'test-workspace', 'unassigned_flow', 'f/t/renamed', 100)
|
||||
RETURNING id
|
||||
)
|
||||
INSERT INTO v2_job_queue (id, workspace_id, scheduled_for) SELECT id, 'test-workspace', now() FROM job",
|
||||
)
|
||||
.execute(&db)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let mut tx = db.begin().await.unwrap();
|
||||
let trash_id: i64 = sqlx::query_scalar(
|
||||
"INSERT INTO trashbin (workspace_id, item_kind, item_path, item_data, deleted_by, expires_at)
|
||||
VALUES ('test-workspace', 'flow', 'f/t/a', '{}', 'u', now() - interval '1 second') RETURNING id",
|
||||
)
|
||||
.fetch_one(&mut *tx)
|
||||
.await
|
||||
.unwrap();
|
||||
set_aside_flow_versions(&mut tx, "test-workspace", "f/t/a", trash_id)
|
||||
.await
|
||||
.unwrap();
|
||||
// A flow recreated at the path after the deletion.
|
||||
sqlx::query(
|
||||
"INSERT INTO flow_version (id, workspace_id, path, value, created_by)
|
||||
VALUES (300, 'test-workspace', 'f/t/a', '{}', 'u')",
|
||||
)
|
||||
.execute(&mut *tx)
|
||||
.await
|
||||
.unwrap();
|
||||
tx.commit().await.unwrap();
|
||||
|
||||
assert_eq!(delete_expired_trash(&db).await.unwrap(), 1);
|
||||
|
||||
let left: Vec<(i64, String)> = sqlx::query_as("SELECT id, path FROM flow_version ORDER BY id")
|
||||
.fetch_all(&db)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
left,
|
||||
vec![
|
||||
(100, format!("__deleted/{trash_id}")),
|
||||
(300, "f/t/a".to_string())
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -4868,23 +4868,34 @@ async fn clone_runnable(j: &mut PulledJob, db: &DB) -> error::Result<()> {
|
||||
// An app is relocked in place: a raw app's bundle is stored under its version id,
|
||||
// so a copy minted here could never be published.
|
||||
JobKind::Dependencies | JobKind::AppDependencies => *base_hash,
|
||||
JobKind::FlowDependencies => {
|
||||
sqlx::query_scalar!(
|
||||
"INSERT INTO flow_version
|
||||
(workspace_id, path, value, schema, created_by)
|
||||
// The flow row is locked so that a concurrent delete or rename either waits for the
|
||||
// copy and moves it with the flow's other versions, or wins and no copy is made: one
|
||||
// committed after it would sit at the path of a flow recreated there. A rename first
|
||||
// updates the row without changing its key, which `FOR KEY SHARE` would not wait for.
|
||||
JobKind::FlowDependencies => sqlx::query_scalar!(
|
||||
"INSERT INTO flow_version
|
||||
(workspace_id, path, value, schema, created_by)
|
||||
|
||||
SELECT workspace_id, path, value, schema, created_by
|
||||
FROM flow_version WHERE path = $1 AND workspace_id = $2 AND id = $3
|
||||
SELECT v.workspace_id, v.path, v.value, v.schema, v.created_by
|
||||
FROM flow_version v
|
||||
JOIN flow f ON f.workspace_id = v.workspace_id AND f.path = v.path
|
||||
WHERE v.path = $1 AND v.workspace_id = $2 AND v.id = $3
|
||||
FOR SHARE OF f
|
||||
|
||||
RETURNING id
|
||||
",
|
||||
j.runnable_path(),
|
||||
j.workspace_id,
|
||||
*base_hash,
|
||||
)
|
||||
.fetch_one(db)
|
||||
.await?
|
||||
}
|
||||
RETURNING id
|
||||
",
|
||||
j.runnable_path(),
|
||||
j.workspace_id,
|
||||
*base_hash,
|
||||
)
|
||||
.fetch_optional(db)
|
||||
.await?
|
||||
.ok_or_else(|| {
|
||||
Error::NotFound(format!(
|
||||
"Flow {} was deleted before its relock",
|
||||
j.runnable_path()
|
||||
))
|
||||
})?,
|
||||
_ => *base_hash,
|
||||
};
|
||||
|
||||
|
||||
@@ -2944,13 +2944,15 @@ async fn fetch_root_flow_env(
|
||||
flow_job_id: Uuid,
|
||||
workspace_id: &str,
|
||||
) -> Result<Option<HashMap<String, Box<RawValue>>>, sqlx::Error> {
|
||||
// Versions are matched by id alone (a deleted flow's are set aside off its path); only
|
||||
// these kinds hold a flow version in `runnable_id`.
|
||||
sqlx::query_scalar!(
|
||||
r#"WITH RECURSIVE chain(id, parent_job, flow_innermost_root_job, runnable_id, runnable_path, raw_flow, depth) AS (
|
||||
SELECT id, parent_job, flow_innermost_root_job, runnable_id, runnable_path, raw_flow, 0
|
||||
r#"WITH RECURSIVE chain(id, parent_job, flow_innermost_root_job, runnable_id, kind, raw_flow, depth) AS (
|
||||
SELECT id, parent_job, flow_innermost_root_job, runnable_id, kind, raw_flow, 0
|
||||
FROM v2_job
|
||||
WHERE id = $1 AND workspace_id = $2
|
||||
UNION ALL
|
||||
SELECT j.id, j.parent_job, j.flow_innermost_root_job, j.runnable_id, j.runnable_path, j.raw_flow, c.depth + 1
|
||||
SELECT j.id, j.parent_job, j.flow_innermost_root_job, j.runnable_id, j.kind, j.raw_flow, c.depth + 1
|
||||
FROM v2_job j
|
||||
JOIN chain c
|
||||
ON j.id = COALESCE(c.flow_innermost_root_job, c.parent_job)
|
||||
@@ -2966,7 +2968,7 @@ async fn fetch_root_flow_env(
|
||||
FROM chain
|
||||
LEFT JOIN flow_version
|
||||
ON flow_version.id = chain.runnable_id
|
||||
AND flow_version.path = chain.runnable_path
|
||||
AND chain.kind IN ('flow', 'unassigned_flow')
|
||||
AND flow_version.workspace_id = $2
|
||||
WHERE (CASE
|
||||
WHEN flow_version.id IS NOT NULL THEN flow_version.value -> 'flow_env'
|
||||
|
||||
+1
-1
@@ -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.865.0";
|
||||
export const VERSION = "v1.866.0";
|
||||
|
||||
export async function login(email: string, password: string): Promise<string> {
|
||||
return await windmill.UserService.login({
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@windmill-labs/chat-sdk",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@windmill-labs/chat-sdk",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@ai-sdk/react": "^4.0.102",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@windmill-labs/chat-sdk",
|
||||
"description": "Build chat interfaces on Windmill flows deployed in chat mode, from any frontend or raw app",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"author": "Ruben Fiszel",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://github.com/windmill-labs/windmill/tree/main/chat-sdk#readme",
|
||||
|
||||
@@ -10,4 +10,4 @@ export const WM_FORK_PREFIX = "wm-fork";
|
||||
// (e.g. utils.ts) can read it without importing main.ts and creating a circular
|
||||
// dependency (main → workspace → utils → main) that triggers a TDZ.
|
||||
// Re-exported from main.ts for backwards compatibility.
|
||||
export const VERSION = "1.865.0";
|
||||
export const VERSION = "1.866.0";
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@windmill-labs/components",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@windmill-labs/components",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@windmill-labs/components",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"dev:ui-builder": "mv static/ui_builder static/ui_builder.dev-disabled 2>/dev/null || true ; trap 'mv static/ui_builder.dev-disabled static/ui_builder 2>/dev/null || true' EXIT ; vite dev",
|
||||
|
||||
@@ -854,12 +854,41 @@
|
||||
|
||||
if (result.success) {
|
||||
deploymentStatus[statusKey] = { status: 'deployed' }
|
||||
if (kind === 'folder' && !removes) {
|
||||
warnOnAddedFolderOwners(path, workspaceFrom, workspaceToDeployTo)
|
||||
}
|
||||
} else {
|
||||
deploymentStatus[statusKey] = { status: 'failed', error: result.error }
|
||||
sendUserToast(`Failed to deploy ${statusKey}: ${result.error}`, 'error')
|
||||
}
|
||||
}
|
||||
|
||||
// A non-admin can't drop their own ownership of a folder (the folder UPDATE policy
|
||||
// rejects a row they don't own), so updateFolder keeps them as an owner. The folder then
|
||||
// never matches its source, and the conflict comes back on every compare unless we say why.
|
||||
async function warnOnAddedFolderOwners(path: string, workspaceFrom: string, workspaceTo: string) {
|
||||
const name = path.replace(/^f\//, '')
|
||||
try {
|
||||
const [source, target, me] = await Promise.all([
|
||||
FolderService.getFolder({ workspace: workspaceFrom, name }),
|
||||
FolderService.getFolder({ workspace: workspaceTo, name }),
|
||||
UserService.whoami({ workspace: workspaceTo })
|
||||
])
|
||||
const owner = `u/${me.username}`
|
||||
if (!me.is_admin && target.owners.includes(owner) && !source.owners.includes(owner)) {
|
||||
sendUserToast(
|
||||
`${path} still differs in ${workspaceTo}: it kept ${owner} as owner, because a non-admin can't remove their own ownership of a folder. To clear it, make ${owner} owner of ${path} in ${workspaceFrom} too, or deploy as an admin of ${workspaceTo}.`,
|
||||
'warning',
|
||||
[],
|
||||
undefined,
|
||||
15000
|
||||
)
|
||||
}
|
||||
} catch {
|
||||
// The deploy itself succeeded; the next compare still shows the difference.
|
||||
}
|
||||
}
|
||||
|
||||
let deploymentErrorMessage = $state('')
|
||||
// The override acknowledges the outdated items listed next to it, not the
|
||||
// selection, so it holds while every outdated item is one the user ticked it
|
||||
|
||||
@@ -25,8 +25,8 @@ const MAX_PER_PAGE = 1000
|
||||
/**
|
||||
* Loads the newest audit logs, optionally streaming them in smaller batches so rows show up as
|
||||
* they arrive on instances where a full load takes a long time to come back, and appends older
|
||||
* ones on demand. Rows are ordered by descending id, so every batch after the first follows a
|
||||
* `before_id` cursor.
|
||||
* ones on demand. Rows are ordered by descending timestamp then id, so every batch after the
|
||||
* first follows a cursor on the last row's (timestamp, id).
|
||||
*/
|
||||
export function useAuditLogsLoader(args: () => AuditLogsLoaderArgs) {
|
||||
let logs: AuditLog[] | undefined = $state()
|
||||
@@ -45,12 +45,14 @@ export function useAuditLogsLoader(args: () => AuditLogsLoaderArgs) {
|
||||
function fetchBatch(
|
||||
a: AuditLogsLoaderArgs,
|
||||
limit: number,
|
||||
beforeId: number | undefined
|
||||
cursor: AuditLog | undefined
|
||||
): CancelablePromise<AuditLog[]> {
|
||||
return AuditService.listAuditLogs({
|
||||
workspace: a.scope === 'instance' ? 'global' : a.workspace!,
|
||||
perPage: limit,
|
||||
beforeId,
|
||||
beforeId: cursor?.id,
|
||||
// Passed back as received: the server's microseconds would not survive a `Date`.
|
||||
beforeIdTimestamp: cursor?.timestamp,
|
||||
before: a.before,
|
||||
after: a.after,
|
||||
username: a.username === 'all' ? undefined : a.username,
|
||||
@@ -105,8 +107,8 @@ export function useAuditLogsLoader(args: () => AuditLogsLoaderArgs) {
|
||||
const acc: AuditLog[] = []
|
||||
let slowBatchToastShown = false
|
||||
|
||||
function loadBatch(beforeId: number | undefined): CancelablePromise<void> {
|
||||
let fetch = fetchBatch(a, size, beforeId)
|
||||
function loadBatch(cursor: AuditLog | undefined): CancelablePromise<void> {
|
||||
let fetch = fetchBatch(a, size, cursor)
|
||||
if (isBatched && size > 1) {
|
||||
fetch = CancelablePromiseUtils.onTimeout(fetch, 4000, () => {
|
||||
if (slowBatchToastShown) return
|
||||
@@ -132,7 +134,7 @@ export function useAuditLogsLoader(args: () => AuditLogsLoaderArgs) {
|
||||
hasMore = acc.length >= total
|
||||
return CancelablePromiseUtils.pure<void>(undefined)
|
||||
}
|
||||
return loadBatch(rows[rows.length - 1].id)
|
||||
return loadBatch(rows[rows.length - 1])
|
||||
})
|
||||
}
|
||||
|
||||
@@ -221,8 +223,8 @@ export function useAuditLogsLoader(args: () => AuditLogsLoaderArgs) {
|
||||
|
||||
// Rows are appended as each batch lands, so stopping keeps them and the next load-more
|
||||
// continues from the last one.
|
||||
function extraBatch(beforeId: number): CancelablePromise<void> {
|
||||
return CancelablePromiseUtils.then(fetchBatch(a, size, beforeId), (rows) => {
|
||||
function extraBatch(cursor: AuditLog): CancelablePromise<void> {
|
||||
return CancelablePromiseUtils.then(fetchBatch(a, size, cursor), (rows) => {
|
||||
const kept = rows.slice(0, total - appended)
|
||||
appended += kept.length
|
||||
logs = [...(logs ?? []), ...kept]
|
||||
@@ -233,11 +235,11 @@ export function useAuditLogsLoader(args: () => AuditLogsLoaderArgs) {
|
||||
hasMore = false
|
||||
return CancelablePromiseUtils.pure<void>(undefined)
|
||||
}
|
||||
return extraBatch(rows[rows.length - 1].id)
|
||||
return extraBatch(rows[rows.length - 1])
|
||||
})
|
||||
}
|
||||
|
||||
let promise = CancelablePromiseUtils.onTimeout(extraBatch(last.id), 4000, () => {
|
||||
let promise = CancelablePromiseUtils.onTimeout(extraBatch(last), 4000, () => {
|
||||
const smaller = total > SMALL_BATCH_SIZE ? SMALL_BATCH_SIZE : 1
|
||||
const offerBatches = size === total && total > 1
|
||||
sendUserToast('Loading more audit logs is taking longer than expected...', 'warning', [
|
||||
|
||||
@@ -3553,10 +3553,13 @@ export const globalTools: SessionTool<{}>[] = [
|
||||
} else if (read.success === false) {
|
||||
toolCallbacks.setToolStatus(toolId, { content: read.error, error: read.error })
|
||||
} else {
|
||||
const readsAgent = read.value?.resource_type === 'ai_agent'
|
||||
const noun = readsAgent ? 'agent' : type
|
||||
toolCallbacks.setToolStatus(toolId, {
|
||||
content: read.isDraft
|
||||
? `Read draft ${type} "${parsed.path}"`
|
||||
: `Read ${type} "${parsed.path}"`
|
||||
? `Read draft ${noun} "${parsed.path}"`
|
||||
: `Read ${noun} "${parsed.path}"`,
|
||||
readsAgent
|
||||
})
|
||||
}
|
||||
return text
|
||||
@@ -7009,8 +7012,12 @@ async function deployDraft(
|
||||
throw new Error(`Draft ${type} "${path}" has no value to deploy.`)
|
||||
}
|
||||
|
||||
const noun =
|
||||
type === 'resource' && (draft.value as CreateResource).resource_type === 'ai_agent'
|
||||
? 'agent'
|
||||
: type
|
||||
toolCallbacks.setToolStatus(toolId, {
|
||||
content: `Deploying ${type} "${path}"...`
|
||||
content: `Deploying ${noun} "${path}"...`
|
||||
})
|
||||
|
||||
let actions: ToolDisplayAction[] | undefined
|
||||
@@ -7361,7 +7368,7 @@ async function deployDraft(
|
||||
}
|
||||
|
||||
toolCallbacks.setToolStatus(toolId, {
|
||||
content: `Deployed ${type} "${path}"`,
|
||||
content: `Deployed ${noun} "${path}"`,
|
||||
result: 'Deployed',
|
||||
actions
|
||||
})
|
||||
|
||||
@@ -704,6 +704,8 @@ export type ToolDisplayMessage = {
|
||||
autoCollapseDetails?: boolean
|
||||
isStreamingArguments?: boolean
|
||||
toolName?: string
|
||||
/** A `read_workspace_item` call that found an agent: the tool's `type` only says resource. */
|
||||
readsAgent?: boolean
|
||||
/** What marks this row with its provider. Recorded rather than looked up, because the
|
||||
* server listing lives only in memory and a reloaded transcript does not have it. The
|
||||
* workspace rides along: a chat is readable from any workspace, and the same path names
|
||||
|
||||
@@ -290,6 +290,18 @@ describe('groupToolRuns', () => {
|
||||
expect(header([mcp('list_issues'), other])).toBe('List issues, get issue')
|
||||
})
|
||||
|
||||
it('counts agent reads apart from other workspace item reads', () => {
|
||||
const read = { type: 'resource', path: 'f/a/x' }
|
||||
const agent = { readsAgent: true }
|
||||
expect(
|
||||
header([
|
||||
tool('read_workspace_item', read, agent),
|
||||
tool('read_workspace_item', read, agent),
|
||||
tool('read_workspace_item', read)
|
||||
])
|
||||
).toBe('Read 2 agents, read workspace item')
|
||||
})
|
||||
|
||||
it('names the first three kinds of call and leaves the rest to `more`', () => {
|
||||
const group = groupToolRuns([
|
||||
tool('search_workspace'),
|
||||
|
||||
@@ -348,6 +348,7 @@ function mcpServerPath(call: ToolDisplayMessage): string | undefined {
|
||||
}
|
||||
|
||||
function callName(call: ToolDisplayMessage): string {
|
||||
if (call.readsAgent) return 'read agent'
|
||||
const mcpTool = call.parameters?.tool
|
||||
const name =
|
||||
call.toolName === 'call_mcp_read_tool' && typeof mcpTool === 'string'
|
||||
@@ -375,6 +376,7 @@ const COUNTED_VERBS = new Set(['read', 'inspect'])
|
||||
function repeated(name: string, n: number): string {
|
||||
if (n === 1) return name
|
||||
const [verb, ...rest] = name.split(' ')
|
||||
if (name === 'read agent') return `read ${n} agents`
|
||||
return COUNTED_VERBS.has(verb) && rest.length > 0
|
||||
? `${verb} ${n} ${rest.join(' ')}`
|
||||
: `${name} ${n} times`
|
||||
|
||||
@@ -75,6 +75,12 @@
|
||||
canUserBypassRuleKind('RestrictGuestAppDeployment', $userStore ?? undefined))
|
||||
)
|
||||
|
||||
// The server refuses every deploy that leaves an app public on a free cloud workspace, so an
|
||||
// already-public app can only be switched away from it. Read for `workspace`, which a session
|
||||
// editor can set to another workspace than the one navigated to.
|
||||
let premium = $state<boolean | undefined>(undefined)
|
||||
let publicNeedsPlan = $derived(isCloudHosted() && premium === false)
|
||||
|
||||
let guestUsage = $state<GuestUsage | undefined>(undefined)
|
||||
// The backend decides; the hostname stands in until it answers, the shared cloud being the
|
||||
// only deployment where guests are unavailable.
|
||||
@@ -84,6 +90,11 @@
|
||||
let secretUrl: string | undefined = $state(undefined)
|
||||
|
||||
function load() {
|
||||
if (isCloudHosted()) {
|
||||
WorkspaceService.getIsPremium({ workspace })
|
||||
.then((p) => (premium = p))
|
||||
.catch(() => (premium = undefined))
|
||||
}
|
||||
WorkspaceService.getGuestUsage({ workspace })
|
||||
.then((u) => (guestUsage = u))
|
||||
.catch(() => (guestUsage = undefined))
|
||||
@@ -150,7 +161,18 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4">
|
||||
{#if rulesetsLoaded && !canSetAnonymous && mode != 'anonymous'}
|
||||
{#if publicNeedsPlan}
|
||||
<Alert type="info" title="Public apps require a paid plan" size="xs">
|
||||
On Windmill Cloud, publishing or updating an app that anyone can open without signing in
|
||||
requires a paid plan.
|
||||
{#if mode == 'anonymous'}
|
||||
Switch this app to Members to deploy it.
|
||||
{/if}
|
||||
<a href="/workspace_settings?tab=premium" target="_blank" class="underline"
|
||||
>Upgrade this workspace</a
|
||||
>
|
||||
</Alert>
|
||||
{:else if rulesetsLoaded && !canSetAnonymous && mode != 'anonymous'}
|
||||
<Alert type="warning" title="Restricted by a workspace protection rule" size="xs">
|
||||
Opening this app to anyone with the link is restricted to workspace admins and bypass users by
|
||||
a workspace protection rule
|
||||
@@ -191,8 +213,10 @@
|
||||
<ToggleButton
|
||||
label="Public"
|
||||
value="anonymous"
|
||||
disabled={!canSetAnonymous && mode != 'anonymous'}
|
||||
tooltip="Anyone with the secret URL. No login."
|
||||
disabled={mode != 'anonymous' && (publicNeedsPlan || !canSetAnonymous)}
|
||||
tooltip={publicNeedsPlan
|
||||
? 'Requires a paid plan on Windmill Cloud.'
|
||||
: 'Anyone with the secret URL. No login.'}
|
||||
{item}
|
||||
/>
|
||||
{/snippet}
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
import UnreadCountBadge from '$lib/components/common/badge/UnreadCountBadge.svelte'
|
||||
import { buildWorkspaceHierarchy } from '$lib/utils/workspaceHierarchy'
|
||||
import MenuButton, { sidebarClasses } from '$lib/components/sidebar/MenuButton.svelte'
|
||||
import SidebarShowOlder, {
|
||||
SIDEBAR_RECENT_MS
|
||||
} from '$lib/components/sidebar/SidebarShowOlder.svelte'
|
||||
import DropdownV2 from '$lib/components/DropdownV2.svelte'
|
||||
import { userStore, userWorkspaces, workspaceStore } from '$lib/stores'
|
||||
import { workspaceIsFork } from '$lib/utils/workspaceHierarchy'
|
||||
@@ -175,10 +178,9 @@
|
||||
)
|
||||
}
|
||||
|
||||
// Flat list passing the archive + scope filters. Grouping for display happens
|
||||
// in `sessionGroups`; this flat view drives the runtime effect, the unread
|
||||
// total, and keyboard navigation.
|
||||
const visibleSessions = $derived(
|
||||
// Every session passing the archive + scope filters, the ones folded under "Show older"
|
||||
// included.
|
||||
const filteredSessions = $derived(
|
||||
sessionState.sessions.filter((s) => {
|
||||
// A draft Home's composer holds becomes a session when its first send starts, typed
|
||||
// or not. Unsent drafts opened onto an item stay listed: the row is their only way
|
||||
@@ -198,6 +200,25 @@
|
||||
})
|
||||
)
|
||||
|
||||
// With no activity cutoff picked, sessions inactive for over a week fold under a "Show older"
|
||||
// row, except the one on screen. A picked cutoff is the reader's own choice and folds nothing.
|
||||
const showOlder = useLocalStorageValue('windmill_sessions_show_older', false, 'boolean')
|
||||
const olderIds = $derived.by(() => {
|
||||
if (lastActivityDays.val > 0) return new Set<string>()
|
||||
const cutoff = clock - SIDEBAR_RECENT_MS
|
||||
return new Set(
|
||||
filteredSessions
|
||||
.filter((s) => s.id !== activeRowId && sessionLastActivityAt(s) < cutoff)
|
||||
.map((s) => s.id)
|
||||
)
|
||||
})
|
||||
|
||||
// The rows listed. Grouping for display happens in `sessionGroups`; this flat view drives
|
||||
// the runtime effect, the unread total, and keyboard navigation.
|
||||
const visibleSessions = $derived(
|
||||
showOlder.val ? filteredSessions : filteredSessions.filter((s) => !olderIds.has(s.id))
|
||||
)
|
||||
|
||||
// Sessions grouped by workspace family for display, each group by its last turn
|
||||
// start or end, latest first. Family order follows its latest session and is NOT tied
|
||||
// to the current workspace: pinning the active family first reshuffled the
|
||||
@@ -384,7 +405,7 @@
|
||||
// sessions load, the list is empty for every reader, and the fold is a
|
||||
// layout they chose to keep.
|
||||
$effect(() => {
|
||||
if (sessionState.hydrated && visibleSessions.length === 0 && sectionCollapsed.val) {
|
||||
if (sessionState.hydrated && filteredSessions.length === 0 && sectionCollapsed.val) {
|
||||
sectionCollapsed.val = false
|
||||
}
|
||||
})
|
||||
@@ -785,7 +806,7 @@
|
||||
icon={MessageSquare}
|
||||
folded={sectionCollapsed.val}
|
||||
onToggle={() => (sectionCollapsed.val = !sectionCollapsed.val)}
|
||||
disabled={visibleSessions.length === 0}
|
||||
disabled={filteredSessions.length === 0}
|
||||
notify={totalUnread > 0}
|
||||
actions={sectionOptions}
|
||||
{isCollapsed}
|
||||
@@ -1132,6 +1153,15 @@
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
<!-- Outside the listbox, so arrow keys move through sessions only. -->
|
||||
{#if olderIds.size > 0}
|
||||
<SidebarShowOlder
|
||||
count={olderIds.size}
|
||||
expanded={showOlder.val}
|
||||
onToggle={() => (showOlder.val = !showOlder.val)}
|
||||
{rail}
|
||||
/>
|
||||
{/if}
|
||||
{#if selecting}
|
||||
<!-- Pinned to the bottom edge of whatever scrolls the list, the sidebar or the folded
|
||||
section's menu, while the rows scroll under it; z-10 keeps it above the sidebar's
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
import { workspaceIsFork } from '$lib/utils/workspaceHierarchy'
|
||||
import { WorkspaceService } from '$lib/gen'
|
||||
import { sendUserToast } from '$lib/toast'
|
||||
import { truncate } from '$lib/utils'
|
||||
import Toggle from '$lib/components/Toggle.svelte'
|
||||
import { copilotInfo, copilotWorkspace } from '$lib/aiStore'
|
||||
import { loadCopilot } from '$lib/components/copilot/loadCopilot'
|
||||
@@ -356,12 +357,14 @@
|
||||
const bannerClass =
|
||||
'flex flex-row items-center justify-between gap-2 py-2 px-3 text-xs border rounded-md'
|
||||
|
||||
const previewedItemPlaceholder = $derived(
|
||||
previewedItem &&
|
||||
(heldInUse
|
||||
? `Ask about the ${previewedItem.kind} ${previewedItem.name}, or run it…`
|
||||
: `Ask about the ${previewedItem.kind} ${previewedItem.name}, or describe a change…`)
|
||||
)
|
||||
// A placeholder that wraps grows the composer, so a long summary is cut to keep it on one line.
|
||||
const previewedItemPlaceholder = $derived.by(() => {
|
||||
if (!previewedItem) return undefined
|
||||
const item = `${previewedItem.kind} ${truncate(previewedItem.name, 24, '…')}`
|
||||
return heldInUse
|
||||
? `Ask about the ${item}, or run it…`
|
||||
: `Ask about the ${item}, or describe a change…`
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if !session || !runtime}
|
||||
|
||||
@@ -140,6 +140,7 @@ function readMessage(m: Record<string, unknown>, index: number): DisplayMessage
|
||||
tool_call_id: str(m.tool_call_id) ?? `shared-${index}`,
|
||||
content,
|
||||
toolName: str(m.toolName),
|
||||
readsAgent: m.readsAgent === true,
|
||||
parameters: m.parameters,
|
||||
result: m.result,
|
||||
logs: str(m.logs),
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import { useLocalStorageValue } from '$lib/svelte5Utils.svelte'
|
||||
import { agentOfChatPath } from '$lib/components/flows/conversations/agentEditorChat'
|
||||
import { sidebarClasses } from './MenuButton.svelte'
|
||||
import SidebarShowOlder, { SIDEBAR_RECENT_MS } from './SidebarShowOlder.svelte'
|
||||
|
||||
// The reader's own flow and agent chats, the ones a flow's or an agent's own page shows: the
|
||||
// editors' test chats stay with the editors.
|
||||
@@ -22,6 +23,8 @@
|
||||
'boolean'
|
||||
)
|
||||
|
||||
const showOlder = useLocalStorageValue('windmill_ai_chats_show_older', false, 'boolean')
|
||||
|
||||
// Tagged with its workspace: responses are not ordered, and a late one from the workspace
|
||||
// just left must not show here.
|
||||
const listing = resource(
|
||||
@@ -34,7 +37,11 @@
|
||||
kind: 'deployed',
|
||||
mine: true
|
||||
})
|
||||
return { ws, rows }
|
||||
// Listed newest `updated_at` first, which every new message bumps, so the chats active
|
||||
// in the window are a prefix of the page.
|
||||
const since = Date.now() - SIDEBAR_RECENT_MS
|
||||
const recent = rows.findIndex((c) => new Date(c.updated_at).getTime() < since)
|
||||
return { ws, rows, recent: recent === -1 ? rows.length : recent }
|
||||
}
|
||||
)
|
||||
// A chat is started on its flow's or agent's page, so it lists once the reader leaves one.
|
||||
@@ -43,8 +50,19 @@
|
||||
if (!left || left === to?.url.pathname) return
|
||||
if (left.startsWith('/flows/get/') || left.startsWith('/agents/get/')) listing.refetch()
|
||||
})
|
||||
const current = $derived(
|
||||
listing.current && listing.current.ws === $workspaceStore ? listing.current : undefined
|
||||
)
|
||||
const allRows = $derived(current?.rows ?? [])
|
||||
const openId = $derived(page.url.searchParams.get('conversation'))
|
||||
// The open chat always lists, however old.
|
||||
const rows = $derived(
|
||||
listing.current && listing.current.ws === $workspaceStore ? listing.current.rows : []
|
||||
showOlder.val || !current
|
||||
? allRows
|
||||
: allRows.filter((c, i) => i < current.recent || c.id === openId)
|
||||
)
|
||||
const olderCount = $derived(
|
||||
allRows.filter((c, i) => i >= (current?.recent ?? 0) && c.id !== openId).length
|
||||
)
|
||||
|
||||
function target(c: FlowConversation) {
|
||||
@@ -55,11 +73,9 @@
|
||||
href: `/${agent !== undefined ? 'agents' : 'flows'}/get/${agent ?? c.flow_path}?conversation=${c.id}`
|
||||
}
|
||||
}
|
||||
|
||||
const openId = $derived(page.url.searchParams.get('conversation'))
|
||||
</script>
|
||||
|
||||
{#if rows.length > 0}
|
||||
{#if allRows.length > 0}
|
||||
<SidebarSection
|
||||
title="AI chats"
|
||||
icon={MessagesSquare}
|
||||
@@ -95,6 +111,14 @@
|
||||
<span class={rail ? 'sr-only' : 'truncate'}>{c.title || 'Untitled chat'}</span>
|
||||
</a>
|
||||
{/each}
|
||||
{#if olderCount > 0}
|
||||
<SidebarShowOlder
|
||||
count={olderCount}
|
||||
expanded={showOlder.val}
|
||||
onToggle={() => (showOlder.val = !showOlder.val)}
|
||||
{rail}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/snippet}
|
||||
</SidebarSection>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<script module lang="ts">
|
||||
/** How recent a sidebar list's activity must be to show without expanding its older rows. */
|
||||
export const SIDEBAR_RECENT_MS = 7 * 24 * 60 * 60 * 1000
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { Ellipsis } from 'lucide-svelte'
|
||||
import { Button } from '$lib/components/common'
|
||||
|
||||
// The row under a sidebar list that reveals the rows inactive for over a week, and hides them
|
||||
// again.
|
||||
let {
|
||||
count,
|
||||
expanded,
|
||||
onToggle,
|
||||
rail = false
|
||||
}: { count: number; expanded: boolean; onToggle: () => void; rail?: boolean } = $props()
|
||||
|
||||
const label = $derived(expanded ? 'Show less' : `Show ${count} older`)
|
||||
</script>
|
||||
|
||||
<Button
|
||||
unifiedSize="xs"
|
||||
variant="subtle"
|
||||
startIcon={{ icon: Ellipsis }}
|
||||
iconOnly={rail}
|
||||
title={label}
|
||||
aria-label={label}
|
||||
aria-expanded={expanded}
|
||||
onClick={onToggle}
|
||||
btnClasses="justify-start px-2 font-normal text-tertiary hover:text-secondary"
|
||||
>
|
||||
{label}
|
||||
</Button>
|
||||
+1
-1
@@ -4,7 +4,7 @@ verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
wmill = ">=1.865.0"
|
||||
wmill = ">=1.866.0"
|
||||
sendgrid = "*"
|
||||
mysql-connector-python = "*"
|
||||
pymongo = "*"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: '3.0.3'
|
||||
|
||||
info:
|
||||
version: 1.865.0
|
||||
version: 1.866.0
|
||||
title: OpenFlow Spec
|
||||
contact:
|
||||
name: Ruben Fiszel
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
RootModule = 'WindmillClient.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.865.0'
|
||||
ModuleVersion = '1.866.0'
|
||||
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "wmill"
|
||||
version = "1.865.0"
|
||||
version = "1.866.0"
|
||||
description = "A client library for accessing Windmill server wrapping the Windmill client API"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://windmill.dev"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@windmill/windmill",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"exports": "./src/index.ts",
|
||||
"publish": {
|
||||
"exclude": ["!src", "./s3Types.ts", "./sqlUtils.ts", "./client.ts", "./wacError.ts"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "windmill-client",
|
||||
"description": "Windmill SDK client for browsers and Node.js",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"author": "Ruben Fiszel",
|
||||
"license": "Apache 2.0",
|
||||
"homepage": "https://github.com/windmill-labs/windmill/tree/main/typescript-client#readme",
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.865.0
|
||||
1.866.0
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "windmill-yaml-validator",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "windmill-yaml-validator",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"license": "Apache 2.0",
|
||||
"dependencies": {
|
||||
"@stoplight/yaml": "^4.3.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "windmill-yaml-validator",
|
||||
"version": "1.865.0",
|
||||
"version": "1.866.0",
|
||||
"description": "YAML validator for Windmill flow, schedule, and trigger files",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user