Skip to content

Commit 0d872ed

Browse files
authored
Merge branch 'main' into test-local-flag
2 parents 3b090c5 + 18074a8 commit 0d872ed

9 files changed

Lines changed: 800 additions & 448 deletions

File tree

‎.github/workflows/pr.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ jobs:
470470
path: vscode/extension/playwright-report/
471471
retention-days: 30
472472
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'
473477
runs-on: ubuntu-latest
474478
strategy:
475479
fail-fast: false

‎.prettierignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ docs
3030
examples
3131
posts
3232
.circleci
33+
.github/
3334
README.md
3435
mkdocs.yml
3536
.readthedocs.yaml

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ See [docs/development.md](docs/development.md) for full setup instructions. Key
6565
python -m venv .venv
6666
source .venv/bin/activate
6767
make install-dev
68-
make style # Run before submitting
68+
make style # Run before submitting
6969
make fast-test # Quick test suite
7070
```
7171

72+
Optionally, `make install-pre-commit` installs git hooks so ruff and mypy run on `git commit`. Hooks do not replace `make style`: they run on staged files, while CI runs `make style` across the tree.
73+
7274
## Coding Standards
7375

7476
- Run `make style` before submitting a pull request

‎docs/development.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Once you have activated your virtual environment, you can install the dependenci
4242
make install-dev
4343
```
4444

45-
Optionally, you can use pre-commit to automatically run linters/formatters:
45+
Optionally, `make install-pre-commit` installs git hooks so ruff and mypy run on `git commit`. Hooks do not replace `make style`: they run on staged files, while CI runs `make style` across the tree.
4646

4747
```bash
4848
make install-pre-commit

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
},
66
"scripts": {
77
"ci": "pnpm run lint && pnpm run -r ci",
8-
"fmt": "prettier --write .",
9-
"fmt:check": "prettier --check .",
8+
"fmt": "prettier --write vscode web/client web/common",
9+
"fmt:check": "prettier --check vscode web/client web/common",
1010
"lint": "pnpm run fmt:check && pnpm run -r lint",
1111
"lint:fix": "pnpm run fmt && pnpm run -r lint:fix"
1212
},

‎pnpm-lock.yaml‎

Lines changed: 777 additions & 440 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/core/engine_adapter/integration/__init__.py‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from __future__ import annotations
22

3+
import hashlib
34
import os
45
import pathlib
6+
import secrets
57
import sys
68
import typing as t
79
import time
@@ -20,7 +22,7 @@
2022
from sqlmesh.core.engine_adapter import SparkEngineAdapter, TrinoEngineAdapter, AthenaEngineAdapter
2123
from sqlmesh.core.engine_adapter.shared import DataObject
2224
from sqlmesh.core.model.definition import SqlModel, load_sql_based_model
23-
from sqlmesh.utils import random_id
25+
from sqlmesh.utils import ALPHANUMERIC, random_id
2426
from sqlmesh.utils.date import to_ds
2527
from sqlmesh.utils.pydantic import PydanticModel
2628
from tests.utils.pandas import compare_dataframes
@@ -205,7 +207,13 @@ def __init__(
205207
self.mark = mark
206208
self.gateway = gateway
207209
self._columns_to_types = columns_to_types
208-
self.test_id = random_id(short=True)
210+
# The id is appended to schema names, so it has to keep concurrent test params apart
211+
# while staying short: temp table names built from these schemas are already close to
212+
# Postgres's 63 character identifier limit. A tag derived from the param guarantees two
213+
# params never share a schema, and the random part separates concurrent runs and retries.
214+
param_tag = hashlib.sha1(mark.encode()).hexdigest()[:3]
215+
random_part = "".join(secrets.choice(ALPHANUMERIC) for _ in range(5))
216+
self.test_id = f"{param_tag}{random_part}"
209217
self._context: t.Optional[Context] = None
210218
self.is_remote = is_remote
211219
self._schemas: t.List[

‎vscode/extension/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@
180180
"typescript": "^5.8.3",
181181
"typescript-eslint": "^8.38.0",
182182
"vitest": "^3.2.4",
183-
"yaml": "^2.8.0"
183+
"yaml": "^2.9.0"
184184
}
185185
}

‎web/server/api/endpoints/files.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,6 @@ def _get_file_with_content(file_path: Path, relative_path: str) -> models.File:
181181

182182
return models.File(
183183
name=file_path.name,
184-
path=relative_path,
184+
path=str(Path(relative_path).as_posix()),
185185
content=content,
186186
)

0 commit comments

Comments
 (0)