Merge branch 'main' into claude/issue-6173-20250713_231304

This commit is contained in:
Ruben Fiszel
2025-07-16 15:13:06 +00:00
25 changed files with 180 additions and 82 deletions
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## [1.507.1](https://github.com/windmill-labs/windmill/compare/v1.507.0...v1.507.1) (2025-07-16)
### Bug Fixes
* nested delete after use in flows ([#6194](https://github.com/windmill-labs/windmill/issues/6194)) ([8247a6c](https://github.com/windmill-labs/windmill/commit/8247a6c684ef57ea417771b3e34794c81c4b904a))
## [1.507.0](https://github.com/windmill-labs/windmill/compare/v1.506.0...v1.507.0) (2025-07-15)
@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE v2_job_status\n SET flow_status = JSONB_SET(flow_status, ARRAY['cleanup_module', 'flow_jobs_to_clean'], COALESCE(flow_status->'cleanup_module'->'flow_jobs_to_clean', '[]'::jsonb) || $1)\n WHERE id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Jsonb",
"Uuid"
]
},
"nullable": []
},
"hash": "4d66f509815a8af4b43abae7119ed377312a80ec08ca9a65cbb71a96ce5959b8"
}
+41 -41
View File
@@ -746,9 +746,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "aws-config"
version = "1.8.1"
version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c18d005c70d2b9c0c1ea8876c039db0ec7fb71164d25c73ccea21bf41fd02171"
checksum = "ebd9b83179adf8998576317ce47785948bcff399ec5b15f4dfbdedd44ddf5b92"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -811,9 +811,9 @@ dependencies = [
[[package]]
name = "aws-runtime"
version = "1.5.8"
version = "1.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f6c68419d8ba16d9a7463671593c54f81ba58cab466e9b759418da606dcc2e2"
checksum = "b2090e664216c78e766b6bac10fe74d2f451c02441d43484cd76ac9a295075f7"
dependencies = [
"aws-credential-types",
"aws-sigv4",
@@ -835,9 +835,9 @@ dependencies = [
[[package]]
name = "aws-sdk-sqs"
version = "1.74.0"
version = "1.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "256b8f7caffe3240a543f60409be9bba23038ceef5933da63e09d89197fc2333"
checksum = "7c27b0a5c8f9f8db35929bde0612d738d8c872ab887232579c61d73dba7a5d17"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -857,9 +857,9 @@ dependencies = [
[[package]]
name = "aws-sdk-sso"
version = "1.74.0"
version = "1.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a69de9c1b9272da2872af60c7402683e7f45c06267735b4332deacb203239b"
checksum = "36d2a4d2753a2304cc0a86cff15581179c420c7b3054c0cbc884a2e497e79ae5"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -879,9 +879,9 @@ dependencies = [
[[package]]
name = "aws-sdk-ssooidc"
version = "1.75.0"
version = "1.76.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0b161d836fac72bdd5ac1a4cd1cdc38ab888c7af26cfd95f661be4409505e63"
checksum = "719f007d6914388e2f14943c663447cfc44bb9d0478bb96df891258ba5145f82"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -901,9 +901,9 @@ dependencies = [
[[package]]
name = "aws-sdk-sts"
version = "1.76.0"
version = "1.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb1cd79a3412751a341a28e2cd0d6fa4345241976da427b075a0c0cd5409f886"
checksum = "2efcc3dbb630f3e0d16a4f79fcd4b3fb1c59cb89f1031c46e44976f640b5de27"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -12721,9 +12721,9 @@ dependencies = [
[[package]]
name = "systemstat"
version = "0.2.4"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "668a4db78b439df482c238f559e4ea869017f9e62ef0a059c8bfcd841a4df544"
checksum = "5021f5184d44b26fb184acd689671bbe1e4bbd24bbdaa6bc7ec383fad32d2033"
dependencies = [
"bytesize",
"lazy_static",
@@ -14676,7 +14676,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windmill"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"axum",
@@ -14728,7 +14728,7 @@ dependencies = [
[[package]]
name = "windmill-api"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"argon2",
@@ -14839,7 +14839,7 @@ dependencies = [
[[package]]
name = "windmill-api-client"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -14854,7 +14854,7 @@ dependencies = [
[[package]]
name = "windmill-audit"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"chrono",
"serde",
@@ -14867,7 +14867,7 @@ dependencies = [
[[package]]
name = "windmill-autoscaling"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"serde",
@@ -14881,7 +14881,7 @@ dependencies = [
[[package]]
name = "windmill-common"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"async-stream",
@@ -14959,7 +14959,7 @@ dependencies = [
[[package]]
name = "windmill-git-sync"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"regex",
"serde",
@@ -14973,7 +14973,7 @@ dependencies = [
[[package]]
name = "windmill-indexer"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"bytes",
@@ -14996,7 +14996,7 @@ dependencies = [
[[package]]
name = "windmill-macros"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"itertools 0.14.0",
"lazy_static",
@@ -15008,7 +15008,7 @@ dependencies = [
[[package]]
name = "windmill-parser"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"convert_case 0.6.0",
"serde",
@@ -15017,7 +15017,7 @@ dependencies = [
[[package]]
name = "windmill-parser-bash"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -15029,7 +15029,7 @@ dependencies = [
[[package]]
name = "windmill-parser-csharp"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"serde_json",
@@ -15041,7 +15041,7 @@ dependencies = [
[[package]]
name = "windmill-parser-go"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"gosyn",
@@ -15053,7 +15053,7 @@ dependencies = [
[[package]]
name = "windmill-parser-graphql"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -15065,7 +15065,7 @@ dependencies = [
[[package]]
name = "windmill-parser-java"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"serde_json",
@@ -15077,7 +15077,7 @@ dependencies = [
[[package]]
name = "windmill-parser-nu"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"nu-parser",
@@ -15088,7 +15088,7 @@ dependencies = [
[[package]]
name = "windmill-parser-php"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"itertools 0.14.0",
@@ -15099,7 +15099,7 @@ dependencies = [
[[package]]
name = "windmill-parser-py"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"itertools 0.14.0",
@@ -15111,7 +15111,7 @@ dependencies = [
[[package]]
name = "windmill-parser-py-imports"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"async-recursion",
@@ -15134,7 +15134,7 @@ dependencies = [
[[package]]
name = "windmill-parser-rust"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"convert_case 0.6.0",
@@ -15151,7 +15151,7 @@ dependencies = [
[[package]]
name = "windmill-parser-sql"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -15165,7 +15165,7 @@ dependencies = [
[[package]]
name = "windmill-parser-ts"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"lazy_static",
@@ -15183,7 +15183,7 @@ dependencies = [
[[package]]
name = "windmill-parser-wasm"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"getrandom 0.2.16",
@@ -15207,7 +15207,7 @@ dependencies = [
[[package]]
name = "windmill-parser-yaml"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"serde_json",
@@ -15217,7 +15217,7 @@ dependencies = [
[[package]]
name = "windmill-queue"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"async-recursion",
@@ -15250,7 +15250,7 @@ dependencies = [
[[package]]
name = "windmill-sql-datatype-parser-wasm"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"wasm-bindgen",
"wasm-bindgen-test",
@@ -15260,7 +15260,7 @@ dependencies = [
[[package]]
name = "windmill-worker"
version = "1.507.0"
version = "1.507.1"
dependencies = [
"anyhow",
"async-recursion",
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "windmill"
version = "1.507.0"
version = "1.507.1"
authors.workspace = true
edition.workspace = true
@@ -32,7 +32,7 @@ members = [
]
[workspace.package]
version = "1.507.0"
version = "1.507.1"
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
edition = "2021"
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.507.0
version: 1.507.1
title: Windmill API
contact:
+21 -2
View File
@@ -15,7 +15,8 @@ use crate::common::{cached_result_path, save_in_cache};
use crate::js_eval::{eval_timeout, IdContext};
use crate::worker_utils::get_tag_and_concurrency;
use crate::{
JobCompletedSender, PreviousResult, SameWorkerSender, SendResultPayload, UpdateFlow, KEEP_JOB_DIR
JobCompletedSender, PreviousResult, SameWorkerSender, SendResultPayload, UpdateFlow,
KEEP_JOB_DIR,
};
use anyhow::Context;
@@ -1191,7 +1192,25 @@ pub async fn update_flow_status_after_job_completion_internal(
append_logs(&flow_job.id, w_id, logs, &db.into()).await;
}
#[cfg(feature = "enterprise")]
if flow_job.parent_job.is_none() {
if let Some(parent_job) = flow_job.parent_job {
// if has parent job, append flow cleanup modules to parent job
if !_cleanup_module.flow_jobs_to_clean.is_empty() {
let uuids_json = serde_json::to_value(&_cleanup_module.flow_jobs_to_clean)
.map_err(|e| {
error::Error::internal_err(format!("Unable to serialize uuids: {e:#}"))
})?;
sqlx::query!(
"UPDATE v2_job_status
SET flow_status = JSONB_SET(flow_status, ARRAY['cleanup_module', 'flow_jobs_to_clean'], COALESCE(flow_status->'cleanup_module'->'flow_jobs_to_clean', '[]'::jsonb) || $1)
WHERE id = $2",
uuids_json,
parent_job
)
.execute(db)
.warn_after_seconds(3)
.await?;
}
} else {
// run the cleanup step only when the root job is complete
if !_cleanup_module.flow_jobs_to_clean.is_empty() {
tracing::debug!(
+1 -1
View File
@@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts";
import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts";
import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts";
export const VERSION = "v1.507.0";
export const VERSION = "v1.507.1";
export async function login(email: string, password: string): Promise<string> {
return await windmill.UserService.login({
+1 -1
View File
@@ -65,7 +65,7 @@ export {
// }
// });
export const VERSION = "1.507.0";
export const VERSION = "1.507.1";
const command = new Command()
.name("wmill")
+7 -1
View File
@@ -81,9 +81,15 @@ function mergeCliWithEffectiveOptions<T extends GlobalOptions & SyncOptions & {
// Always preserve CLI skip flags (they should override config file settings)
if (cliOpts.skipScripts !== undefined) mergedOpts.skipScripts = cliOpts.skipScripts;
if (cliOpts.skipFolders !== undefined) mergedOpts.skipFolders = cliOpts.skipFolders;
if (cliOpts.skipVariables !== undefined) mergedOpts.skipVariables = cliOpts.skipVariables;
if (cliOpts.skipResources !== undefined) mergedOpts.skipResources = cliOpts.skipResources;
if (cliOpts.skipResourceTypes !== undefined) mergedOpts.skipResourceTypes = cliOpts.skipResourceTypes;
if (cliOpts.skipSecrets !== undefined) mergedOpts.skipSecrets = cliOpts.skipSecrets;
if (cliOpts.skipFlows !== undefined) mergedOpts.skipFlows = cliOpts.skipFlows;
if (cliOpts.skipApps !== undefined) mergedOpts.skipApps = cliOpts.skipApps;
if (cliOpts.skipFolders !== undefined) mergedOpts.skipFolders = cliOpts.skipFolders;
return mergedOpts;
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "windmill-components",
"version": "1.507.0",
"version": "1.507.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "windmill-components",
"version": "1.507.0",
"version": "1.507.1",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "windmill-components",
"version": "1.507.0",
"version": "1.507.1",
"scripts": {
"dev": "vite dev",
"build": "vite build",
+5 -4
View File
@@ -17,7 +17,7 @@
} from '$lib/gen'
import { inferArgs } from '$lib/infer'
import { setCopilotInfo, userStore, workspaceStore } from '$lib/stores'
import { emptySchema, sendUserToast } from '$lib/utils'
import { emptySchema, readFieldsRecursively, sendUserToast } from '$lib/utils'
import { Pane, Splitpanes } from 'svelte-splitpanes'
import { onDestroy, onMount, setContext, untrack } from 'svelte'
import DarkModeToggle from '$lib/components/sidebar/DarkModeToggle.svelte'
@@ -513,8 +513,8 @@
return
}
if (!deepEqual(flow, lastSent)) {
lastSent = JSON.parse(JSON.stringify(flow))
window?.parent.postMessage({ type: 'flow', flow, uriPath: lastUriPath }, '*')
lastSent = $state.snapshot(flow)
window?.parent.postMessage({ type: 'flow', flow: lastSent, uriPath: lastUriPath }, '*')
}
}
@@ -525,7 +525,7 @@
return
}
//@ts-ignore
dfs(flowStore.value.modules, async (mod) => {
dfs(flowStore.val.value.modules, async (mod) => {
if (mod.id == selectedIdStore) {
if (
mod.value.type == 'rawscript' ||
@@ -579,6 +579,7 @@
untrack(() => initializeMode())
})
$effect(() => {
readFieldsRecursively(flowStore.val)
flowStore.val && untrack(() => updateFlow(flowStore.val))
})
$effect(() => {
+7 -4
View File
@@ -1273,11 +1273,14 @@
editor?.onDidFocusEditorText(() => {
dispatch('focus')
editor?.addCommand(KeyCode.Escape, function () {
if (showInlineAIChat) {
closeAIInlineWidget()
// for escape we use onkeydown instead of addCommand because addCommand on escape specifically prevents default behavior (like autocomplete cancellation)
editor?.onKeyDown((e) => {
if (e.keyCode === KeyCode.Escape) {
if (showInlineAIChat) {
closeAIInlineWidget()
}
aiChatEditorHandler?.rejectAll()
}
aiChatEditorHandler?.rejectAll()
})
editor?.addCommand(KeyMod.CtrlCmd | KeyCode.DownArrow, function () {
@@ -11,14 +11,27 @@ type CacheCompletion = {
column: number
}
function filterCompletion(completion: string, suffix: string): string | undefined {
function filterCompletion(
completion: string,
suffix: string,
shouldReturnMultiline: boolean
): string | undefined {
const trimmedCompletion = completion.replaceAll('\n', '')
const trimmedSuffix = suffix.slice(0, FIM_MAX_TOKENS).replaceAll('\n', '')
if (trimmedSuffix.startsWith(trimmedCompletion)) {
console.log('suffix starts with completion', suffix, completion)
return
}
if (!shouldReturnMultiline) {
if (completion.startsWith('\n')) {
// TODO improve cache for this case so that we can use cache when accepting the first line of a multiline completion which starts with \n
return completion.split('\n').slice(0, 2).join('\n')
} else {
return completion.split('\n').slice(0, 1).join('\n')
}
}
return completion
}
@@ -48,10 +61,17 @@ export class Autocompletor {
) {
return { items: [] }
}
const shouldReturnMultiline = this.#shouldReturnMultiline(model, position)
const result = await this.#autocomplete(model, position)
if (result) {
const completion = filterCompletion(result.completion, result.suffix)
const completion = filterCompletion(
result.completion,
result.suffix,
shouldReturnMultiline
)
if (!completion) {
return { items: [] }
@@ -112,6 +132,19 @@ export class Autocompletor {
this.#cursorDisposable.dispose()
}
#shouldReturnMultiline(model: meditor.ITextModel, position: Position) {
if (position.column === model.getLineMaxColumn(position.lineNumber)) {
const cachedCompletion = this.#cache.get(position.lineNumber)
if (cachedCompletion) {
const firstCachedLine =
cachedCompletion.linePrefix + cachedCompletion.completion.split('\n')[0]
const lineContent = model.getLineContent(position.lineNumber)
return firstCachedLine === lineContent
}
}
return false
}
async #autocomplete(
model: meditor.ITextModel,
position: Position
@@ -155,14 +188,12 @@ export class Autocompletor {
const modifiedCompletion = cachedCompletion.completion.slice(
position.column - cachedCompletion.column
)
console.debug('autocomplete partial cache hit', modifiedCompletion)
return { completion: modifiedCompletion, suffix }
}
} else if (
position.column === cachedCompletion.column &&
cachedCompletion.linePrefix === linePrefix
) {
console.debug('autocomplete exact cache hit', cachedCompletion.completion)
return { completion: cachedCompletion.completion, suffix }
}
}
@@ -12,6 +12,7 @@
import Markdown from 'svelte-exmarkdown'
import { aiChatManager, AIMode } from './AIChatManager.svelte'
import AIChatInput from './AIChatInput.svelte'
import { getModifierKey } from '$lib/utils'
let {
messages,
@@ -160,6 +161,13 @@
{@render headerRight?.()}
</div>
</div>
{#if messages.length === 0}
<span class="text-2xs text-gray-500 dark:text-gray-400 text-center px-2 my-2"
>You can use {getModifierKey()}L to open or close this chat, and {getModifierKey()}K in the
script editor to modify selected lines.</span
>
{/if}
{#if messages.length > 0}
<div
class="h-full overflow-y-scroll pt-2 pb-12"
+15 -8
View File
@@ -539,6 +539,7 @@ const mistralFimResponseSchema = z.object({
})
export const FIM_MAX_TOKENS = 256
const FIM_MAX_LINES = 8
export async function getFimCompletion(
prompt: string,
suffix: string,
@@ -578,15 +579,21 @@ export async function getFimCompletion(
const choice = parsedBody.choices[0]
if (choice) {
if (choice.finish_reason === 'length' && choice.message.content) {
// take all the lines before the last
const lines = choice.message.content.split('\n')
const joined = lines.slice(0, -1).join('\n')
return joined
} else {
return choice.message.content || ''
if (choice && choice.message.content !== undefined) {
let lines = choice.message.content.split('\n')
// If finish_reason is 'length', remove the last line
if (choice.finish_reason === 'length') {
if (lines.length > 1) {
lines = lines.slice(0, -1)
} else {
lines = []
}
}
lines = lines.slice(0, FIM_MAX_LINES)
return lines.join('\n')
} else {
return undefined
}
@@ -482,6 +482,7 @@ outline-[1px] outline dark:outline-gray-500 outline-gray-300 bg-surface duration
onclick={stopPropagation(
preventDefault((event) => dispatch('delete', { id, type: modType }))
)}
onpointerdown={stopPropagation(preventDefault(() => {}))}
>
<X class="mx-[3px]" size={12} strokeWidth={2} />
</button>
+2 -2
View File
@@ -4,8 +4,8 @@ verify_ssl = true
name = "pypi"
[packages]
wmill = ">=1.507.0"
wmill_pg = ">=1.507.0"
wmill = ">=1.507.1"
wmill_pg = ">=1.507.1"
sendgrid = "*"
mysql-connector-python = "*"
pymongo = "*"
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.507.0
version: 1.507.1
title: OpenFlow Spec
contact:
name: Ruben Fiszel
@@ -12,7 +12,7 @@
RootModule = 'WindmillClient.psm1'
# Version number of this module.
ModuleVersion = '1.507.0'
ModuleVersion = '1.507.1'
# Supported PSEditions
# CompatiblePSEditions = @()
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "wmill"
version = "1.507.0"
version = "1.507.1"
description = "A client library for accessing Windmill server wrapping the Windmill client API"
license = "Apache-2.0"
homepage = "https://windmill.dev"
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "wmill-pg"
version = "1.507.0"
version = "1.507.1"
description = "An extension client for the wmill client library focused on pg"
license = "Apache-2.0"
homepage = "https://windmill.dev"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@windmill/windmill",
"version": "1.507.0",
"version": "1.507.1",
"exports": "./src/index.ts",
"publish": {
"exclude": ["!src", "./s3Types.ts", "./client.ts"]
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "windmill-client",
"description": "Windmill SDK client for browsers and Node.js",
"version": "1.507.0",
"version": "1.507.1",
"author": "Ruben Fiszel",
"license": "Apache 2.0",
"devDependencies": {
+1 -1
View File
@@ -1 +1 @@
1.507.0
1.507.1