Skip to content

Commit 7c36d9d

Browse files
authored
Merge branch 'main' into feature/DRM/resolve-starlette-deprecation-warnings
2 parents ed68d52 + e6ac0e5 commit 7c36d9d

16 files changed

Lines changed: 387 additions & 32 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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/java:1": {
14+
"version": "1.8.1",
15+
"resolved": "ghcr.io/devcontainers/features/java@sha256:8157bab2d8d71e40b2f3128c162fab763e2b11038fdd33784549290a5d386b48",
16+
"integrity": "sha256:8157bab2d8d71e40b2f3128c162fab763e2b11038fdd33784549290a5d386b48"
17+
},
18+
"ghcr.io/devcontainers/features/python:1": {
19+
"version": "1.8.0",
20+
"resolved": "ghcr.io/devcontainers/features/python@sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511",
21+
"integrity": "sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511"
22+
}
23+
}
24+
}

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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/java:1": {
10+
"version": "21"
11+
},
12+
"ghcr.io/devcontainers/features/docker-in-docker:4": {}
13+
},
14+
"postCreateCommand": "bash .devcontainer/post-create-command.sh",
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"ms-python.python",
19+
"ms-python.vscode-pylance"
20+
]
21+
}
22+
},
23+
"remoteUser": "vscode"
24+
}
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: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
client: ${{ steps.filter.outputs.client }}
1919
ci: ${{ steps.filter.outputs.ci }}
2020
steps:
21-
- uses: actions/checkout@v5
22-
- uses: dorny/paths-filter@v3
21+
- uses: actions/checkout@v7
22+
- uses: dorny/paths-filter@v4
2323
id: filter
2424
with:
2525
filters: |
@@ -48,7 +48,7 @@ jobs:
4848
env:
4949
UV: '1'
5050
steps:
51-
- uses: actions/checkout@v5
51+
- uses: actions/checkout@v7
5252
- name: Set up Python
5353
uses: actions/setup-python@v6
5454
with:
@@ -79,7 +79,7 @@ jobs:
7979
PYTEST_XDIST_AUTO_NUM_WORKERS: 2
8080
UV: '1'
8181
steps:
82-
- uses: actions/checkout@v5
82+
- uses: actions/checkout@v7
8383
with:
8484
fetch-depth: 0
8585
- name: Set up Python
@@ -115,7 +115,7 @@ jobs:
115115
source .venv/bin/activate
116116
make cicd-test
117117
- name: Upload test results
118-
uses: actions/upload-artifact@v5
118+
uses: actions/upload-artifact@v7
119119
if: ${{ !cancelled() }}
120120
with:
121121
name: test-results-style-cicd-${{ matrix.python-version }}
@@ -131,7 +131,7 @@ jobs:
131131
steps:
132132
- name: Enable symlinks in git config
133133
run: git config --global core.symlinks true
134-
- uses: actions/checkout@v5
134+
- uses: actions/checkout@v7
135135
- name: Install make
136136
run: choco install make which -y
137137
- name: Set up Python
@@ -151,7 +151,7 @@ jobs:
151151
python --version
152152
make fast-test
153153
- name: Upload test results
154-
uses: actions/upload-artifact@v5
154+
uses: actions/upload-artifact@v7
155155
if: ${{ !cancelled() }}
156156
with:
157157
name: test-results-windows
@@ -168,7 +168,7 @@ jobs:
168168
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: '1'
169169
UV: '1'
170170
steps:
171-
- uses: actions/checkout@v5
171+
- uses: actions/checkout@v7
172172
with:
173173
fetch-depth: 0
174174
- name: Set up Python
@@ -193,7 +193,7 @@ jobs:
193193
# 'true' || github.ref == 'refs/heads/main'
194194
runs-on: ubuntu-latest
195195
steps:
196-
- uses: actions/checkout@v5
196+
- uses: actions/checkout@v7
197197
- uses: actions/setup-node@v6
198198
with:
199199
node-version: '22'
@@ -203,7 +203,7 @@ jobs:
203203
- name: Get pnpm store directory
204204
id: pnpm-cache
205205
run: echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
206-
- uses: actions/cache@v4
206+
- uses: actions/cache@v5
207207
with:
208208
path: ${{ steps.pnpm-cache.outputs.store }}
209209
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
@@ -222,7 +222,7 @@ jobs:
222222
container:
223223
image: mcr.microsoft.com/playwright:v1.54.1-jammy
224224
steps:
225-
- uses: actions/checkout@v5
225+
- uses: actions/checkout@v7
226226
- name: Install pnpm via corepack
227227
run: |
228228
npm install --global corepack@latest
@@ -258,7 +258,7 @@ jobs:
258258
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: '1'
259259
UV: '1'
260260
steps:
261-
- uses: actions/checkout@v5
261+
- uses: actions/checkout@v7
262262
- name: Set up Python
263263
uses: actions/setup-python@v6
264264
with:
@@ -277,7 +277,7 @@ jobs:
277277
source .venv/bin/activate
278278
make ${{ matrix.engine }}-test
279279
- name: Upload test results
280-
uses: actions/upload-artifact@v5
280+
uses: actions/upload-artifact@v7
281281
if: ${{ !cancelled() }}
282282
with:
283283
name: test-results-docker-${{ matrix.engine }}
@@ -342,7 +342,7 @@ jobs:
342342
FABRIC_TENANT_ID: ${{ secrets.FABRIC_TENANT_ID }}
343343
FABRIC_WORKSPACE_ID: ${{ secrets.FABRIC_WORKSPACE_ID }}
344344
steps:
345-
- uses: actions/checkout@v5
345+
- uses: actions/checkout@v7
346346
- name: Set up Python
347347
uses: actions/setup-python@v6
348348
with:
@@ -385,7 +385,7 @@ jobs:
385385
./.github/scripts/manage-test-db.sh "${{ matrix.engine }}"
386386
"$TEST_DB_NAME" down
387387
- name: Upload test results
388-
uses: actions/upload-artifact@v5
388+
uses: actions/upload-artifact@v7
389389
if: ${{ !cancelled() }}
390390
with:
391391
name: test-results-cloud-${{ matrix.engine }}
@@ -398,7 +398,7 @@ jobs:
398398
runs-on: ubuntu-latest
399399
if: false
400400
steps:
401-
- uses: actions/checkout@v5
401+
- uses: actions/checkout@v7
402402
- uses: actions/setup-node@v6
403403
with:
404404
node-version: '22'
@@ -415,7 +415,7 @@ jobs:
415415
# As at 2026-01-12 this job flakes 100% of the time. It needs investigation
416416
if: false
417417
steps:
418-
- uses: actions/checkout@v5
418+
- uses: actions/checkout@v7
419419
- uses: actions/setup-node@v6
420420
with:
421421
node-version: '22'
@@ -446,7 +446,7 @@ jobs:
446446
run: |
447447
source ../../.venv/bin/activate
448448
pnpm run test:e2e
449-
- uses: actions/upload-artifact@v5
449+
- uses: actions/upload-artifact@v7
450450
if: ${{ !cancelled() }}
451451
with:
452452
name: playwright-report
@@ -459,7 +459,7 @@ jobs:
459459
matrix:
460460
dbt-version: ['1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10']
461461
steps:
462-
- uses: actions/checkout@v5
462+
- uses: actions/checkout@v7
463463
- name: Set up Python
464464
uses: actions/setup-python@v6
465465
with:

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
ui-build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v7
1313
- uses: actions/setup-node@v6
1414
with:
1515
node-version: '22'
@@ -21,7 +21,7 @@ jobs:
2121
- name: Build UI
2222
run: pnpm --prefix web/client run build
2323
- name: Upload UI build artifact
24-
uses: actions/upload-artifact@v5
24+
uses: actions/upload-artifact@v7
2525
with:
2626
name: ui-dist
2727
path: web/client/dist/
@@ -31,9 +31,9 @@ jobs:
3131
needs: ui-build
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v7
3535
- name: Download UI build artifact
36-
uses: actions/download-artifact@v4
36+
uses: actions/download-artifact@v8
3737
with:
3838
name: ui-dist
3939
path: web/client/dist/
@@ -61,7 +61,7 @@ jobs:
6161
gh-release:
6262
runs-on: ubuntu-latest
6363
steps:
64-
- uses: actions/checkout@v5
64+
- uses: actions/checkout@v7
6565
with:
6666
fetch-depth: 0
6767
- name: Create release on GitHub

.github/workflows/release_extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v7
1515
- name: Check branch is main
1616
run: |
1717
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then

.github/workflows/release_shared_js.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v7
1818
- name: Check branch is main
1919
run: |
2020
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then

docs/development.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ Before you begin, ensure you have the following installed on your machine. Exact
1111
* OpenJDK >= 11
1212
* Python >= 3.9 < 3.13
1313

14+
### Windows Prerequisites
15+
16+
The development environment of SQLMesh depends both on:
17+
18+
* Symbolic links in the repository which, whilst available on Windows, typically require additional permissions for the process running git, and;
19+
* Some Python functionality (e.g. `SIGUSR1`) that is only available on UNIX systems. Whilst this functionality is gated so shouldn't error on Windows, the development container enables its use.
20+
21+
For the Python functionality, a development container is provided to develop against Ubuntu 24 with Python 3.12.
22+
23+
For symbolic links, you must ensure that when checking out the repository:
24+
25+
* The git configuration `core.symlinks` is set to `true` (this also needs to be done before bind mount, i.e. when the development container is started)
26+
* The process that git runs as is permitted to create symbolic links. This can typically be done by running git as an administrator, or enabling [developer mode on Windows](https://learn.microsoft.com/en-us/windows/advanced-settings/developer-mode).
27+
28+
Development containers are supported by [a number of IDEs](https://containers.dev/supporting.html). For developers using VSCode, [Microsoft has a tutorial on how to use development containers](https://code.visualstudio.com/docs/devcontainers/tutorial).
29+
1430
## Virtual environment setup
1531

1632
We do recommend using a virtual environment to develop SQLMesh.

docs/guides/multi_engine.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ SQLMesh enables this decoupling by supporting multiple engine adapters within a
1111
Configuring your project to use multiple engines follows a simple process:
1212

1313
- Include all required [gateway connections](../reference/configuration.md#connection) in your configuration.
14-
- Specify the `gateway` to be used for execution in the `MODEL` DDL.
14+
- Set `model_defaults.gateway` to the gateway most models should use, and override individual models
15+
with `gateway` in the `MODEL` DDL when needed.
1516

16-
If no gateway is explicitly defined for a model, the [default_gateway](../reference/configuration.md#default-gateway) of the project is used.
17+
If no gateway is explicitly defined for a model, SQLMesh uses the project's
18+
[`model_defaults.gateway`](../reference/model_configuration.md#model-defaults), when configured,
19+
and otherwise uses its [default_gateway](../reference/configuration.md#default-gateway). This lets
20+
all managed models in a project use a gateway without repeating it in every model definition.
1721

1822
By default, virtual layer views are created in the `default_gateway`. This approach requires that all engines can read from and write to the same shared catalog, so a view in the `default_gateway` can access a table in another gateway.
1923

docs/reference/model_configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,15 @@ The SQLMesh project-level `model_defaults` key supports the following options, d
193193
- allow_partials
194194
- enabled
195195
- interval_unit
196+
- gateway
196197
- pre_statements (described [here](../concepts/models/sql_models.md#pre--and-post-statements))
197198
- post_statements (described [here](../concepts/models/sql_models.md#pre--and-post-statements))
198199
- on_virtual_update (described [here](../concepts/models/sql_models.md#on-virtual-update-statements))
199200

201+
The `gateway` default applies to managed SQL, Python, and seed models. It does not apply to
202+
external models because an external model's `gateway` selects a gateway-specific source
203+
definition. Set that gateway explicitly in `external_models.yaml` when needed.
204+
200205

201206
### Model Naming
202207

0 commit comments

Comments
 (0)