diff --git a/CHANGELOG.md b/CHANGELOG.md index 347ae8ba4c..8c891560a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [1.415.1](https://github.com/windmill-labs/windmill/compare/v1.415.0...v1.415.1) (2024-10-31) + + +### Bug Fixes + +* **cli:** improve --instance handling wmill instance push ([cb005a1](https://github.com/windmill-labs/windmill/commit/cb005a15baef4272bc58c7e80a43e44723556d31)) + +## [1.415.0](https://github.com/windmill-labs/windmill/compare/v1.414.2...v1.415.0) (2024-10-31) + + +### Features + +* **cli:** opts.instance as instace name and prefix ([#4609](https://github.com/windmill-labs/windmill/issues/4609)) ([a07f57e](https://github.com/windmill-labs/windmill/commit/a07f57e698107056d045d8d5c2458e04c809fcc8)) + + +### Bug Fixes + +* improve express oauth setup ([ba4aed5](https://github.com/windmill-labs/windmill/commit/ba4aed5bf51c65204332cfc158d0ffd9c7095ec7)) +* improve user resource input ([8c7f53b](https://github.com/windmill-labs/windmill/commit/8c7f53b2ebe0990cd93879258d004ac89dc8b24c)) + ## [1.414.2](https://github.com/windmill-labs/windmill/compare/v1.414.1...v1.414.2) (2024-10-29) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index d8c8ec64be..98c5a7d9a9 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -512,7 +512,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.1.1", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "slab", ] @@ -527,7 +527,7 @@ dependencies = [ "async-io", "async-lock", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "once_cell", ] @@ -541,7 +541,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "parking", "polling", "rustix", @@ -605,7 +605,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "gloo-timers", "kv-log-macro", "log", @@ -1357,7 +1357,7 @@ dependencies = [ "async-channel 2.3.1", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "piper", ] @@ -3556,9 +3556,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210" dependencies = [ "fastrand 2.1.1", "futures-core", @@ -10395,7 +10395,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "axum", @@ -10437,7 +10437,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "argon2", @@ -10522,7 +10522,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.414.2" +version = "1.415.1" dependencies = [ "base64 0.21.7", "chrono", @@ -10540,7 +10540,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.414.2" +version = "1.415.1" dependencies = [ "chrono", "serde", @@ -10553,7 +10553,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "rsmq_async", @@ -10568,7 +10568,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "async-stream", @@ -10614,7 +10614,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.414.2" +version = "1.415.1" dependencies = [ "regex", "rsmq_async", @@ -10629,7 +10629,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "bytes", @@ -10651,7 +10651,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.414.2" +version = "1.415.1" dependencies = [ "itertools 0.13.0", "lazy_static", @@ -10663,7 +10663,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.414.2" +version = "1.415.1" dependencies = [ "convert_case 0.6.0", "serde", @@ -10672,7 +10672,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "lazy_static", @@ -10684,7 +10684,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "gosyn", @@ -10696,7 +10696,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "lazy_static", @@ -10708,7 +10708,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "itertools 0.13.0", @@ -10719,7 +10719,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "itertools 0.13.0", @@ -10730,7 +10730,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "async-recursion", @@ -10748,7 +10748,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -10765,7 +10765,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "lazy_static", @@ -10777,7 +10777,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "lazy_static", @@ -10795,7 +10795,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -10816,7 +10816,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "serde_json", @@ -10826,7 +10826,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "async-recursion", @@ -10859,7 +10859,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.414.2" +version = "1.415.1" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -10869,7 +10869,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.414.2" +version = "1.415.1" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 88d768cd6b..4790b2f114 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.414.2" +version = "1.415.1" authors.workspace = true edition.workspace = true @@ -29,7 +29,7 @@ members = [ ] [workspace.package] -version = "1.414.2" +version = "1.415.1" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 7deeb96c81..701e6f8c61 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.414.2 + version: 1.415.1 title: Windmill API contact: diff --git a/backend/windmill-worker/src/python_executor.rs b/backend/windmill-worker/src/python_executor.rs index a5ebcab856..5333426f37 100644 --- a/backend/windmill-worker/src/python_executor.rs +++ b/backend/windmill-worker/src/python_executor.rs @@ -1054,6 +1054,9 @@ pub async fn handle_python_reqs( let mut req_with_penv: Vec<(String, String)> = vec![]; for req in requirements { + if req.starts_with('#') { + continue; + } let py_prefix = if no_uv_install { PIP_CACHE_DIR } else { diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 2f3ae12ed5..04c135cfad 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.414.2"; +export const VERSION = "v1.415.1"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/instance.ts b/cli/instance.ts index 9f3a8bd025..1e86282d1a 100644 --- a/cli/instance.ts +++ b/cli/instance.ts @@ -183,6 +183,7 @@ export type InstanceSyncOptions = { token?: string; folderPerInstance?: boolean; yes?: boolean; + prefix?: string; }; export async function pickInstance( @@ -202,7 +203,7 @@ export async function pickInstance( name: opts.instance, remote: opts.baseUrl, token: opts.token, - prefix: opts.instance, + prefix: opts.prefix ?? opts.instance, }; } if (opts.baseUrl && opts.token) { @@ -217,7 +218,7 @@ export async function pickInstance( name: "custom", remote: opts.baseUrl, token: opts.token, - prefix: "custom", + prefix: opts.prefix ?? "custom", }; } if (!allowNew && instances.length < 1) { @@ -448,8 +449,8 @@ async function instancePush(opts: GlobalOptions & InstanceSyncOptions) { const rootDir = Deno.cwd(); let localPrefix; - if (opts.baseUrl && opts.token) { - localPrefix = "custom"; + if (opts.prefix) { + localPrefix = opts.prefix; } else { localPrefix = (await Select.prompt({ message: "What is the prefix of the local workspaces you want to sync?", @@ -704,6 +705,11 @@ const command = new Command() "--instance ", "Name of the instance to pull from, override the active instance" ) + .option( + "--prefix ", + "Prefix of the local workspaces to pull, used to create the folders when using --include-workspaces" + ) + .action(instancePull as any) .command("push") .description( @@ -720,6 +726,10 @@ const command = new Command() "--instance ", "Name of the instance to push to, override the active instance" ) + .option( + "--prefix ", + "Prefix of the local workspaces folders to push" + ) .action(instancePush as any) .command("whoami") .description("Display information about the currently logged-in user") diff --git a/cli/main.ts b/cli/main.ts index 2132a818b2..8f27173e1f 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -60,7 +60,7 @@ export { // } // }); -export const VERSION = "1.414.2"; +export const VERSION = "1.415.1"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0eb1a2ec8c..7e2b8bb9e7 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.414.2", + "version": "1.415.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.414.2", + "version": "1.415.1", "license": "AGPL-3.0", "dependencies": { "@aws-crypto/sha256-js": "^4.0.0", diff --git a/frontend/package.json b/frontend/package.json index f4dc37ce2f..181c8ecf9a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.414.2", + "version": "1.415.1", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/frontend/src/lib/components/LightweightResourcePicker.svelte b/frontend/src/lib/components/LightweightResourcePicker.svelte index 6ab25812f1..6b3e13c916 100644 --- a/frontend/src/lib/components/LightweightResourcePicker.svelte +++ b/frontend/src/lib/components/LightweightResourcePicker.svelte @@ -7,9 +7,10 @@ import DarkModeObserver from './DarkModeObserver.svelte' import { Button, Drawer, DrawerContent } from './common' - import { Plus, Loader2 } from 'lucide-svelte' + import { Plus, Loader2, Link2Off } from 'lucide-svelte' import type { AppViewerContext } from './apps/types' import { sendUserToast } from '$lib/toast' + import path from 'path' const dispatch = createEventDispatcher() @@ -30,30 +31,36 @@ value: value ?? initialValue, label: value ?? initialValue } - : '' + : undefined let collection = [valueSelect] + let loading = true async function loadResources(resourceType: string | undefined) { - const nc = ( - await ResourceService.listResource({ - workspace: $workspaceStore!, - resourceType - }) - ).map((x) => ({ - value: x.path, - label: x.path - })) + loading = true + try { + const nc = ( + await ResourceService.listResource({ + workspace: appViewerContext?.workspace ?? $workspaceStore, + resourceType + }) + ).map((x) => ({ + value: x.path, + label: x.path + })) - // TODO check if this is needed - if (!nc.find((x) => x.value == value) && (initialValue || value)) { - nc.push({ value: value ?? initialValue!, label: value ?? initialValue! }) - } - collection = nc - - if (expressOAuthSetup && nc.length > 0) { - value = nc[0].value - valueSelect = nc[0] + // TODO check if this is needed + if (!nc.find((x) => x.value == value) && (initialValue || value)) { + nc.push({ value: value ?? initialValue!, label: value ?? initialValue! }) + } + collection = nc + console.log('collection', collection) + if (expressOAuthSetup && nc.length > 0) { + value = nc[0].value + valueSelect = nc[0] + } + } finally { + loading = false } } @@ -85,6 +92,12 @@ sendUserToast(e.detail, true) open = false }} + on:refresh={async (e) => { + await loadResources(resourceType) + value = e.detail + valueSelect = { value, label: value } + open = false + }} /> {/await} {/key} @@ -107,7 +120,8 @@ on:error={(e) => { sendUserToast(e.detail, true) }} - on:refresh={(e) => { + on:refresh={async (e) => { + await loadResources(resourceType) value = e.detail valueSelect = { value, label: value } drawer?.closeDrawer?.() @@ -127,42 +141,89 @@ {/if}
-
- { - open = true - drawer?.openDrawer?.() + portal={!disablePortal} + value={valueSelect} + on:change={(e) => { + value = e.detail.value + valueSelect = e.detail }} - startIcon={{ icon: Plus }} - iconOnly + on:clear={() => { + value = undefined + valueSelect = undefined + }} + items={collection} + class="text-clip grow min-w-0" + placeholder="{resourceType ?? 'any'} resource" + inputStyles={SELECT_INPUT_DEFAULT_STYLE.inputStyles} + containerStyles={darkMode + ? SELECT_INPUT_DEFAULT_STYLE.containerStylesDark + : SELECT_INPUT_DEFAULT_STYLE.containerStyles} /> {/if} +
+ {#if valueSelect && expressOAuthSetup} +
diff --git a/frontend/src/lib/components/Scrollable.svelte b/frontend/src/lib/components/Scrollable.svelte index ff8e370e86..194bb05b6a 100644 --- a/frontend/src/lib/components/Scrollable.svelte +++ b/frontend/src/lib/components/Scrollable.svelte @@ -5,6 +5,7 @@ let isAtBottom: boolean = false let isScrollable = false + export let id: string | null | undefined = undefined export let scrollableClass: string = '' export let shiftedShadow: boolean = false let mutationObserver: MutationObserver @@ -43,7 +44,7 @@ }) -
+
diff --git a/frontend/src/lib/components/ToggleHubWorkspaceQuick.svelte b/frontend/src/lib/components/ToggleHubWorkspaceQuick.svelte index c48a33a6b1..9d6ec306a6 100644 --- a/frontend/src/lib/components/ToggleHubWorkspaceQuick.svelte +++ b/frontend/src/lib/components/ToggleHubWorkspaceQuick.svelte @@ -7,7 +7,7 @@
- + diff --git a/frontend/src/lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte b/frontend/src/lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte index 6751db0c99..b688c94bfa 100644 --- a/frontend/src/lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte +++ b/frontend/src/lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte @@ -11,6 +11,7 @@ import { TabGroup, TabList } from '@rgossiaux/svelte-headlessui' import { twMerge } from 'tailwind-merge' + export let id: string | null | undefined = undefined export let selected: any export let noWFull: boolean = false export let disabled: boolean = false @@ -38,6 +39,7 @@ {/if} - + {#if kind == 'script'} {#each topLevelNodes as [label, kind], i (label)}