Skip to content

ci: report dbt schema and downstream risks on pull requests - #10

Open
PresentJay wants to merge 1 commit into
tdub29:mainfrom
PresentJay:ci/dbt-schema-review
Open

PresentJay wants to merge 1 commit into
tdub29:mainfrom
PresentJay:ci/dbt-schema-review

Conversation

@PresentJay

@PresentJay PresentJay commented Nov 3, 2026 •

Copy link
Copy Markdown

I'm working on dbt-plan, a tool for reviewing column changes in compiled dbt models before a run. I've been trying it with existing projects, and the pitch facts and pitcher-season marts here seemed like a useful case for seeing which models a staging change could affect.

This workflow is limited to warehouse/, using its local profile and sample-data setup; it leaves the separate MLB project out. Would you be open to reviewing whether the report is useful for this repository? Please feel free to close it if not.

Prepared with AI assistance. The validation described below was run locally.

Technical notes and local checks

The warehouse project feeds pitch facts and pitcher-season marts. This adds an advisory PR schema comparison using its committed credential-free profile and sample-data setup, scoped to warehouse/; the separate MLB project remains outside this job.

The job uses pull_request, contents: read, full Git history and local compilation. The wrapper is pinned to released commit d98f06e8674a1e68a009112b90d0d00c41416c33; the installed package is pinned separately to 0.18.6. fail-on: never keeps completed findings advisory; compilation and execution errors still fail.

Local verification at upstream 727b744f02dd2d01a2112ab3bfc032b2aedd6fe8 (dbt-core 1.12.6 / dbt-duckdb 1.11.0):

  • Executed the workflow's real compile command in warehouse: dbt deps --profiles-dir . && dbt compile --profiles-dir . --no-partial-parse.
  • Replayed the pinned Action’s original install, baseline snapshot, current compile, report and gate shell blocks against the upstream base and this workflow commit. This local replay used a pre-release 0.18.6 wheel in an isolated environment. After publication, the official PyPI/GitHub wheel was verified byte-for-byte identical (SHA-256 6f0d8856e61f849b4a233e3ee8bbfa36585bb1f08f89b832cb812ca3ff4dc1b5); a fresh PyPI installation reported dbt-plan 0.18.6 with SQLGlot 30.27.0, and the recorded reports were revalidated with that installation. The existing compile/control evidence is reused because the artifact, source, toolchain and input data are unchanged. A hosted execution of this new workflow has not yet been verified. The same-source report contained 0 changed models, verdict safe, policy exit 0.
  • Temporarily removed pitcher from warehouse/models/staging/stg_trackman__pitches.sql, compiled the actual project, and ran dbt-plan check --format json: exit 1, 1 changed model marked destructive, 8 downstream risk entries. The report named dim_game, dim_pitcher, fct_pitch.
  • Restored the exact model bytes and recompiled; the unchanged check returned exit 0. The controlled deletion is absent from this PR.

This is a static compiled-SQL review. Runtime query behavior, warehouse data and model-quality results remain with the existing build/tests. No credentials or publication permissions are added.

Disclosure: I maintain dbt-plan. This contribution was prepared with AI assistance; the local commands and results above were executed and recorded. Please feel free to decline if the extra advisory summary does not fit this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant