Skip to content

Commit d3fd190

Browse files
authored
Merge branch 'main' into fix/standalone-audit-last-in-file-macros
2 parents 1ac33c2 + 9d8302e commit d3fd190

30 files changed

Lines changed: 1621 additions & 377 deletions

‎.github/workflows/pr.yaml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
python: ${{ steps.filter.outputs.python }}
1818
client: ${{ steps.filter.outputs.client }}
1919
vscode: ${{ steps.filter.outputs.vscode }}
20+
lsp: ${{ steps.filter.outputs.lsp }}
2021
ci: ${{ steps.filter.outputs.ci }}
2122
steps:
2223
- uses: actions/checkout@v7
@@ -37,6 +38,8 @@ jobs:
3738
- 'web/client/**'
3839
vscode:
3940
- 'vscode/**'
41+
lsp:
42+
- 'sqlmesh/lsp/**'
4043
ci:
4144
- '.github/**'
4245
- 'Makefile'
@@ -427,10 +430,12 @@ jobs:
427430
- name: Run CI
428431
run: pnpm run ci
429432
test-vscode-e2e:
430-
runs-on:
431-
labels: [ubuntu-2204-8]
432-
# As at 2026-01-12 this job flakes 100% of the time. It needs investigation
433-
if: false
433+
needs: changes
434+
if:
435+
needs.changes.outputs.vscode == 'true' || needs.changes.outputs.lsp ==
436+
'true' || needs.changes.outputs.ci == 'true' || github.ref ==
437+
'refs/heads/main'
438+
runs-on: ubuntu-latest
434439
steps:
435440
- uses: actions/checkout@v7
436441
- uses: actions/setup-node@v7
@@ -453,7 +458,9 @@ jobs:
453458
source .venv/bin/activate
454459
make install-dev
455460
- name: Install code-server
456-
run: curl -fsSL https://code-server.dev/install.sh | sh
461+
# Pinned so that a code-server release cannot change the editor UI the
462+
# tests drive without the change showing up here first.
463+
run: curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.137.0
457464
- name: Install Playwright browsers
458465
working-directory: ./vscode/extension
459466
run: pnpm exec playwright install

‎Makefile‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ engine-up: engine-clickhouse-up engine-mssql-up engine-mysql-up engine-postgres-
132132
engine-down: engine-clickhouse-down engine-mssql-down engine-mysql-down engine-postgres-down engine-spark-down engine-trino-down
133133

134134
fast-test:
135-
pytest -n auto -m "fast and not cicdonly and not isolated" --junitxml=test-results/junit-fast-test.xml && pytest -m "isolated and not slow" && pytest -m "registry_isolation" && pytest -m "dialect_isolated"
135+
pytest -n auto -m "fast and not cicdonly and not isolated" --junitxml=test-results/junit-fast-test.xml && pytest -m "isolated and not slow and not fork_isolated" && pytest tests/test_forking.py::test_parallel_load -m "isolated and fork_isolated and not slow" && pytest tests/test_forking.py::test_parallel_load_multi_repo -m "isolated and fork_isolated and not slow" && pytest -m "registry_isolation" && pytest -m "dialect_isolated"
136136

137137
slow-test:
138-
pytest -n auto -m "(fast or slow) and not cicdonly and not isolated" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated"
138+
pytest -n auto -m "(fast or slow) and not cicdonly and not isolated" && pytest -m "isolated and not fork_isolated" && pytest tests/test_forking.py::test_parallel_load -m "isolated and fork_isolated" && pytest tests/test_forking.py::test_parallel_load_multi_repo -m "isolated and fork_isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated"
139139

140140
cicd-test:
141-
pytest -n auto -m "(fast or slow) and not pyspark and not isolated" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark" && pytest -m "isolated and not pyspark" && pytest -m "registry_isolation" && pytest -m "dialect_isolated"
141+
pytest -n auto -m "(fast or slow) and not pyspark and not isolated" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark" && pytest -m "isolated and not pyspark and not fork_isolated" && pytest tests/test_forking.py::test_parallel_load -m "isolated and not pyspark and fork_isolated" && pytest tests/test_forking.py::test_parallel_load_multi_repo -m "isolated and not pyspark and fork_isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated"
142142

143143
core-fast-test:
144144
pytest -n auto -m "fast and not web and not github and not dbt and not jupyter"
@@ -238,7 +238,10 @@ bigquery-test: guard-BIGQUERY_KEYFILE engine-bigquery-install
238238
pytest -n auto -m "bigquery" --reruns 3 --junitxml=test-results/junit-bigquery.xml
239239

240240
databricks-test: guard-DATABRICKS_CATALOG guard-DATABRICKS_SERVER_HOSTNAME guard-DATABRICKS_HTTP_PATH guard-DATABRICKS_CONNECT_VERSION engine-databricks-install
241-
$(PIP) install 'databricks-connect==${DATABRICKS_CONNECT_VERSION}'
241+
# Connect 15.3.x requires numpy<2 and pyarrow>=4 (no upper bound). Cap PyArrow
242+
# in the same resolve that downgrades NumPy, or PyArrow 25+ is left installed
243+
# and cannot be imported.
244+
$(PIP) install 'databricks-connect==${DATABRICKS_CONNECT_VERSION}' 'pyarrow<25'
242245
pytest -n auto -m "databricks" --reruns 3 --junitxml=test-results/junit-databricks.xml
243246

244247
redshift-test: guard-REDSHIFT_HOST guard-REDSHIFT_USER guard-REDSHIFT_PASSWORD guard-REDSHIFT_DATABASE engine-redshift-install

‎docs/integrations/engines/clickhouse.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In general, you must be connected to a ClickHouse server to execute commands. By
4949

5050
To associate an object with a cluster, DDL commands that create or modify it must include the text `ON CLUSTER [your cluster name]`.
5151

52-
If you provide a cluster name in your SQLMesh connection configuration, SQLMesh will automatically inject the `ON CLUSTER` statement into the DDL commands for all objects created while executing the project. We provide more information about clusters in SQLMesh [below](#cluster-specification).
52+
If you provide a cluster name in your SQLMesh connection configuration, SQLMesh automatically adds `ON CLUSTER` to object DDL, except for metadata DDL targeting `Replicated` databases, which replicate those changes themselves. We provide more information about clusters in SQLMesh [below](#cluster-specification).
5353

5454
#### ClickHouse Cloud mode
5555

@@ -96,7 +96,9 @@ For example, we could create a table `my_schema.my_table` on cluster `TheCluster
9696

9797
To create SQLMesh objects on a cluster, provide the cluster name to the `cluster` key in the SQLMesh connection definition (see all connection parameters [below](#localbuilt-in-scheduler)).
9898

99-
SQLMesh will automatically inject the `ON CLUSTER` clause and cluster name you provide into all project DDL statements.
99+
SQLMesh automatically adds the `ON CLUSTER` clause and cluster name you provide to object DDL, except for metadata DDL targeting `Replicated` databases. SQLMesh retains `ON CLUSTER` for database creation and removal and for partition operations.
100+
101+
Partition overwrites in multi-shard `Replicated` databases remain unvalidated. ClickHouse can replicate an ALTER containing both `REPLACE PARTITION` and `DROP PARTITION`, which can conflict with `ON CLUSTER`. This behavior predates the metadata DDL policy described above and depends on the ClickHouse version.
100102

101103
## Model definition
102104

0 commit comments

Comments
 (0)