mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
8dbd12ecc1
* fix: patch sqlx so a cancelled BEGIN cannot poison a pooled connection Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzqmh52NU8fB9RBQNNkJGt * test: drop the migration run and fixed sleep from the sqlx patch guard Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzqmh52NU8fB9RBQNNkJGt * test: ignore the sqlx patch guard by default and point at it from where sqlx is changed Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzqmh52NU8fB9RBQNNkJGt --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
3.2 KiB
3.2 KiB
Validation Check Matrix
After making changes, run the appropriate checks and fix all errors before considering work done.
Backend: What to Check
| What changed | Command | Notes |
|---|---|---|
| Core code (no feature gates) | cargo check |
|
Enterprise code (*_ee.rs) |
cargo check --features enterprise,private |
Also do EE PR workflow (see docs/enterprise.md) |
| Enterprise + license-gated code | cargo check --features enterprise,private,license |
When the feature requires a valid license key |
| Kafka trigger code | cargo check --features kafka |
|
| DuckDB executor code | cargo check -p windmill-worker --features duckdb |
duckdb_executor.rs (and its #[cfg(test)] tests) only compile with this flag — a plain check/test silently skips them |
| Native trigger code | cargo check --features native_trigger |
|
| Parquet code | cargo check --features parquet |
|
| Multiple gated modules | cargo check --features enterprise,parquet |
Combine only the flags you need |
| API route changes | cargo check |
Then update openapi.yaml and run npm run generate-backend-client |
| Database migrations | cargo check |
Test migration applies cleanly with sqlx migrate run |
The sqlx dependency (version bump, [patch.crates-io] entries, fork rebase) |
cargo test -p windmill-common --test sqlx_begin_cancel_safe -- --ignored |
Windmill runs a patched sqlx: upstream's Pool::begin is not cancel-safe on Postgres, and a cancelled one poisons the pooled connection for 30 minutes. Losing the patch still compiles, so this ignored test is the only thing that notices. backend/Cargo.toml has the detail |
Never use --features all_sqlx_features — it compiles everything and is very slow. Check backend/Cargo.toml [features] to find the right flags.
Never use SQLX_OFFLINE=true — a live database is always available.
After all code changes are done, run ./update_sqlx.sh from backend/ to regenerate the offline query cache.
Frontend: What to Check
| When | Command | Time |
|---|---|---|
| During iteration | npm run check:fast |
~2s |
| Final PR validation | npm run check |
~50s |
| After backend API changes | npm run generate-backend-client first |
Cross-Cutting Checks
| Situation | Extra step |
|---|---|
| Added/modified API endpoints | Update backend/windmill-api/openapi.yaml, regenerate client |
| Modified Flow structures | Also update openflow.openapi.yaml |
| Changed DB schema | Update backend/summarized_schema.txt if needed |
| Enterprise file changes | Companion PR in windmill-ee-private (see docs/enterprise.md) |
Changed a hook in .claude/hooks/ |
bash .claude/hooks/test-hooks.sh — pins which commands prompt |
When to Write Tests
- New utility functions in
windmill-common: always add unit tests - New API endpoints with complex logic: add integration test
- Bug fixes for non-obvious bugs: add regression test
- Pure UI changes: no tests required (rely on type checking)
- Refactoring: ensure existing tests pass, don't add new ones
When to Check Performance
Run EXPLAIN ANALYZE on new/modified queries when touching:
- Job queue tables (
v2_job,v2_job_completed) - Hot-path queries (polling, scheduling)
- Added/removed indexes