mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
main
8 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
42543240e8 |
fix(cli): stop a deleted raw-app .lock from dropping the whole app push (#10473)
* fix(cli): stop a deleted raw-app .lock from dropping the whole app push * test(cli): assert the removed raw-app runnable is gone, trim comments |
||
|
|
161c7f4655 |
test(cli): drain async dependency jobs after sync push to fix flake (#10293)
* test(cli): drain async dependency jobs after sync push to fix flake Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(cli): condense waitForDeploymentJobs comment Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
b5a6a1eeab |
fix(cli): push whole raw app instead of treating frontend files as scripts (#9442)
* fix(cli): push whole raw app instead of treating frontend files as scripts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(cli): shorten raw-app handleFile comment Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
5d5b853f70 |
fix(cli): only preserve case for raw-app runnableIds, not app/flow summaries (#9000)
* fix(cli): only preserve case for raw-app runnableIds, not app/flow summaries PR #8940 stopped lowercasing in sanitizeForFilesystem to fix #8939, where a raw-app runnableId like CamelCaseTSRunnable produced a CamelCase YAML metadata file but a lowercased code file, making them desync and register as duplicate runnables on push. That fix overshot. sanitizeForFilesystem is also reached by newPathAssigner, which serves normal apps and flows where the input is the script's human summary ("Get Users Data") rather than an identifier. There the on-disk filename is the only artifact — there's no companion YAML to keep in sync — so lowercasing was the right behavior. Removing it changed both the on-disk filename and the !inline reference in app.yaml / flow.yaml from get_users_data.inline_script.ts to Get_Users_Data.inline_script.ts on the next pull, surfacing as unwanted case churn for users updating to 1.693.x. Add a preserveCase option to sanitizeForFilesystem (default false → lowercase). newRawAppPathAssigner opts in; newPathAssigner stays on the default. Update unit tests accordingly and add an end-to-end raw-app round-trip in raw_app_sync.test.ts that pushes a CamelCase backend runnable, pulls it back, and asserts both YAML and code file preserve case with no lowercase orphan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(cli): use readdir for exact-case orphan check on Windows The CamelCase round-trip test used fileExists("camelcasetsrunnable.ts") to assert no lowercase orphan was produced, which false-positives on Windows since the filesystem is case-insensitive and resolves the lookup to the existing CamelCaseTSRunnable.ts. Switch to readdir + toContain so the exact on-disk casing is compared identically on Linux and Windows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
060687b1fa |
fix(cli): exclude raw app backend files from script metadata generation (#8362)
Files inside .raw_app/backend/ were incorrectly being processed by `script generate-metadata` and `generate-metadata --skip-flows --skip-apps` because the filter only checked isFlowPath and isAppPath, but not isRawAppPath. This caused backend runnables to be treated as standalone scripts, creating incorrect .script.yaml files at wrong locations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
4fedfdfd11 |
feat(cli): add consistent get/list/new subcommands for all item types (#8047)
* feat(cli): add consistent get/list/new subcommands for all item types Make the CLI consistent so every item type (script, flow, app, resource, resource-type, variable, schedule, folder, trigger) supports get/list/new subcommands, enabling the CLI to be used as a full API client in bash scripts with jq piping. - Add --json flag to all list commands for machine-readable output - Register explicit "list" subcommand alongside default action - Add "get <path> [--json]" subcommand to fetch single items from API - Rename "bootstrap" to "new" for script/flow, keep "bootstrap" as alias - Add "new" subcommand for resource, resource-type, variable, schedule, folder, and trigger to create local template YAML files - Update cli-commands skill documentation for wmill init - Add integration tests for all new commands Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * all * feat: install wmill CLI in Docker images and use it for bash variable/resource access - Install windmill-cli via bun in all Dockerfiles that include bun - DockerfileCli: switch from node:slim to oven/bun:slim - CLI: auto-configure from WM_WORKSPACE/WM_TOKEN/BASE_INTERNAL_URL env vars as last-resort fallback when no workspace is configured - Frontend: replace curl-based bash snippets with wmill variable/resource get - Add backend integration tests for wmill CLI in bash scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): install windmill-cli in backend test workflow Ensures wmill is available on PATH for bash integration tests that use `wmill variable get` and `wmill resource get`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(cli): replace @std/* Deno dependencies with Node.js equivalents Replace @std/log with a lightweight custom logger (core/log.ts), @std/path with node:path, and @std/yaml with the yaml npm package. Also fix process hang on exit, add --node option to install_dev.sh, and add missing hasRequiredPermissions to NpmProvider. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * all * all * all * refactor(cli): replace @ayonli/jsext and @std/encoding with lightweight alternatives Replace @ayonli/jsext (8.4MB) with tar-stream (32kB) for tar creation, replace @std/encoding with Node.js Buffer.toString("hex"), and fix @windmill-labs/shared-utils to use direct npm instead of JSR mirror. Also resolve merge conflicts in sync.ts and fix pre-existing type errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): use singleQuote YAML output and pass yamlOptions in gitsync pull The yaml library defaults to double quotes, but the codebase (and tests) expect single-quoted strings. Add singleQuote: true to yamlOptions and pass yamlOptions to gitsync-settings pull writeFile calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * all * all * fix(cli): address code review feedback - Install CLI from source in backend tests instead of npm - Fix script bootstrap catch block to re-throw "File already exists" - Add type-safe local variable after trigger kind validation - Use created_by instead of policy.on_behalf_of for app get output - Note --kind is recommended for faster trigger lookup in help text - Document node symlink purpose in Dockerfiles Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): use /usr/bin for wmill wrapper to ensure it's in PATH Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): install wmill to ~/.local/bin to avoid permission issues Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci(backend): switch to Blacksmith runner and add cargo caching - Switch from ubicloud-standard-16 to blacksmith-16vcpu-ubuntu-2404 for faster NVMe-backed builds - Add stickydisk for cargo target directory (persistent NVMe cache across runs) - Add cache for cargo registry and git dependencies - Upgrade DuckDB FFI cache from actions/cache@v3 to useblacksmith/cache@v1 - Enable CARGO_INCREMENTAL=1 to benefit from persistent target cache Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix ci --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
a2cefdf0a2 |
refactor(cli): migrate CLI from Deno to Bun/Node.js (#8041)
* fix: only enable EE features in test backend when license key is available Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: skip EE tests without license key and exclude test-skills from test discovery Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: unskip passing tests and add duplicate (remote, workspaceId) check in addWorkspace Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(cli): migrate from Deno APIs to Node.js/Bun-compatible APIs Replace Deno-specific APIs with Node.js equivalents across the entire CLI codebase to enable running on Node.js/Bun. Switch build system from dnt to bun, update imports from jsr:/npm: prefixed to bare specifiers, and add package.json/tsconfig.json for the Node.js ecosystem. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * all * test(cli): expand test coverage with new integration and unit tests Add standalone_commands.test.ts covering folder list, schedule list, resource-type list/push/update, script show/run/bootstrap, and user commands. Add unit tests for filePathExtensionFromContentType and removeExtensionToPath. Add git_unit, local_encryption_unit, resource_folders_unit, and settings_unit test files. Fix schedule cron expressions (6-field format), add includeSchedules flag, improve test setup with pre-build and auto-cleanup, and support TEST_CLI_RUNTIME=node. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): replace Deno.readFile with node:fs in WASM loaders and add schema parsing tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor(cli): switch WASM parsers from local files to npm packages Use published windmill-parser-wasm-* npm packages instead of local wasm/ files. A loadParser() helper uses createRequire to resolve the .wasm binary from node_modules and passes it to init() via readFileSync, avoiding fetch() and Deno.readFile() patches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(cli): add coverage for --locks-required lint feature Add 15 tests covering the lock-checking functionality merged from main: - checkMissingLocks: standalone scripts (python, bun, bash), inline lock file resolution (valid, empty, missing), flow inline rawscripts (with/without locks, nested forloopflow), app inline scripts, raw apps without backend folder - runLint --locks-required integration: reports issues when locks missing, skips checks when flag absent, passes when locks exist Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci(cli): replace Deno with Bun in CI workflows - cli-tests.yml: remove Deno setup, use `bun test` instead of `deno test`, add `bun install` step for dependency installation - npm_on_release.yml: replace Deno setup with Bun setup for CLI publishing - build.sh: add `bun install` before building so CI has dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): pre-start backend in test preload and remove Deno test leftovers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): normalize path separators for Windows compatibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * more tests + windows * ci(cli): use Blacksmith runner for Windows tests Switch test-windows job from windows-latest to blacksmith-16vcpu-windows-2025 for faster CI execution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): fix Windows path separator expectations in unit tests buildMetadataPath and extractResourceName normalize to forward slashes internally, so tests should not expect platform-specific separators in their output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): fix Windows CI test failures for dev_server and script_run Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): set BUN_PATH and NODE_BIN_PATH for backend worker on Windows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci(cli): add SSH debug step on Windows test failure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): use native path separators for ignore check in dev mode on Windows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
a22d179903 |
add GitHub Actions CI and raw app sync tests (#7677)
* feat(cli): add GitHub Actions CI and raw app sync tests - Add CLI tests GitHub Action that runs on Linux and Windows - Add build check job that runs on CLI and openapi.yaml changes - Uses Rust cargo backend instead of Docker for better CI compatibility - Add cargo_backend.ts and test_backend.ts for test infrastructure - Fix Windows path separator bug in raw_apps.ts (use "/" for relative paths) - Fix PostgreSQL URL parsing in cargo_backend.ts - Update tests to use gitBranches format instead of deprecated overrides - Add raw_app_sync.test.ts for raw app sync workflow testing (ignored for now - needs EE) - Skip tests that require EE features (git sync settings, raw apps) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): Fix Windows path compatibility issues in tests - Use fromFileUrl() in cargo_backend.ts for proper Windows path handling - Normalize path separators to forward slashes in resource_folders.ts - Fix readDirRecursive to return normalized paths in test helper - Use forward slashes consistently in buildMetadataPath and detection functions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): Use SEP in test assertions instead of modifying logic - Revert resource_folders.ts to use SEP as intended - Update test assertions to use SEP for platform-specific paths - Keep readDirRecursive normalization for consistent test comparisons Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): Use SEP for all path separators in test assertions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): Use resolve() for proper cross-platform path handling in cargo_backend String concatenation with path separators creates malformed paths on Windows. Use path.resolve() instead for proper cross-platform path resolution. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(backend): Add cfg attributes for Windows compatibility - Add #[cfg(unix)] to anyhow::anyhow import (only used in unix cfg block) - Add #[cfg(not(windows))] to parse_file function (uses cat, only for cgroups) - Remove unused std::io import, use std::io::Result directly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: Windows compilation + convert integration tests to withTestBackend - Fix unused import SYSTEM_ROOT in csharp_executor.rs on Windows by requiring both windows and csharp feature - Fix unused variable id in handle_child.rs on Windows by adding #[allow(unused_variables)] since id is only used in cfg(unix) code - Convert all RUN_INTEGRATION_TESTS dependent tests in sync_pull_push.test.ts to use withTestBackend pattern for automatic backend setup Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: configurable test features with CI_MINIMAL_FEATURES env var - Default: full features (zip, private, enterprise) for local development - CI mode: minimal features (zip only) when CI_MINIMAL_FEATURES=true - Add shouldSkipOnCI() helper for tests requiring EE features - Update EE-dependent tests to use shouldSkipOnCI() - Add test instructions to cli/README.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: enable raw app tests (not EE-dependent) Raw apps work with minimal features. 2 tests pass, 2 have test logic bugs to investigate separately: - "delete file and push" - file deletion not syncing correctly - "dry-run push shows expected changes" - JSON output parsing issue Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: gate cgroups module to Linux only cgroups are Linux-specific, the module was causing dead_code warnings on Windows compilation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): add CI_MINIMAL_FEATURES env var to CLI tests workflow Set CI_MINIMAL_FEATURES=true in both Linux and Windows test jobs so the backend compiles with minimal features (zip only) and EE-dependent tests self-skip via shouldSkipOnCI(). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): raw app tests and backend startup timing - Add 5s delay after backend ready for migrations to complete - Fix dry-run JSON output parsing (handle pretty-printed JSON) - Temporarily ignore "delete file" test (needs isSuperset fix) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): raw app file deletion sync - Add deepEqual check for files in raw_apps.ts isSuperset comparison - Handle raw_app file deletions in sync.ts by re-pushing the entire app - Fix test to remove CSS import before deleting the file When deleting a file from a raw app, the sync now properly updates the backend with the new file list (excluding the deleted file). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): Windows path separators in tests Normalize paths for cross-platform comparison by converting backslashes to forward slashes before path assertions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): normalize featurePaths in multi_instance_workspace test Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(cli): add mixed case paths sync tests for Windows compatibility Add comprehensive tests for sync pull/push with capitalized folder paths to catch Windows case-insensitivity issues: - Scripts in f/MyFolder/MyScript - Flows in f/MyFlows/DataProcessor - Apps in f/MyApps/Dashboard - Variables in f/MyVars/ApiKey - Deeply nested paths with mixed case - Multiple resources in same capitalized folder - CamelCase folder names with numbers Each test verifies the full pull -> modify -> push -> verify cycle. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(cli): add idempotency check to mixed case paths tests After each push, pull again with --dry-run --json-output and verify that no changes are detected. This ensures the sync is stable and catches issues where pull/push cycles cause spurious diffs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |