feat(adapter): fail loud on dbt v2/Fusion (v20) manifests#1446
Draft
wcchang1115 wants to merge 3 commits into
Draft
feat(adapter): fail loud on dbt v2/Fusion (v20) manifests#1446wcchang1115 wants to merge 3 commits into
wcchang1115 wants to merge 3 commits into
Conversation
dbt v2/Fusion emits a v20 manifest; Recce's bundled dbt 1.x tops out at manifest v12 / catalog v1. Previously the path= load surfaced dbt's cryptic IncompatibleSchemaError and the data= load (upgrade_schema_version) did no version check at all. Add UnsupportedDbtSchemaError and a _guard_unsupported_schema helper that raises a clear, Recce-branded error when an artifact's schema is newer than the bundled dbt supports (found > supported), wired into both the path= and data= branches of load_manifest and load_catalog. The threshold check stays robust against a future legit dbt 1.x schema bump; older/incompatible versions keep dbt's own error. A-min only: detect + friendly message. Parsing v20 and cross-env v12-vs-v20 diff guards are tracked separately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
…ning dbt The v20 guard compared the found schema against the *running* dbt's supported version. On the tox matrix (dbt 1.6/1.7, which support manifest schema < v12), a normal v12 manifest is 'newer than supported' there, so the guard mislabeled it as dbt v2/Fusion and the v12-fixture regression test couldn't load at all. Detect Fusion against a FIXED dbt-1.x ceiling (manifest v12, catalog v1) instead — an absolute boundary, since 'is this Fusion?' doesn't depend on which dbt is installed. An artifact merely too new for the installed dbt 1.x (e.g. v12 under dbt 1.6) now keeps dbt's own version error. Replace the version-fragile positive test with a version-agnostic boundary assertion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ifest-at-load-and-fail-loud-with
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
What type of PR is this?
feat— a fail-loud guard for unsupported dbt artifact schemas.What this PR does / why we need it:
dbt v2 / Fusion emits a v20 manifest, while Recce's bundled dbt 1.x tops out at manifest v12 / catalog v1. Today:
path=load surfaces dbt's cryptic internalIncompatibleSchemaError(no mention of Recce or Fusion), anddata=load (upgrade_schema_version) did no version check at all, so a v20 dict fails opaquely.This will start hitting users during the dbt 1.x → v2 migration window (e.g. base/prod on 1.x emitting v12, PR branch on Fusion emitting v20).
This PR adds
UnsupportedDbtSchemaErrorand a_guard_unsupported_schemahelper, wired into both thepath=anddata=branches ofload_manifestandload_catalog. When an artifact's schema is newer than the bundled dbt supports (found > supported), Recce now raises a clear, branded message instead of the dbt-internal one:Scope is detect + friendly message only. Actually parsing v20 and guarding v12-vs-v20 cross-environment diffs are tracked separately.
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
found > supported) rather than hardcodingv20— so a future legit dbt 1.x schema bump won't false-trigger, and genuinely older/incompatible artifacts still fall through to dbt's own error.path=branch I chose to catch-and-translate dbt'sIncompatibleSchemaErrorrather than pre-check the version myself — preserves all existing behavior and avoids re-parsing large manifests.Does this PR introduce a user-facing change?:
Yes — users feeding a dbt v2 / Fusion (v20) artifact now see a clear Recce error explaining that v2 / Fusion is not yet supported, instead of a confusing dbt-internal schema-version error.