docs(dbt): CI/QA hardening & data-trust technical spec#2423
Conversation
Records the spec-phase design for the dbt-warehouse CI/QA hardening effort so implementation PRs (P0 ol-dbt diff, P1 fast PR CI, P1a dimensional-layering lint, pytest expansion, P2a StarRocks namespacing, P3 runtime/OM trust) have a single grounded reference with per-phase acceptance criteria. The "why": today essentially nothing runs on dbt PRs despite ~3,100 existing dbt tests and a CLI whose impact/validate commands already emit CI-ready JSON. The spec sequences the highest-confidence wins (wiring tools that exist) by credential/engine access so each phase is independently shippable. Refs #2407, #2072. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a technical specification document to guide a phased implementation of dbt CI/QA hardening and “data trust” improvements for src/ol_dbt and the ol-dbt CLI, with explicit acceptance criteria per phase and references to related issues/epics.
Changes:
- Introduces a spec document detailing Phase 0 (
ol-dbt diff) through Phase 3 (runtime/org trust), including CI workflow design and linting proposals. - Defines proposed interfaces/algorithms/output schemas for future implementation work (documentation-only; no behavior changes).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Slim-CI backbone:** `ol-dbt run` builds `dbt <sub> --select "state:modified+ | ||
| result:error+ result:fail+" --state <.dbt-state> --defer`. Saved-state dir default is |
| **Origin issue:** [#2407](https://github.com/mitodl/ol-data-platform/issues/2407) — "Add ol-dbt diff command to QA migrated mart/reporting models" | ||
| **Related epic:** #2072 (dimensional-layer migration) | ||
| **Gap analysis:** witan memory `pf-dbt-warehouse-ci-qa-gap-analysis-phased-hardenin-4a7ae1` |
- fix "driveable" -> "drivable" - collapse the Slim-CI example onto a single inline-code line and name the concrete subcommand (dbt build) instead of the ambiguous `dbt <sub>` - clarify the gap-analysis reference is an internal witan memory and note the doc is self-contained (findings summarized in-line) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks @copilot — addressed all three in 25c70f4:
|
| - **dbt invocation:** always `subprocess.run([...], cwd=str(dbt_dir))`, argv list, no | ||
| `dbtRunner`. `run.py` passes `--profiles-dir str(dbt_dir)`; `impact`/`validate` rely on | ||
| cwd. `DBT_PROFILES_DIR` is not set by the CLI. | ||
| - **Reusable libs:** |
There was a problem hiding this comment.
Bug: The specification document incorrectly lists starrocks as an existing CLI sub-app, but it is not implemented in the codebase.
Severity: LOW
Suggested Fix
Remove starrocks from the list of cyclopts.App sub-apps in the specification document to accurately reflect the current state of the codebase. It could also be noted elsewhere that starrocks is a dbt target profile, not a CLI sub-app.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/specs/DBT_WAREHOUSE_CI_QA_SPEC.md#L60
Potential issue: The specification document at `docs/specs/DBT_WAREHOUSE_CI_QA_SPEC.md`
incorrectly claims that `starrocks` is an existing `cyclopts.App` sub-app, alongside
`local`, `run`, and `generate`. A review of the codebase confirms that no
`starrocks_app` is defined, imported, or registered within the CLI application. This
factual error in the documentation could mislead developers, causing them to search for
non-existent code or misunderstand the current state of the CLI's implementation.
Did we get this right? 👍 / 👎 to inform future reviews.
What & why
Adds
docs/specs/DBT_WAREHOUSE_CI_QA_SPEC.md— the spec-phase design for the dbt-warehouse CI/QA hardening & data-trust effort (projectwp-dbt-warehouse-ci-qa-hardening-data-trust-021724, origin issue #2407, related to dimensional-migration epic #2072).Motivation: the repo has strong test content (~3,100 dbt tests, heavy
dbt_expectations) and a purpose-builtol-dbtCLI whoseimpact/validatecommands already emit--format json"for CI pipelines" — but essentially nothing runs on dbt PRs today (only pre-commit sqlfluff). The biggest confidence win is wiring tools that already exist. This spec sequences that work by credential/engine access so each phase ships independently.Contents
The doc turns the discovery-phase gap analysis into implementable designs with per-phase acceptance criteria, grounded in real file/line references:
ol-dbt diff(Add ol-dbt diff command to QA migrated mart/reporting models against pre-migration output #2407) — detailed:commands/diff.pysignature,dbt_audit_helperinpackages.yml, column-reconcile-first algorithm reusingsql_parser/manifest/yaml_registry, zero-copy viaoverride_ref/override_sourceDuckDB views, JSON schema, exit codes,test_diff.py.dbt_pr_ci.yaml: parse,ol-dbt validate,ol-dbt impactPR comment, sqlfluff, pytest.stg__/int__), with a checked-in baseline so today's 39 violators don't red-wall CI.schema_suffixnamespacing — design altitude.Section 9 has the task index/sequencing; section 10 lists open implementation questions.
Type
Documentation only — no code or behavior change. Individual phases land as their own implementation PRs.
Refs #2407, #2072.
🤖 Generated with Claude Code