Skip to content

Commit f15ddfd

Browse files
authored
ci: add post-merge min-deps parse gate (#1460)
### Description Post-merge CI gate. Installs dbt-databricks at `uv pip install --resolution lowest-direct` and runs `dbt parse` against an embedded minimal project. Catches constraint ranges that admit versions the code doesn't support. ### Testing [Run 25900943714](https://github.com/databricks/dbt-databricks/actions/runs/25900943714) — gate fired and failed with the `model_validator from pydantic` ImportError that broke 1.12.0's release verification. Run was via a temporary `pull_request:` trigger, reverted in the next commit. Validates the full pipeline (JFrog proxy + protected runner + uv lowest-direct + dbt parse). ### Checklist - [x] I have run this code in development and it appears to resolve the stated issue - [x] This PR includes tests, or tests are not required/relevant for this PR - [x] I have updated the `CHANGELOG.md` and added information about my change to the "dbt-databricks next" section.
1 parent 7575351 commit f15ddfd

5 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Installs dbt-databricks at lowest-direct dependency resolution and
2+
# runs `dbt parse`, catching constraint ranges that admit versions
3+
# the code doesn't support. Default test paths resolve to
4+
# highest-compatible versions, so lower bounds drift untested.
5+
#
6+
# Runs post-merge rather than on PRs because fork PRs cannot issue
7+
# the OIDC token required by the JFrog proxy and protected runner.
8+
# Acceptable compromise: a bad merge sits on the target branch
9+
# briefly before the gate fires, but well before any release tag.
10+
11+
name: Min-Deps Parse
12+
13+
on:
14+
push:
15+
branches:
16+
- "main"
17+
- "*.latest"
18+
workflow_dispatch:
19+
20+
permissions:
21+
id-token: write
22+
contents: read
23+
24+
defaults:
25+
run:
26+
shell: bash
27+
28+
jobs:
29+
parse-at-lowest-direct:
30+
name: dbt parse at lowest-direct resolution
31+
runs-on:
32+
group: databricks-protected-runner-group
33+
labels: linux-ubuntu-latest
34+
timeout-minutes: 5
35+
36+
steps:
37+
- name: Check out the repository
38+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
39+
40+
- name: Setup JFrog PyPI Proxy
41+
uses: ./.github/actions/setup-jfrog-pypi
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
45+
with:
46+
python-version: "3.10"
47+
48+
- name: Install uv
49+
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
50+
with:
51+
cache-local-path: ~/.cache/uv
52+
53+
- name: Install dbt-databricks at lowest-direct dep resolution
54+
run: |
55+
uv venv --python 3.10
56+
uv pip install --resolution lowest-direct .
57+
58+
- name: dbt parse against min-deps fixture
59+
run: .venv/bin/dbt parse --project-dir tests/min_deps_smoke --profiles-dir tests/min_deps_smoke

tests/min_deps_smoke/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
target/
2+
logs/
3+
dbt_packages/
4+
.user.yml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: 'min_deps_smoke'
2+
version: '1.0.0'
3+
config-version: 2
4+
5+
profile: 'min_deps_smoke'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select 1 as n

tests/min_deps_smoke/profiles.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
min_deps_smoke:
2+
target: dev
3+
outputs:
4+
dev:
5+
type: databricks
6+
schema: min_deps_smoke
7+
host: fake.databricks.test
8+
http_path: /sql/1.0/warehouses/fake
9+
token: fake-token

0 commit comments

Comments
 (0)