Skip to content

Commit ac730d5

Browse files
authored
Merge branch 'main' into dvasdekis/bump-sqlglot-30-14
2 parents 2c77676 + c4524e5 commit ac730d5

90 files changed

Lines changed: 2859 additions & 681 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers/features/common-utils:2": {
4+
"version": "2.5.9",
5+
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a",
6+
"integrity": "sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a"
7+
},
8+
"ghcr.io/devcontainers/features/docker-in-docker:4": {
9+
"version": "4.0.0",
10+
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:4fa87399214366e320d489991769c4f3f461e1ffe461f54eea78a41b34945bb5",
11+
"integrity": "sha256:4fa87399214366e320d489991769c4f3f461e1ffe461f54eea78a41b34945bb5"
12+
},
13+
"ghcr.io/devcontainers/features/python:1": {
14+
"version": "1.8.0",
15+
"resolved": "ghcr.io/devcontainers/features/python@sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511",
16+
"integrity": "sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511"
17+
}
18+
}
19+
}

‎.devcontainer/devcontainer.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "SQLMesh Python Dev",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
4+
"features": {
5+
"ghcr.io/devcontainers/features/common-utils:2": {},
6+
"ghcr.io/devcontainers/features/python:1": {
7+
"version": "3.12"
8+
},
9+
"ghcr.io/devcontainers/features/docker-in-docker:4": {}
10+
},
11+
"postCreateCommand": "bash .devcontainer/post-create-command.sh",
12+
"customizations": {
13+
"vscode": {
14+
"extensions": ["ms-python.python", "ms-python.vscode-pylance"]
15+
}
16+
},
17+
"remoteUser": "vscode"
18+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# This script is intended to be run by an Ubuntu development container
4+
5+
# Exit immediately if any command returns a non-zero code
6+
set -e
7+
8+
# Install OS-level dependencies
9+
10+
## Ensure that the Microsoft package repository is available as it is required for msodbcsql18. Note that the repository
11+
## may have already been added by a development container feature (e.g. docker-in-docker or java).
12+
if apt-cache policy | grep -q 'packages.microsoft.com'; then
13+
echo "Microsoft package repository already present"
14+
else
15+
echo "Microsoft package repository not present, it will be added."
16+
17+
# ref: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
18+
curl -sSL -O https://packages.microsoft.com/config/ubuntu/$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2)/packages-microsoft-prod.deb
19+
sudo dpkg -i packages-microsoft-prod.deb
20+
rm packages-microsoft-prod.deb
21+
fi
22+
23+
ALL_DEPENDENCIES="libpq-dev netcat-traditional unixodbc-dev default-jdk msodbcsql18"
24+
sudo apt-get clean && sudo apt-get -y update && sudo ACCEPT_EULA='Y' apt-get -y install $ALL_DEPENDENCIES
25+
26+
# Install Python dependencies
27+
make install-dev

‎.github/workflows/pr.yaml‎

Lines changed: 78 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ jobs:
1616
outputs:
1717
python: ${{ steps.filter.outputs.python }}
1818
client: ${{ steps.filter.outputs.client }}
19+
vscode: ${{ steps.filter.outputs.vscode }}
1920
ci: ${{ steps.filter.outputs.ci }}
2021
steps:
21-
- uses: actions/checkout@v5
22-
- uses: dorny/paths-filter@v3
22+
- uses: actions/checkout@v7
23+
- uses: dorny/paths-filter@v4
2324
id: filter
2425
with:
2526
filters: |
@@ -34,6 +35,8 @@ jobs:
3435
- 'pyproject.toml'
3536
client:
3637
- 'web/client/**'
38+
vscode:
39+
- 'vscode/**'
3740
ci:
3841
- '.github/**'
3942
- 'Makefile'
@@ -48,9 +51,9 @@ jobs:
4851
env:
4952
UV: '1'
5053
steps:
51-
- uses: actions/checkout@v5
54+
- uses: actions/checkout@v7
5255
- name: Set up Python
53-
uses: actions/setup-python@v6
56+
uses: actions/setup-python@v7
5457
with:
5558
python-version: '3.10'
5659
- name: Install uv
@@ -79,11 +82,11 @@ jobs:
7982
PYTEST_XDIST_AUTO_NUM_WORKERS: 2
8083
UV: '1'
8184
steps:
82-
- uses: actions/checkout@v5
85+
- uses: actions/checkout@v7
8386
with:
8487
fetch-depth: 0
8588
- name: Set up Python
86-
uses: actions/setup-python@v6
89+
uses: actions/setup-python@v7
8790
with:
8891
python-version: ${{ matrix.python-version }}
8992
- name: Install uv
@@ -115,7 +118,7 @@ jobs:
115118
source .venv/bin/activate
116119
make cicd-test
117120
- name: Upload test results
118-
uses: actions/upload-artifact@v5
121+
uses: actions/upload-artifact@v7
119122
if: ${{ !cancelled() }}
120123
with:
121124
name: test-results-style-cicd-${{ matrix.python-version }}
@@ -131,11 +134,11 @@ jobs:
131134
steps:
132135
- name: Enable symlinks in git config
133136
run: git config --global core.symlinks true
134-
- uses: actions/checkout@v5
137+
- uses: actions/checkout@v7
135138
- name: Install make
136139
run: choco install make which -y
137140
- name: Set up Python
138-
uses: actions/setup-python@v6
141+
uses: actions/setup-python@v7
139142
with:
140143
python-version: '3.12'
141144
- name: Install SQLMesh dev dependencies
@@ -151,7 +154,7 @@ jobs:
151154
python --version
152155
make fast-test
153156
- name: Upload test results
154-
uses: actions/upload-artifact@v5
157+
uses: actions/upload-artifact@v7
155158
if: ${{ !cancelled() }}
156159
with:
157160
name: test-results-windows
@@ -168,11 +171,11 @@ jobs:
168171
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: '1'
169172
UV: '1'
170173
steps:
171-
- uses: actions/checkout@v5
174+
- uses: actions/checkout@v7
172175
with:
173176
fetch-depth: 0
174177
- name: Set up Python
175-
uses: actions/setup-python@v6
178+
uses: actions/setup-python@v7
176179
with:
177180
python-version: '3.10'
178181
- name: Install uv
@@ -188,22 +191,23 @@ jobs:
188191

189192
ui-style:
190193
needs: [changes]
191-
if: false
192-
# needs.changes.outputs.client == 'true' || needs.changes.outputs.ci ==
193-
# 'true' || github.ref == 'refs/heads/main'
194+
if:
195+
needs.changes.outputs.client == 'true' || needs.changes.outputs.vscode ==
196+
'true' || needs.changes.outputs.ci == 'true' || github.ref ==
197+
'refs/heads/main'
194198
runs-on: ubuntu-latest
195199
steps:
196-
- uses: actions/checkout@v5
197-
- uses: actions/setup-node@v6
200+
- uses: actions/checkout@v7
201+
- uses: actions/setup-node@v7
198202
with:
199203
node-version: '22'
200-
- uses: pnpm/action-setup@v4
204+
- uses: pnpm/action-setup@v6
201205
with:
202206
version: latest
203207
- name: Get pnpm store directory
204208
id: pnpm-cache
205209
run: echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
206-
- uses: actions/cache@v4
210+
- uses: actions/cache@v6
207211
with:
208212
path: ${{ steps.pnpm-cache.outputs.store }}
209213
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
@@ -222,7 +226,7 @@ jobs:
222226
container:
223227
image: mcr.microsoft.com/playwright:v1.54.1-jammy
224228
steps:
225-
- uses: actions/checkout@v5
229+
- uses: actions/checkout@v7
226230
- name: Install pnpm via corepack
227231
run: |
228232
npm install --global corepack@latest
@@ -252,15 +256,25 @@ jobs:
252256
fail-fast: false
253257
matrix:
254258
engine:
255-
[duckdb, postgres, mysql, mssql, trino, spark, clickhouse, risingwave, starrocks]
259+
[
260+
duckdb,
261+
postgres,
262+
mysql,
263+
mssql,
264+
trino,
265+
spark,
266+
clickhouse,
267+
risingwave,
268+
starrocks,
269+
]
256270
env:
257271
PYTEST_XDIST_AUTO_NUM_WORKERS: 2
258272
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: '1'
259273
UV: '1'
260274
steps:
261-
- uses: actions/checkout@v5
275+
- uses: actions/checkout@v7
262276
- name: Set up Python
263-
uses: actions/setup-python@v6
277+
uses: actions/setup-python@v7
264278
with:
265279
python-version: '3.12'
266280
- name: Install uv
@@ -277,7 +291,7 @@ jobs:
277291
source .venv/bin/activate
278292
make ${{ matrix.engine }}-test
279293
- name: Upload test results
280-
uses: actions/upload-artifact@v5
294+
uses: actions/upload-artifact@v7
281295
if: ${{ !cancelled() }}
282296
with:
283297
name: test-results-docker-${{ matrix.engine }}
@@ -342,9 +356,9 @@ jobs:
342356
FABRIC_TENANT_ID: ${{ secrets.FABRIC_TENANT_ID }}
343357
FABRIC_WORKSPACE_ID: ${{ secrets.FABRIC_WORKSPACE_ID }}
344358
steps:
345-
- uses: actions/checkout@v5
359+
- uses: actions/checkout@v7
346360
- name: Set up Python
347-
uses: actions/setup-python@v6
361+
uses: actions/setup-python@v7
348362
with:
349363
python-version: '3.12'
350364
- name: Install uv
@@ -385,24 +399,27 @@ jobs:
385399
./.github/scripts/manage-test-db.sh "${{ matrix.engine }}"
386400
"$TEST_DB_NAME" down
387401
- name: Upload test results
388-
uses: actions/upload-artifact@v5
402+
uses: actions/upload-artifact@v7
389403
if: ${{ !cancelled() }}
390404
with:
391405
name: test-results-cloud-${{ matrix.engine }}
392406
path: test-results/
393407
retention-days: 7
394408

395409
test-vscode:
410+
needs: changes
411+
if:
412+
needs.changes.outputs.vscode == 'true' || needs.changes.outputs.ci ==
413+
'true' || github.ref == 'refs/heads/main'
396414
env:
397415
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
398416
runs-on: ubuntu-latest
399-
if: false
400417
steps:
401-
- uses: actions/checkout@v5
402-
- uses: actions/setup-node@v6
418+
- uses: actions/checkout@v7
419+
- uses: actions/setup-node@v7
403420
with:
404421
node-version: '22'
405-
- uses: pnpm/action-setup@v4
422+
- uses: pnpm/action-setup@v6
406423
with:
407424
version: latest
408425
- name: Install dependencies
@@ -415,17 +432,17 @@ jobs:
415432
# As at 2026-01-12 this job flakes 100% of the time. It needs investigation
416433
if: false
417434
steps:
418-
- uses: actions/checkout@v5
419-
- uses: actions/setup-node@v6
435+
- uses: actions/checkout@v7
436+
- uses: actions/setup-node@v7
420437
with:
421438
node-version: '22'
422-
- uses: pnpm/action-setup@v4
439+
- uses: pnpm/action-setup@v6
423440
with:
424441
version: latest
425442
- name: Install dependencies
426443
run: pnpm install
427444
- name: Set up Python
428-
uses: actions/setup-python@v6
445+
uses: actions/setup-python@v7
429446
with:
430447
python-version: '3.12'
431448
- name: Install uv
@@ -446,22 +463,38 @@ jobs:
446463
run: |
447464
source ../../.venv/bin/activate
448465
pnpm run test:e2e
449-
- uses: actions/upload-artifact@v5
466+
- uses: actions/upload-artifact@v7
450467
if: ${{ !cancelled() }}
451468
with:
452469
name: playwright-report
453470
path: vscode/extension/playwright-report/
454471
retention-days: 30
455472
test-dbt-versions:
473+
needs: changes
474+
if:
475+
needs.changes.outputs.python == 'true' || needs.changes.outputs.ci ==
476+
'true' || github.ref == 'refs/heads/main'
456477
runs-on: ubuntu-latest
457478
strategy:
458479
fail-fast: false
459480
matrix:
460-
dbt-version: ['1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10']
481+
dbt-version:
482+
[
483+
'1.3',
484+
'1.4',
485+
'1.5',
486+
'1.6',
487+
'1.7',
488+
'1.8',
489+
'1.9',
490+
'1.10',
491+
'1.11',
492+
'1.12',
493+
]
461494
steps:
462-
- uses: actions/checkout@v5
495+
- uses: actions/checkout@v7
463496
- name: Set up Python
464-
uses: actions/setup-python@v6
497+
uses: actions/setup-python@v7
465498
with:
466499
python-version: '3.10'
467500
- name: Install uv
@@ -514,7 +547,12 @@ jobs:
514547
echo "DBT version is ${{ matrix.dbt-version }} (>= 1.6.0), keeping semantic_models and metrics sections"
515548
fi
516549
517-
make dbt-fast-test
550+
# dbt 1.6 installs without web/lsp (pydantic conflict); skip collecting those tests
551+
if [[ "${{ matrix.dbt-version }}" == "1.6" ]]; then
552+
pytest -n auto -m "dbt and fast" --reruns 3 --ignore=tests/lsp --ignore=tests/web
553+
else
554+
make dbt-fast-test
555+
fi
518556
- name: Test SQLMesh info in sushi_dbt
519557
working-directory: ./examples/sushi_dbt
520558
run: |

0 commit comments

Comments
 (0)