Skip to content

Commit dc8dabb

Browse files
authored
Merge pull request #558 from brooklyn-data/bug/ci-rd2-fix
Bug: Fix start of week CI
2 parents 6d37fa0 + 7fe0ce1 commit dc8dabb

5 files changed

Lines changed: 112 additions & 51 deletions

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,30 @@ jobs:
121121
DBT_ENV_SECRET_GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
122122
strategy:
123123
fail-fast: false
124-
# Throttle parallelism — 42 slots × full cloud setup would hammer
125-
# Snowflake and pile up runner billing. 8 in flight gives a release
126-
# validation that completes in ~30–40 minutes.
124+
# Throttle parallelism to be a good neighbour to the shared cloud
125+
# warehouses and to bound runner billing. With the EOL versions
126+
# dropped (see comment below) the matrix is ~15 slots, so 8 in flight
127+
# completes a release validation quickly.
127128
max-parallel: 8
128129
matrix:
130+
# dbt versions 1.3–1.8 were dropped from CI on 2026-05-26. They
131+
# cannot run on the runner's Python 3.12 (`distutils`, removed in
132+
# 3.12, is imported by dbt-core ≤1.7) and predate the `microbatch`
133+
# incremental strategy (a 1.9 feature) that the test fixture uses.
134+
# Keeping them green would require a legacy Python 3.11 lane plus
135+
# per-version gates — pure tech debt for versions dbt Labs has
136+
# already EOL'd.
137+
#
138+
# This is a CI-COVERAGE change only, not a support drop:
139+
# - `require-dbt-version` in dbt_project.yml still allows ≥1.3.0,
140+
# so consumers on older dbt can still install the package — it's
141+
# simply no longer verified each release.
142+
# - The `tox.ini` envs for 1.3–1.8 are intentionally KEPT so a
143+
# maintainer can still run e.g. `tox -e integration_snowflake_
144+
# 1_5_0` on a local Python 3.11 to debug a consumer report.
145+
# - The formal support-floor bump (require-dbt-version → ≥1.9,
146+
# removing the tox envs) is a separate 3.0.0 decision.
147+
# See specs/ci-rework/README.md §12.3.
129148
include:
130149
# "Latest" (unversioned env per warehouse) — picks up the
131150
# highest adapter release at the time the workflow runs.
@@ -144,48 +163,21 @@ jobs:
144163
- { warehouse: snowflake, dbt_version: "1_11_0" }
145164
- { warehouse: snowflake, dbt_version: "1_10_0" }
146165
- { warehouse: snowflake, dbt_version: "1_9_0" }
147-
- { warehouse: snowflake, dbt_version: "1_8_0" }
148-
- { warehouse: snowflake, dbt_version: "1_7_0" }
149-
- { warehouse: snowflake, dbt_version: "1_6_0" }
150-
- { warehouse: snowflake, dbt_version: "1_5_0" }
151-
- { warehouse: snowflake, dbt_version: "1_4_0" }
152-
- { warehouse: snowflake, dbt_version: "1_3_0" }
153166

154167
# BigQuery
155168
- { warehouse: bigquery, dbt_version: "1_11_0" }
156169
- { warehouse: bigquery, dbt_version: "1_10_0" }
157170
- { warehouse: bigquery, dbt_version: "1_9_0" }
158-
- { warehouse: bigquery, dbt_version: "1_8_0" }
159-
- { warehouse: bigquery, dbt_version: "1_7_0" }
160-
- { warehouse: bigquery, dbt_version: "1_6_0" }
161-
- { warehouse: bigquery, dbt_version: "1_5_0" }
162-
- { warehouse: bigquery, dbt_version: "1_4_0" }
163-
- { warehouse: bigquery, dbt_version: "1_3_0" }
164171

165172
# Postgres — no upstream 1.11 release as of 2026-05-12.
166173
- { warehouse: postgres, dbt_version: "1_10_0" }
167174
- { warehouse: postgres, dbt_version: "1_9_0" }
168-
- { warehouse: postgres, dbt_version: "1_8_0" }
169-
- { warehouse: postgres, dbt_version: "1_7_0" }
170-
- { warehouse: postgres, dbt_version: "1_6_0" }
171-
- { warehouse: postgres, dbt_version: "1_5_0" }
172-
- { warehouse: postgres, dbt_version: "1_4_0" }
173-
- { warehouse: postgres, dbt_version: "1_3_0" }
174-
175-
# Trino — no upstream 1.11 / 1.9 / 1.8 releases.
175+
176+
# Trino — no upstream 1.11 / 1.9 / 1.8 releases; 1.10 is latest.
176177
- { warehouse: trino, dbt_version: "1_10_0" }
177-
- { warehouse: trino, dbt_version: "1_7_0" }
178-
- { warehouse: trino, dbt_version: "1_6_0" }
179-
- { warehouse: trino, dbt_version: "1_5_0" }
180-
- { warehouse: trino, dbt_version: "1_4_0" }
181-
- { warehouse: trino, dbt_version: "1_3_0" }
182178

183-
# SQL Server — adapter lags, only 1.9/1.8/1.7/1.4/1.3 published.
179+
# SQL Server — adapter lags; 1.9 is the latest published.
184180
- { warehouse: sqlserver, dbt_version: "1_9_0" }
185-
- { warehouse: sqlserver, dbt_version: "1_8_0" }
186-
- { warehouse: sqlserver, dbt_version: "1_7_0" }
187-
- { warehouse: sqlserver, dbt_version: "1_4_0" }
188-
- { warehouse: sqlserver, dbt_version: "1_3_0" }
189181

190182
steps:
191183
- name: Checkout

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ fct_dbt__test_executions
4545

4646
See the generated [dbt docs site](https://brooklyn-data.github.io/dbt_artifacts/#!/overview) for documentation on each model.
4747

48+
## Supported dbt versions
49+
50+
As of `2.11.0`, the package's CI verifies against **dbt 1.9 and newer**.
51+
Older versions (1.3–1.8) may continue to work but are **no longer verified
52+
in CI** — dbt Labs has marked them end-of-life and they cannot run on the
53+
Python 3.12 toolchain our CI uses. The package still *installs* on dbt
54+
≥1.3.0 (`require-dbt-version` is unchanged), so existing users are not
55+
blocked; we simply can no longer confirm new releases against those
56+
versions. If you rely on dbt < 1.9, pin a known-good `dbt_artifacts`
57+
release in your `packages.yml`.
58+
4859
## Quickstart
4960

5061
1. Add this package to your `packages.yml`:

scripts/ci/_lib.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,3 @@ ensure_github_sha() {
7171
log "GITHUB_SHA not set; using ${GITHUB_SHA}"
7272
fi
7373
}
74-
75-
# Set DBT_VERSION (used in schema names) if not set. Defaults to empty (which
76-
# is what the `integration_<warehouse>` envs use — no version suffix).
77-
ensure_dbt_version() {
78-
export DBT_VERSION="${DBT_VERSION:-}"
79-
}

scripts/ci/test.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,20 @@ if (( needs_compose )); then
9494
fi
9595

9696
ensure_github_sha
97-
ensure_dbt_version
9897

99-
banner "Running ${tox_env} (warehouse=${warehouse}, dbt_version=${dbt_version:-latest})"
98+
# Bridge the positional dbt_version arg into the DBT_VERSION env var so it
99+
# reaches dbt (via tox passenv) and lands in the schema/dataset name built in
100+
# integration_test_project/profiles.yml. Without this, DBT_VERSION stays empty
101+
# and every matrix job within a warehouse shares ONE schema
102+
# (dbt_artifacts_test_commit__<sha>). Parallel cloud-warehouse jobs then
103+
# collide on the same tables — on BigQuery this surfaces as 409 Already
104+
# Exists / 429 rate limits / "table not found in location". The positional
105+
# arg is the source of truth and wins over any inherited DBT_VERSION. An
106+
# empty value (the unversioned "latest" env) is intentional and safe: there
107+
# is exactly one such job per warehouse, so it can't collide with itself.
108+
export DBT_VERSION="${dbt_version}"
100109

101-
# Export DBT_VERSION so it reaches tox (which then passes it to dbt via
102-
# passenv). Already ensured non-empty default above.
103-
export DBT_VERSION
110+
banner "Running ${tox_env} (warehouse=${warehouse}, dbt_version=${dbt_version:-latest})"
104111

105112
uv run tox -e "${tox_env}"
106113

specs/ci-rework/README.md

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -692,15 +692,72 @@ as a no-op after survey. See 12.2 introduction.)
692692

693693
### 12.3. Test matrix debt
694694

695-
#### 12.3.1. Drop EOL dbt versions — **planned, not yet executed**
695+
#### 12.3.0. Update from the 2026-05-26 weekly regression — **executed**
696+
697+
The first weekly Tier 3 regression against `main` failed broadly. Triage
698+
of all 43 matrix jobs found **two independent root causes**, and we acted
699+
on both. This update supersedes the original 12.3.1 plan below for the
700+
CI-coverage portion (we dropped 1.3–**1.8**, not just 1.3–1.6, and did it
701+
now rather than deferring to 3.0.0).
702+
703+
**Root cause 1 — `DBT_VERSION` schema collision (a real bug, now fixed).**
704+
`scripts/ci/test.sh` read the positional `dbt_version` arg into a local
705+
variable used only to pick the tox env name, but never assigned it to the
706+
`DBT_VERSION` environment variable that `integration_test_project/
707+
profiles.yml` interpolates into the schema/dataset name. `_lib.sh`'s
708+
`ensure_dbt_version()` then defaulted it to empty. Result: every matrix
709+
job within a warehouse wrote to the **same** schema
710+
(`dbt_artifacts_test_commit__<sha>`, note the empty version segment).
711+
Under `max-parallel: 8`, parallel jobs on the shared cloud warehouses
712+
collided — BigQuery surfaced it as `409 Already Exists` / `429 rate
713+
limit` / `table not found in location`, failing supported versions 1.9
714+
and 1.10. Container-isolated warehouses (postgres/trino/sqlserver) and
715+
Snowflake happened to survive, but Snowflake was equally at risk.
716+
**Fix:** `test.sh` now does `export DBT_VERSION="${dbt_version}"`; the
717+
misleading `ensure_dbt_version()` helper was removed from `_lib.sh`. Each
718+
pinned version now gets a distinct schema. This bug was invisible locally
719+
because we only ever ran one job at a time.
720+
721+
**Root cause 2 — EOL versions can't run on the runner.** dbt 1.3–1.7
722+
import `distutils` (removed in Python 3.12) and die at `dbt clean`; dbt
723+
1.3–1.8 predate the `microbatch` incremental strategy (a 1.9 feature)
724+
that the test fixture uses. Making them green would need a legacy
725+
Python 3.11 lane plus per-version gates — tech debt for versions dbt
726+
Labs has already EOL'd.
727+
728+
**Decision (revising 12.3.1): drop dbt 1.3–1.8 from the CI matrix now.**
729+
Keep 1.9 / 1.10 / 1.11 / latest. This is a **CI-coverage change, not a
730+
support drop**:
731+
732+
- `require-dbt-version` in `dbt_project.yml` is **unchanged** (still
733+
`>=1.3.0`), so older-dbt consumers can still install the package — it's
734+
simply no longer verified each release.
735+
- The `tox.ini` envs for 1.3–1.8 are **kept** so a maintainer can run
736+
e.g. `tox -e integration_snowflake_1_5_0` on a local Python 3.11 to
737+
debug a consumer report.
738+
- A consumer-facing note was added to `README.md` ("Supported dbt
739+
versions").
740+
- The **formal** support-floor bump (`require-dbt-version``>=1.9`,
741+
removing the tox envs) remains a separate **3.0.0** decision with the
742+
announcement drafted in 12.3.1. This update is Phase 1 (CI descope)
743+
brought forward; it does not pre-empt that announcement.
744+
745+
**Files changed:** `scripts/ci/test.sh`, `scripts/ci/_lib.sh`,
746+
`.github/workflows/release.yml` (matrix 42 → 15 slots), `README.md`.
696747

697-
**Status:** Decision made (Option B below). Execution deferred to a
698-
separate branch + PR after a broad announcement. The next major
699-
release of `dbt_artifacts` (3.0.0) will land the removal. Update this
700-
section when execution begins.
748+
---
749+
750+
#### 12.3.1. Drop EOL dbt versions — original plan (see 12.3.0 for what shipped)
751+
752+
**Status:** The CI-coverage portion was executed early — see 12.3.0. The
753+
**formal support-floor bump** (require-dbt-version + tox env removal +
754+
public announcement) is still planned for 3.0.0; the data, options, and
755+
draft announcement below remain the reference for that. Note 12.3.0 went
756+
one version further than the original Option B (dropped 1.7 and 1.8 from
757+
CI too), because the Monday run proved they can't run on the CI runner.
701758

702-
**Decision: drop dbt 1.3, 1.4, 1.5, 1.6 from the test matrix.** Keep
703-
1.7, 1.8, 1.9, 1.10, 1.11 (where adapter releases exist).
759+
**Original decision: drop dbt 1.3, 1.4, 1.5, 1.6 from the test matrix.**
760+
Keep 1.7, 1.8, 1.9, 1.10, 1.11 (where adapter releases exist).
704761

705762
##### The data
706763

0 commit comments

Comments
 (0)