Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
ed809a9
feat: validate semantic SQL bindings and project metadata
kvlonge Sep 25, 2026
5264785
feat: enable dialect-aware semantic type diagnostics
kvlonge Sep 25, 2026
e402e2f
fix: retain semantic warnings with Polyglot 0.13.0
kvlonge Sep 25, 2026
bdb4a11
fix: integrate Polyglot 0.13.1 semantic corrections
kvlonge Sep 25, 2026
2f417be
fix: explain semantic diagnostics and recover downstream cascades
kvlonge Sep 25, 2026
f6d74ab
fix: honor target semantics and recover poisoned output types
kvlonge Sep 25, 2026
721a46f
perf: reuse parsed SQL and guard diagnostic-heavy compilation
kvlonge Sep 25, 2026
36ec14c
fix: integrate Polyglot 0.13.2 Snowflake semantics
kvlonge Sep 25, 2026
b8cc1d0
fix: report resources that Rules cannot evaluate
kvlonge Sep 26, 2026
171f9d2
fix: group unevaluated Rules by resource and cause
kvlonge Sep 26, 2026
f388717
fix: preserve the custom Rule host wire contract
kvlonge Sep 26, 2026
97401ad
feat: add native binding catalogs and authored position maps
kvlonge Sep 26, 2026
f5791ae
perf: move compiler binding work behind native catalogs
kvlonge Sep 26, 2026
d211f3d
perf: reuse parsed ASTs during catalog validation
kvlonge Sep 26, 2026
f849554
perf: reuse fused bindings and batch SQL normalization
kvlonge Sep 26, 2026
31e4efa
test: verify target-controlled semantic cache reuse
kvlonge Sep 26, 2026
1019a95
docs: explain compiler cache bypass and warm measurement
kvlonge Sep 26, 2026
5946792
feat!: remove virtual data environments
kvlonge Sep 25, 2026
d45292f
test: retain direct-mode coverage and remove virtual CI paths
kvlonge Sep 25, 2026
2908390
docs: describe direct mode and regenerate bundled references
kvlonge Sep 25, 2026
3c374ea
refactor: prune orphaned virtual compiler entrypoints
kvlonge Sep 25, 2026
96348da
docs: require real-project verification and worst-case performance gu…
kvlonge Sep 25, 2026
dbeb7ab
fix: keep supplemental clause checks partial for open inputs
kvlonge Sep 26, 2026
3de3d7b
fix: reject the removed clone skip-locked option
kvlonge Sep 26, 2026
8573101
fix: reject removed unchanged-run policy and drop dead planning output
kvlonge Sep 26, 2026
8ff117a
fix: preserve exact binding shapes and validate physical downstreams
kvlonge Sep 26, 2026
5d75bd5
test: refresh dense guard fingerprints for partial-check reporting
kvlonge Sep 26, 2026
f093669
fix: retain completed star analysis across partial cache hits
kvlonge Sep 26, 2026
f8265c6
test: reconcile fresh and cached guard fingerprints with complete ana…
kvlonge Sep 26, 2026
3d2965f
fix: distinguish resolved star facts from pending lineage expansion
kvlonge Sep 26, 2026
4a34b81
perf: reuse the model-name set during binding graph construction
kvlonge Sep 26, 2026
430e94e
test: align guard assertions with resolved-star metadata
kvlonge Sep 26, 2026
ed113b9
fix: adopt polyglot 0.13.3 for prefix predicate parsing
kvlonge Sep 26, 2026
5648cf1
perf: memoize expression source shapes within the compile catalog
kvlonge Sep 26, 2026
abb2900
perf: bind model inputs in dependency-ready analysis waves
kvlonge Sep 26, 2026
ca5ca37
perf: complete derived star projections during native model analysis
kvlonge Sep 26, 2026
7e1fc2a
perf: reuse fixture eligibility across built-in Rules
kvlonge Sep 26, 2026
58e36ac
perf: bound wave catalog preparation to referenced tables
kvlonge Sep 26, 2026
a69766e
fix: preserve restored shape invalidation across analysis waves
kvlonge Sep 26, 2026
f5b9b96
perf: reuse parsed expressions for exact identifier binding
kvlonge Sep 26, 2026
d1187f3
fix: preserve bound projections during quoted catalog validation
kvlonge Sep 26, 2026
f62d808
test: print dense compiler timings before budget assertions
kvlonge Sep 26, 2026
c5343d8
test: record CPU utilization in dense compile guards
kvlonge Sep 26, 2026
be2ec47
test: report compile measurements before helper failures
kvlonge Sep 26, 2026
7f1d0a0
test: centralize benchmark measurement reporting
kvlonge Sep 26, 2026
f1f8a5b
fix: satisfy clippy 1.98 lints in the native rules crate
kvlonge Sep 26, 2026
7e22f8a
fix: test native panic conversion without an embedded interpreter
kvlonge Sep 26, 2026
0c390a6
test: give the microbatch cursor-window fixture its cursor output column
kvlonge Sep 26, 2026
99d2032
fix: keep unresolved star outputs open in semantic shapes
kvlonge Sep 26, 2026
a02c1f0
fix: accept DuckDB keyword timestamp functions in semantic checks
kvlonge Sep 26, 2026
c365ee1
test: align SQL-test fixture cases with semantic compile validation
kvlonge Sep 26, 2026
93bb252
fix: omit the semantic coverage notice when SQL validation is disabled
kvlonge Sep 26, 2026
2bdb518
fix: expand stars over inferred inputs before publishing binding shapes
kvlonge Sep 26, 2026
a4d089a
fix: include snapshot validity columns in semantic shapes
kvlonge Sep 26, 2026
44f1e25
test: expect compile-time B300 for invalid unique_key and cursor_inputs
kvlonge Sep 26, 2026
88c319c
test: use a runtime-only failure for the local scenario error case
kvlonge Sep 26, 2026
d14171c
fix: normalize package-qualified dbt references for semantic binding
kvlonge Sep 26, 2026
1b4115b
test: cover compile lineage for a star over a joined derived table
kvlonge Sep 26, 2026
61eb0bf
test: update semantic compile fingerprints for corrected star lineage
kvlonge Sep 26, 2026
0aaabe2
fix: adopt polyglot 0.13.4 for engine-verified DuckDB and PostgreSQL …
kvlonge Sep 26, 2026
d00e362
feat: enforce implicit type conversions as compile errors
kvlonge Sep 26, 2026
e67f943
docs: add performance and native SQL change rules to agent instructions
kvlonge Sep 27, 2026
9c8862a
feat: isolate scenario artifacts with optional run namespaces
kvlonge Sep 26, 2026
141f38e
fix: use warehouse SQL statement size limits for tests
kvlonge Sep 26, 2026
a80d8b3
fix: isolate chained SQL test CTE namespaces
kvlonge Sep 26, 2026
617d5cc
docs: move semantic compilation and upgrade notes to the website
kvlonge Sep 27, 2026
bcb46c7
ci: add a same-runner compile performance ratio guard
kvlonge Sep 27, 2026
a87a552
fix: adopt polyglot 0.13.6 for star-sourced type checks
kvlonge Sep 27, 2026
b1283cd
fix: align semantic SQL normalization with compiler dollar-quote scan…
kvlonge Sep 27, 2026
bbf03fb
test: cover direct-mode janitor completion wording
kvlonge Sep 27, 2026
528e6b5
docs: drop the upgrading page
kvlonge Sep 27, 2026
80cbf97
fix: satisfy fensu rules in star enrichment and its lineage test
kvlonge Sep 26, 2026
130e965
fix: restore the terminal plan progress test type and satisfy fensu r…
kvlonge Sep 27, 2026
be5385f
perf: infer expression-source shapes in one batch and reuse them afte…
kvlonge Sep 27, 2026
ff721b9
build: adopt Polyglot 0.13.7
kvlonge Sep 27, 2026
b4e2aeb
perf: reserve only generated-prefix names when isolating SQL test CTEs
kvlonge Sep 27, 2026
89c684b
perf: stop scanning for a diagnostic's binary expression past its offset
kvlonge Sep 27, 2026
331c7fa
perf: reuse the parsed statement for borrowed-query validation
kvlonge Sep 27, 2026
46a9add
perf: share binding-mode native queries across models with equal shapes
kvlonge Sep 27, 2026
64baf62
perf: reuse exact shared binding analyses across dependency waves
kvlonge Sep 27, 2026
a5787df
ci: run every SQL test and ratio guard E2E file in a DuckDB shard
kvlonge Sep 27, 2026
ac42e18
fix: restore the PostgreSQL CI path filter and never share stub-named…
kvlonge Sep 27, 2026
cafc11a
test: measure diagnostic-heavy compiles with positioned conversion er…
kvlonge Sep 27, 2026
5c158eb
build: adopt Polyglot 0.13.8
kvlonge Sep 27, 2026
74ecb77
test: refresh compile guard fingerprints and set fresh budgets to mea…
kvlonge Sep 27, 2026
62da118
test: raise fresh-process and cache budgets to the slowest measured C…
kvlonge Sep 27, 2026
f41e324
test: accept a complete wave-level cache hit after a leaf edit and se…
kvlonge Sep 27, 2026
057dd81
test: drop the macro-edit entry-hit requirement and settle the fresh …
kvlonge Sep 27, 2026
ea2a43d
test: refresh varied compile cache fingerprints for isolated test CTE…
kvlonge Sep 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 63 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
performance=true
rules_performance=true
;;
src/sqlbuild/cli/commands/_helpers/compile/*|src/sqlbuild/executor/testing/*|scripts/cold_compile_performance/*|tests/e2e/src/sqlbuild/cli/commands/main/compile/*)
src/sqlbuild/cli/commands/_helpers/compile/*|src/sqlbuild/executor/testing/*|scripts/cold_compile_performance/*|scripts/compile_performance_ratio/*|scripts/compare_compile_performance.py|tests/e2e/src/sqlbuild/cli/commands/main/compile/*)
broad=true
performance=true
;;
Expand All @@ -90,7 +90,7 @@ jobs:
duckdb=true
format_performance=true
;;
tests/e2e/src/sqlbuild/cli/commands/main/postgres/*|tests/integration/src/sqlbuild/adapters/postgres/*|tests/integration/src/sqlbuild/virtual/state/classes/postgres/*|tests/integration/src/sqlbuild/runtime/execution_history/*)
tests/e2e/src/sqlbuild/cli/commands/main/postgres/*|tests/integration/src/sqlbuild/adapters/postgres/*|tests/integration/src/sqlbuild/runtime/execution_history/*)
postgres=true
;;
tests/e2e/*)
Expand Down Expand Up @@ -195,14 +195,12 @@ jobs:
target: test-e2e-duckdb-build-core
- name: build incremental
target: test-e2e-duckdb-build-incremental
- name: build virtual
target: test-e2e-duckdb-build-virtual
- name: CLI data
target: test-e2e-duckdb-cli-data
- name: CLI commands
target: test-e2e-duckdb-cli
- name: virtual environments
target: test-e2e-duckdb-virtual
- name: CLI inspection
target: test-e2e-duckdb-inspection
- name: integrations
target: test-e2e-duckdb-integrations
env:
Expand Down Expand Up @@ -390,6 +388,62 @@ jobs:
make test-e2e-dense-compile-performance \
SQLBUILD_BENCHMARK_MODELS="${BENCHMARK_MODELS}"
- name: Run diagnostic-heavy compile guards
if: matrix.models == 1000
run: make test-e2e-diagnostic-compile-performance

compile_performance_ratio:
name: Same-runner compile ratio (${{ matrix.kind }} 3000 models)
needs: [changes, lockfile]
if: needs.changes.outputs.performance == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- kind: dense
max_ratio: "1.10"
- kind: fresh
max_ratio: "1.30"
steps:
- uses: actions/checkout@v4
- name: Check out the comparison base
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha || 'main' }}
path: base
- uses: astral-sh/setup-uv@v5
with:
version: "0.12.3"
enable-cache: true
cache-dependency-glob: |
uv.lock
Cargo.lock
base/uv.lock
base/Cargo.lock
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install Python
run: uv python install 3.12
- name: Install head dependencies
run: uv sync --locked --all-groups --all-extras
- name: Install base dependencies
working-directory: base
run: uv sync --locked --all-extras
- name: Compare base and head cold compiles
env:
KIND: ${{ matrix.kind }}
MAX_RATIO: ${{ matrix.max_ratio }}
run: |
uv run python -m scripts.compare_compile_performance \
--kind "${KIND}" \
--max-ratio "${MAX_RATIO}" \
--models 3000 \
--base-python base/.venv/bin/python \
--head-python .venv/bin/python
cache_compile_performance:
name: Fresh-process compile cache (${{ matrix.models }} models)
needs: [changes, lockfile]
Expand Down Expand Up @@ -551,6 +605,7 @@ jobs:
performance,
cold_compile_performance,
dense_compile_performance,
compile_performance_ratio,
cache_compile_performance,
rules_performance,
postgres,
Expand All @@ -568,6 +623,7 @@ jobs:
PERFORMANCE_RESULT: ${{ needs.performance.result }}
COLD_COMPILE_PERFORMANCE_RESULT: ${{ needs.cold_compile_performance.result }}
DENSE_COMPILE_PERFORMANCE_RESULT: ${{ needs.dense_compile_performance.result }}
COMPILE_PERFORMANCE_RATIO_RESULT: ${{ needs.compile_performance_ratio.result }}
CACHE_COMPILE_PERFORMANCE_RESULT: ${{ needs.cache_compile_performance.result }}
RULES_PERFORMANCE_RESULT: ${{ needs.rules_performance.result }}
POSTGRES_RESULT: ${{ needs.postgres.result }}
Expand All @@ -587,6 +643,7 @@ jobs:
"${PERFORMANCE_RESULT}" \
"${COLD_COMPILE_PERFORMANCE_RESULT}" \
"${DENSE_COMPILE_PERFORMANCE_RESULT}" \
"${COMPILE_PERFORMANCE_RATIO_RESULT}" \
"${CACHE_COMPILE_PERFORMANCE_RESULT}" \
"${RULES_PERFORMANCE_RESULT}" \
"${POSTGRES_RESULT}"; do
Expand Down
53 changes: 53 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,56 @@
explicitly requests it; rely on CI for those suites.
- Before pushing, run the exact static CI target with all optional dependencies available: `uv sync --all-extras` followed by `make check-ci`.

## Real-Project Verification and Performance Guards

- Synthetic fixtures and clean benchmark projects do not exercise every path. Before releasing
changes to compilation, SQL analysis, diagnostics, formatting, Rules, or planning, run the built
branch against at least one large real project available locally outside this repository, and
compare it with the latest release. Compare diagnostic counts by code, cold compile wall time and
peak memory, and, for formatter changes, that formatting preserves compiled dependencies, lineage,
and query semantics.
- Treat every new diagnostic on a real project as a false positive until warehouse evidence proves
otherwise, for example a model that has built successfully since its SQL last changed.
- A material slowdown or new false positive is a release blocker, not a follow-up.
- Real-project names, SQL, identifiers, file paths, and results never enter this repository, commits,
pull requests, or CI output. Record only neutral aggregate conclusions, and rebuild every
reproduction synthetically.
- Performance guards must cover worst-case paths, not only clean projects: very large models,
diagnostic-heavy compiles with many errors and warnings, wide queries, and deep macro expansion.
Any per-diagnostic, per-reference, or per-token work must be bounded by a test with a strict time
limit. A path that is only slow when something is wrong is still a regression.

## Performance Work

- Never compare timings across different machines, runners, or sessions. Every performance claim
must come from a same-machine comparison: base and candidate built from the same toolchain, run
alternately at least three times each, reporting medians of both wall time and CPU time
(user+sys) plus the per-phase `compile_timings`.
- On shared local machines, confirm no concurrent builds or benchmarks are running and record the
load average. If load exceeds the core count, treat wall times as unreliable and report CPU time.
- Hosted CI runners vary by up to ~60%. Do not diagnose regressions from absolute CI budgets or
from runs on different runners; use the same-runner ratio guard or a same-job paired comparison.
- Before attributing a regression to a cause, prove it with an on/off experiment (a temporary
kill switch or a revert) on the same machine. Profiles identify suspects; experiments convict.
Remove experiment switches before committing.
- Measure the modes users run: cold without cache, cold writing the cache, and warm. A change that
affects analysis, validation, or caching must report all three.
- Performance fixes must not reduce coverage. Show that diagnostics are unchanged or a strict,
validated superset on the dense benchmark and a real-project run.
- Do not raise performance budgets or tolerances to make a regression pass.

## Native SQL (Polyglot) Changes

- Treat every Polyglot change as a compiler change: before adopting a new Polyglot version, run the
same-machine dense and fresh 3,000-model comparisons against the current version and report the
ratio and per-phase timings.
- Polyglot diagnostics adopted by SQLBuild are enforceable errors or dropped. Never surface a new
native finding as a non-blocking warning; map it to a SQLBuild error code with a mechanical remedy.
- Coverage conditions must not depend on incidental query shape (for example, only checking
statements with a set operation). Checks apply uniformly or the gap is documented and ticketed.
- Run the Polyglot feature-gate checks (`make test-rust-feature-gates`) before pushing Polyglot
changes; cross-module helpers must respect feature gates.

## Public Repository Hygiene

- Treat every tracked file, generated artifact, fixture, benchmark, filename, commit, branch, pull
Expand Down Expand Up @@ -68,6 +118,9 @@
requests local verification or CI is unavailable.
- State the expected verification scope in subagent prompts and explicitly prohibit unnecessary full-suite runs.
- Do not delay committing and pushing a focused fix solely to repeat checks already completed successfully by another agent or CI.
- Subagents reporting performance results must include wall time, CPU time, run count, machine
load, and whether base and candidate ran on the same machine. Results lacking these are
hypotheses, not evidence.

## State and Source of Truth

Expand Down
15 changes: 11 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fensu-policy = "=0.22.0"
globset = "0.4"
proc-macro2 = { version = "1", features = ["span-locations"] }
pyo3 = { version = "0.26", features = ["abi3-py312"] }
polyglot-sql = { git = "https://github.com/chio-labs/polyglot.git", rev = "f3774102f518f716cd648e4fdebb9d8558a0b63a", default-features = false, features = [
polyglot-sql = { git = "https://github.com/chio-labs/polyglot.git", rev = "25ad011c49f2c7cd48f4427abb8fc0a6af2e4120", default-features = false, features = [
"ast-tools",
"builder",
"dialect-bigquery",
Expand Down
57 changes: 19 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ SHELL := /bin/bash

.PHONY: verify verify-quick verify-pg coverage cli-preview rust-check \
check-e2e-shards test-e2e-duckdb test-e2e-duckdb-build-core \
test-e2e-duckdb-build-incremental test-e2e-duckdb-build-virtual \
test-e2e-duckdb-cli-data test-e2e-duckdb-cli test-e2e-duckdb-virtual \
test-e2e-duckdb-build-incremental \
test-e2e-duckdb-cli-data test-e2e-duckdb-cli test-e2e-duckdb-inspection \
test-e2e-duckdb-integrations test-e2e-performance \
test-e2e-cold-compile-performance test-e2e-cache-compile-performance \
test-e2e-dense-compile-performance test-e2e-varied-cache-performance
Expand Down Expand Up @@ -102,24 +102,17 @@ E2E_DUCKDB_BUILD_INCREMENTAL_PATHS := \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_seed_watermark_build.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_snapshot_build.py

E2E_DUCKDB_BUILD_VIRTUAL_PATHS := \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_build_state.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_incremental_build.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_microbatch_lifecycle.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_mode_guard.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_promote.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_python_build.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_rollback.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_seed_build.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_virtual_source_freshness_build.py

E2E_DUCKDB_CLI_DATA_PATHS := \
tests/e2e/src/sqlbuild/cli/commands/main/load \
tests/e2e/src/sqlbuild/cli/commands/main/providers \
tests/e2e/src/sqlbuild/cli/commands/main/scenario
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_scenario.py \
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_capture.py \
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_namespace.py

E2E_DUCKDB_CLI_PATHS := \
tests/e2e/scripts/cli_preview \
tests/e2e/scripts/compile_performance_ratio \
tests/e2e/src/sqlbuild/cli/commands/main/adapters \
tests/e2e/src/sqlbuild/cli/commands/main/audit \
tests/e2e/src/sqlbuild/cli/commands/main/bigquery \
Expand All @@ -144,23 +137,20 @@ E2E_DUCKDB_CLI_PATHS := \
tests/e2e/src/sqlbuild/cli/commands/main/sqlserver \
tests/e2e/src/sqlbuild/cli/commands/main/test

E2E_DUCKDB_VIRTUAL_PATHS := \
E2E_DUCKDB_INSPECTION_PATHS := \
tests/e2e/src/sqlbuild/cli/commands/main/clone \
tests/e2e/src/sqlbuild/cli/commands/main/diff \
tests/e2e/src/sqlbuild/cli/commands/main/janitor \
tests/e2e/src/sqlbuild/cli/commands/main/plan \
tests/e2e/src/sqlbuild/cli/commands/main/reconcile \
tests/e2e/src/sqlbuild/cli/commands/main/state
tests/e2e/src/sqlbuild/cli/commands/main/plan

E2E_DUCKDB_INTEGRATIONS_PATHS := tests/e2e/src/sqlbuild/integrations

E2E_DUCKDB_PATHS := \
$(E2E_DUCKDB_BUILD_CORE_PATHS) \
$(E2E_DUCKDB_BUILD_INCREMENTAL_PATHS) \
$(E2E_DUCKDB_BUILD_VIRTUAL_PATHS) \
$(E2E_DUCKDB_CLI_DATA_PATHS) \
$(E2E_DUCKDB_CLI_PATHS) \
$(E2E_DUCKDB_VIRTUAL_PATHS) \
$(E2E_DUCKDB_INSPECTION_PATHS) \
$(E2E_DUCKDB_INTEGRATIONS_PATHS)

define run_e2e_duckdb
Expand Down Expand Up @@ -199,17 +189,15 @@ test-e2e-duckdb-build-core:
test-e2e-duckdb-build-incremental:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_BUILD_INCREMENTAL_PATHS))

test-e2e-duckdb-build-virtual:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_BUILD_VIRTUAL_PATHS))

test-e2e-duckdb-cli-data:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_CLI_DATA_PATHS))

test-e2e-duckdb-cli:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_CLI_PATHS))

test-e2e-duckdb-virtual:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_VIRTUAL_PATHS))
test-e2e-duckdb-inspection:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_INSPECTION_PATHS))

test-e2e-duckdb-integrations:
$(call run_e2e_duckdb,$@,$(E2E_DUCKDB_INTEGRATIONS_PATHS))
Expand All @@ -218,10 +206,9 @@ check-e2e-shards:
bash scripts/check_e2e_shards.sh \
--shard build-core $(E2E_DUCKDB_BUILD_CORE_PATHS) \
--shard build-incremental $(E2E_DUCKDB_BUILD_INCREMENTAL_PATHS) \
--shard build-virtual $(E2E_DUCKDB_BUILD_VIRTUAL_PATHS) \
--shard cli-data $(E2E_DUCKDB_CLI_DATA_PATHS) \
--shard cli $(E2E_DUCKDB_CLI_PATHS) \
--shard virtual $(E2E_DUCKDB_VIRTUAL_PATHS) \
--shard inspection $(E2E_DUCKDB_INSPECTION_PATHS) \
--shard integrations $(E2E_DUCKDB_INTEGRATIONS_PATHS)


Expand All @@ -244,6 +231,13 @@ test-e2e-cold-compile-performance:
-m cold_compile_performance -k "models_$(SQLBUILD_BENCHMARK_MODELS)" \
-vv --log-cli-level=INFO --color=yes

.PHONY: test-e2e-diagnostic-compile-performance
test-e2e-diagnostic-compile-performance:
env PYTHONUNBUFFERED=1 SQLBUILD_CONCURRENCY=4 uv run pytest \
tests/e2e/src/sqlbuild/cli/commands/main/compile/test_diagnostic_compile_performance.py \
-n auto --dist loadfile -m cold_compile_performance \
-vv -rP --log-level=INFO --log-cli-level=INFO --color=yes

test-e2e-dense-compile-performance:
test -n "$(SQLBUILD_BENCHMARK_MODELS)"
env PYTHONUNBUFFERED=1 SQLBUILD_CONCURRENCY=4 uv run pytest \
Expand All @@ -266,17 +260,6 @@ test-e2e-varied-cache-performance:
-n auto --dist loadfile -m cache_compile_performance \
-vv -rP --log-level=INFO --log-cli-level=INFO --color=yes

test-virtual:
@mkdir -p /tmp/opencode
@log="/tmp/opencode/test-virtual-$$(date +%Y%m%d-%H%M%S).log"; \
echo "Logging to $$log"; \
env PYTHONUNBUFFERED=1 TESTCONTAINERS_RYUK_DISABLED=true SQLBUILD_CONCURRENCY=$(SQLBUILD_CONCURRENCY) uv run pytest \
$(VIRTUAL_TEST_ROOTS) \
-k "$(VIRTUAL_TEST_KEYWORD)" \
-m "not dbt and not performance" -vv --color=yes -n auto --dist loadfile 2>&1 | tee "$$log"; \
status=$${PIPESTATUS[0]}; \
echo "TEST_VIRTUAL_EXIT=$$status (log: $$log)" | tee -a "$$log"; \
exit $$status


skills:
Expand All @@ -290,8 +273,6 @@ export DBT_EXECUTABLE

SQLBUILD_CONCURRENCY ?= 8

VIRTUAL_TEST_ROOTS ?= tests/e2e/src/sqlbuild/cli/commands/main tests/e2e/src/sqlbuild/integrations/dagster
VIRTUAL_TEST_KEYWORD ?= virtual or reconcile or diff or janitor or snapshot or dagster


test-dbt:
Expand Down
Loading
Loading