Commit Graph

27 Commits

Author SHA1 Message Date
Ruben Fiszel e3acb7bbd9 break main.ts <-> utils.ts circular import causing TDZ crash (#9436)
`cli/src/utils/utils.ts` imported `VERSION` from `cli/src/main.ts`, while
`main.ts` transitively imports `utils.ts` (via `workspace.ts`). When a module
load order entered the graph through `workspace.ts -> utils.ts -> main.ts`,
`main.ts`'s top-level command tree ran while `workspace.ts` was still
mid-initialization, so the `workspace` binding was still in its temporal dead
zone at `.command("workspace", workspace)`:

    ReferenceError: Cannot access 'workspace' before initialization

This surfaced as 56 failing CLI tests on Windows CI (the Windows runner's test
module-load order triggers the bad path; it reproduces on any platform via
`bun -e 'await import("./src/commands/workspace/workspace.ts")'`).

Move `VERSION` to `cli/src/core/constants.ts` (already the "minimal imports"
module), re-export it from `main.ts` for backwards compatibility, and have
`utils.ts` read it from `constants.ts` — eliminating the cycle. Release tooling
(`.github/change-versions*.sh`) is updated to rewrite the `VERSION` line in its
new location.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:48:26 +00:00
hugocasa 53badf1a8c fix: track dollar-quoted strings in SQL block splitter (#8891)
* fix: track dollar-quoted strings in SQL block splitter

Queries like `CREATE FUNCTION ... AS $$ ... ; ... $$ LANGUAGE plpgsql;`
were being shredded on every `;` inside the function body because the
SQL splitter's state machine didn't recognize PostgreSQL dollar-quoted
strings. Add an `InDollarQuote(tag)` state so `$$ ... $$` and
`$tag$ ... $tag$` regions are treated as a single quoted span.

Opt-in via a new `track_dollar_quotes` flag on `parse_sql_blocks`;
enabled for PostgreSQL and DuckDB, disabled for MySQL/Oracle/BigQuery/
Snowflake which don't support the syntax.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: make windmill-parser-wasm a self-contained workspace

The wasm parser crate is excluded from the backend workspace (its
nightly-only `cargo-features = ["panic-immediate-abort"]` would break
stable cargo on the whole workspace), but its manifest still used
`.workspace = true` inheritance — which fails with "failed to find a
workspace root" once the parent no longer considers it a member.

Declare the crate as its own workspace by adding `[workspace]`,
`[workspace.package]`, and `[workspace.dependencies]` tables. Mirror
the relevant entries from the parent `backend/Cargo.toml` (same
version specs, same path targets) so resolution stays byte-identical
to what the parent would have produced.

Also:
- Teach `.github/change-versions.sh` (+ mac variant) to update this
  crate's own `Cargo.toml` version and bulk-bump the `windmill-*`
  entries in its `Cargo.lock` on each release.
- Bump the frontend's pinned `windmill-parser-wasm-regex` to 1.688.0
  to match the freshly-built package, and refresh `package-lock.json`.
- Regenerate the wasm crate's `Cargo.lock` from scratch (first build
  under the new workspace re-resolves the full graph; target-gated
  deps from sibling crates like `windmill-parser-py-imports` are
  now recorded in the lockfile but not compiled when targeting
  wasm32).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 17:07:01 +00:00
Ruben Fiszel 6eca08480a chore: remove legacy wmill_pg python client (#8155)
The wmill_pg package (psycopg2 wrapper for running PostgreSQL queries)
has been fully replaced by Windmill's native PostgreSQL support.
Remove the package directory and all references from build, publish,
install, version, LSP, and dependabot configs.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 08:52:35 +00:00
centdix 69c2a7c1c8 chore(cli): better folder structure + add config utils (#6319)
* organize in folders

* add config command

* fix

* cleaning

* move utility functions

* merge

* only show token with option

* only show token with option

* fix

* remove config command

* add config utils

* change paths

* nit

* clean path assigner

---------

Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
2025-08-05 13:59:07 +00:00
Ruben Fiszel 128f6c1383 fix e2e test 2025-04-21 17:41:24 +02:00
Alexander Petric c4163aabcd update version update script to match new pwsh module formatting (#4855) 2024-12-05 17:00:20 +01:00
Ruben Fiszel fd18f42e0f feat: make CLI node compatible (#4347) 2024-09-07 02:31:26 +02:00
wendrul fbea59ce9e Add actions to publish to JSR (#3618)
add it to change-version.sh and publish action
2024-04-26 11:18:46 +02:00
lfanew 29f746a51d Powershell client (#3551)
* init commit of partial functionality

* Simplified layout (matching TS client)

* reworked get & post

webrequest allows more interaction with response

* Added more functionality

* Added cancel and wait for jobs

* todo added

* Async script running and query util

* Added sync script & async flow

* Stop-WindmillExecution

Implementation of `cancel_running` from Python client.
Also changed $Body -> $Data to be more explicit (we don't expect JSON body as the method will convert it for us)

* Added get workspace and job

* added token creation

* Added job cancel cmdlet

* get id token

* Final draft

- Manual testing complete
- Rearranged methods & functions
- Added a bit more functionality

* fixed incomplete synopsis

* added parent job back

dont think it's related to this module. reported finding in discord

* feat: publish CI

---------

Co-authored-by: HugoCasa <hugo@casademont.ch>
2024-04-18 14:42:58 +02:00
Ruben Fiszel 19246bcf3e chore: eetest (#2937)
* chore: Windmill integration tests

* Revert github workflow temp changes

* fix ee

---------

Co-authored-by: gbouv <guillaume@windmill.dev>
2023-12-30 03:29:00 +01:00
Guillaume Bouvignies 244c0c31f6 chore: test merge (#2914) 2023-12-22 19:01:29 +01:00
Ruben Fiszel a3a36a34fb fix change versions 2023-09-19 19:06:31 +02:00
Ruben Fiszel 591c9343ef fix(bun): remove need for manual setClient 2023-08-12 01:24:42 +02:00
Ruben Fiszel 524fe88205 feat: release wmillbench publicly 2023-06-23 15:08:33 +02:00
Ruben Fiszel ce1165f859 fix change versions for cli 2023-03-24 12:25:30 +01:00
Ruben Fiszel 2b32d4848b quickfix change-versions for cli 2022-11-01 16:19:59 +01:00
Kai Jellinghaus 986358e150 Sed fix (#844) 2022-11-01 16:11:01 +01:00
Kai Jellinghaus 28cd0c3fa1 feat: new wmill CLI #831 2022-11-01 15:53:28 +01:00
Kai Jellinghaus 6263e90735 restructure the entire backend layout using workspaces (#815) 2022-10-29 11:58:06 +02:00
Ruben Fiszel c4ea52b4c3 Put openflow.openapi.yaml at root for visibility #290 2022-07-30 20:10:45 +02:00
Ruben Fiszel 47e5a0ce10 fix other references to openapi.yaml 2022-07-30 17:37:17 +02:00
Ruben Fiszel 2fac3f1080 ci: fix change version 2022-05-17 21:47:36 +02:00
Ruben Fiszel 8a92b67045 remove poetry locks 2022-05-17 21:43:15 +02:00
Ruben Fiszel bff0366fd6 ci: fix change version 2022-05-17 21:36:49 +02:00
Ruben Fiszel 7840bb3e86 ci: use python poetry for change versions 2022-05-17 21:35:10 +02:00
Ruben Fiszel 744114edb1 update frontend + lock python client 2022-05-17 21:16:36 +02:00
Ruben Fiszel 2e132878e4 first commit 2022-05-05 04:25:58 +02:00