Add dbt 1.12 to CI matrix (AI Notes)
Background
CI already tests dbt versions 1.3–1.10 via the test-dbt-versions job in .github/workflows/pr.yaml. dbt-core 1.12 is released; SQLMesh should add it to the matrix.
Steps
- Add
'1.12' to the CI matrix in .github/workflows/pr.yaml: dbt-version: ['1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10', '1.11', '1.12']
- Verify locally before opening PR:
uv venv .venv && source .venv/bin/activate
UV=1 make install-dev-dbt-1.12
make dbt-fast-test
cd examples/sushi_dbt && sqlmesh info --skip-connection
- Fix Makefile if install fails (install-dev-dbt-% in Makefile):
- 1.12 uses the default path (pins all
dbt-* to ~=1.12.0)
- If dependency resolution fails, may need special handling like 1.10 (some adapters unpinned:
dbt-duckdb, dbt-bigquery, etc.)
- Fix tests if needed:
- Version-gated tests in
tests/dbt/ using DBT_VERSION from sqlmesh/dbt/util.py
- Feature gates in
sqlmesh/dbt/ (e.g. DBT_VERSION >= (1, 9, 0) for event_time)
- No CI script changes expected for 1.12:
>= 1.6 → keeps semantic_models/metrics in test fixtures
>= 1.5 → keeps version params in sushi_dbt example
- Not 1.6 → runs full make dbt-fast-test (not the stripped pytest path)
Gotchas
- Dependency conflicts: 1.10 needed special Makefile handling (unpin some adapters). 1.12 may need similar.
- numpy: Makefile applies numpy<2 for dbt 1.3–1.5 and 1.10 only. If 1.12 install pulls numpy 2 and breaks, extend the awk condition.
- pydantic: Only 1.6 skips web/lsp install. 1.12 should install full dev deps.
- dbt-duckdb pin in pyproject.toml: Base pyproject.toml has dbt-duckdb>=1.7.1 — install-dev-dbt-1.12 temporarily rewrites this during install, then restores.
- dbt-snowflake!=1.10.1: Base pyproject excludes a bad snowflake release; verify 1.12 snowflake adapter resolves cleanly.
- New breaking changes: 1.12 may introduce manifest/adapter API changes not present in 1.11 — watch for new test failures beyond dependency resolution.
Acceptance criteria
Add dbt 1.12 to CI matrix (AI Notes)
Background
CI already tests dbt versions 1.3–1.10 via the
test-dbt-versionsjob in.github/workflows/pr.yaml. dbt-core 1.12 is released; SQLMesh should add it to the matrix.Steps
'1.12'to the CI matrix in .github/workflows/pr.yaml:dbt-version: ['1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10', '1.11', '1.12']dbt-*to~=1.12.0)dbt-duckdb,dbt-bigquery, etc.)tests/dbt/usingDBT_VERSIONfromsqlmesh/dbt/util.pysqlmesh/dbt/(e.g.DBT_VERSION >= (1, 9, 0)forevent_time)>= 1.6→ keeps semantic_models/metrics in test fixtures>= 1.5→ keeps version params insushi_dbtexampleGotchas
Acceptance criteria
'1.12'intest-dbt-versionsmatrixUV=1 make install-dev-dbt-1.12succeeds locallymake dbt-fast-testpassessqlmesh info --skip-connectionworks inexamples/sushi_dbt