Skip to content

Commit f5a562e

Browse files
authored
Merge branch 'main' into add_fabric_warehouse
2 parents a3a1303 + 622a36f commit f5a562e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+952
-532
lines changed

.github/workflows/pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
- uses: actions/setup-node@v4
1919
with:
2020
node-version: '22'
@@ -29,7 +29,7 @@ jobs:
2929
runs-on:
3030
labels: [ubuntu-2204-8]
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
- uses: actions/setup-node@v4
3434
with:
3535
node-version: '22'

.github/workflows/private-repo-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121
with:
2222
fetch-depth: 0
2323
- name: Set up Python
@@ -77,7 +77,7 @@ jobs:
7777
unset TWINE_USERNAME TWINE_PASSWORD && make publish-tests
7878
- name: Get GitHub App token
7979
id: get_token
80-
uses: actions/create-github-app-token@v1
80+
uses: actions/create-github-app-token@v2
8181
with:
8282
private-key: ${{ secrets.TOBIKO_RENOVATE_BOT_PRIVATE_KEY }}
8383
app-id: ${{ secrets.TOBIKO_RENOVATE_BOT_APP_ID }}

.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@v4
14+
uses: actions/checkout@v5
1515
- name: Check branch is main
1616
run: |
1717
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then

.github/workflows/release_shared_js.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release shared js code
1+
name: Release web common code
22
on:
33
workflow_dispatch:
44
inputs:
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818
- name: Check branch is main
1919
run: |
2020
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
@@ -46,13 +46,13 @@ jobs:
4646
- name: Install dependencies
4747
run: pnpm install --frozen-lockfile
4848
- name: Update package.json version
49-
working-directory: web/shared_ui
49+
working-directory: web/common
5050
run: |
5151
npm version ${{ github.event.inputs.version }} --no-git-tag-version
5252
- name: Build package
53-
working-directory: web/shared_ui
53+
working-directory: web/common
5454
run: pnpm run build
5555
- name: Publish to npm
56-
working-directory: web/shared_ui
56+
working-directory: web/common
5757
run: |
5858
npm publish

pnpm-lock.yaml

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

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,3 +303,4 @@ banned-module-level-imports = [
303303
"sqlmesh/lsp/**/*.py" = ["TID251"]
304304
"tests/lsp/**/*.py" = ["TID251"]
305305
"benchmarks/lsp*.py" = ["TID251"]
306+
"sqlmesh/dbt/builtin.py" = ["T100"]

sqlmesh/cli/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,12 @@ def diff(ctx: click.Context, environment: t.Optional[str] = None) -> None:
522522
help="Explain the plan instead of applying it.",
523523
default=None,
524524
)
525+
@click.option(
526+
"--ignore-cron",
527+
is_flag=True,
528+
help="Run all missing intervals, ignoring individual cron schedules. Only applies if --run is set.",
529+
default=None,
530+
)
525531
@click.option(
526532
"--min-intervals",
527533
default=0,
@@ -543,6 +549,7 @@ def plan(
543549
select_models = kwargs.pop("select_model") or None
544550
allow_destructive_models = kwargs.pop("allow_destructive_model") or None
545551
backfill_models = kwargs.pop("backfill_model") or None
552+
ignore_cron = kwargs.pop("ignore_cron") or None
546553
setattr(get_console(), "verbosity", Verbosity(verbose))
547554

548555
context.plan(
@@ -551,6 +558,7 @@ def plan(
551558
select_models=select_models,
552559
allow_destructive_models=allow_destructive_models,
553560
backfill_models=backfill_models,
561+
ignore_cron=ignore_cron,
554562
**kwargs,
555563
)
556564

sqlmesh/cli/project_init.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from sqlmesh.utils.date import yesterday_ds
99
from sqlmesh.utils.errors import SQLMeshError
1010

11+
from sqlmesh.core.config.common import DBT_PROJECT_FILENAME
1112
from sqlmesh.core.config.connection import (
1213
CONNECTION_CONFIG_TO_TYPE,
1314
DIALECT_TO_TYPE,
@@ -113,11 +114,10 @@ def _gen_config(
113114
- ambiguousorinvalidcolumn
114115
- invalidselectstarexpansion
115116
""",
116-
ProjectTemplate.DBT: """from pathlib import Path
117-
118-
from sqlmesh.dbt.loader import sqlmesh_config
119-
120-
config = sqlmesh_config(Path(__file__).parent)
117+
ProjectTemplate.DBT: f"""# --- Model Defaults ---
118+
# https://sqlmesh.readthedocs.io/en/stable/reference/model_configuration/#model-defaults
119+
model_defaults:
120+
start: {start or yesterday_ds()}
121121
""",
122122
}
123123

@@ -285,8 +285,13 @@ def init_example_project(
285285
cli_mode: InitCliMode = InitCliMode.DEFAULT,
286286
) -> Path:
287287
root_path = Path(path)
288-
config_extension = "py" if template == ProjectTemplate.DBT else "yaml"
289-
config_path = root_path / f"config.{config_extension}"
288+
289+
config_path = root_path / "config.yaml"
290+
if template == ProjectTemplate.DBT:
291+
# name the config file `sqlmesh.yaml` to make it clear that within the context of all
292+
# the existing yaml files DBT project, this one specifically relates to configuring the sqlmesh engine
293+
config_path = root_path / "sqlmesh.yaml"
294+
290295
audits_path = root_path / "audits"
291296
macros_path = root_path / "macros"
292297
models_path = root_path / "models"
@@ -298,7 +303,7 @@ def init_example_project(
298303
f"Found an existing config file '{config_path}'.\n\nPlease change to another directory or remove the existing file."
299304
)
300305

301-
if template == ProjectTemplate.DBT and not Path(root_path, "dbt_project.yml").exists():
306+
if template == ProjectTemplate.DBT and not Path(root_path, DBT_PROJECT_FILENAME).exists():
302307
raise SQLMeshError(
303308
"Required dbt project file 'dbt_project.yml' not found in the current directory.\n\nPlease add it or change directories before running `sqlmesh init` to set up your project."
304309
)

sqlmesh/core/config/common.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
from sqlmesh.utils.errors import ConfigError
99
from sqlmesh.utils.pydantic import field_validator
1010

11+
# Config files that can be present in the project dir
12+
ALL_CONFIG_FILENAMES = ("config.py", "config.yml", "config.yaml", "sqlmesh.yml", "sqlmesh.yaml")
13+
14+
# For personal paths (~/.sqlmesh/) where python config is not supported
15+
YAML_CONFIG_FILENAMES = tuple(n for n in ALL_CONFIG_FILENAMES if not n.endswith(".py"))
16+
17+
# Note: is here to prevent having to import from sqlmesh.dbt.loader which introduces a dependency
18+
# on dbt-core in a native project
19+
DBT_PROJECT_FILENAME = "dbt_project.yml"
20+
1121

1222
class EnvironmentSuffixTarget(str, Enum):
1323
# Intended to create virtual environments in their own schemas, with names like "<model_schema_name>__<env name>". The view name is untouched.

sqlmesh/core/config/feature_flag.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)