Skip to content

fix: warn on contract.enforced=true for materialized_view#1421

Merged
sd-db merged 4 commits into
mainfrom
sd-db/fix/1279-mv-contract-enforced-warning
May 4, 2026
Merged

fix: warn on contract.enforced=true for materialized_view#1421
sd-db merged 4 commits into
mainfrom
sd-db/fix/1279-mv-contract-enforced-warning

Conversation

@sd-db
Copy link
Copy Markdown
Collaborator

@sd-db sd-db commented Apr 23, 2026

Resolves #1279

Upstream dbt does not support contracts on materialized views (docs). dbt-databricks was silently accepting contract.enforced: true, hiding yml/SQL drift. This PR emits a warning pointing at the dbt docs. Strictly additive; no existing build outcome changes.

Checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Coverage report

This PR does not seem to contain any modification to coverable code.

@sd-db sd-db force-pushed the sd-db/fix/1279-mv-contract-enforced-warning branch from 7bcdd83 to 590de2b Compare April 23, 2026 11:54
@sd-db sd-db force-pushed the sd-db/fix/1279-mv-contract-enforced-warning branch from 590de2b to 16bb7c8 Compare April 23, 2026 12:00
@sd-db sd-db self-assigned this Apr 23, 2026
Upstream dbt does not support contracts on materialized views
(https://docs.getdbt.com/docs/mesh/govern/model-contracts). dbt-databricks
was silently accepting the flag, hiding yml/SQL drift. Now emits a warning
pointing at the dbt docs. Strictly additive; existing build outcomes and
constraint behavior are unchanged.

Co-authored-by: Isaac
sd-db added 2 commits April 25, 2026 18:06
Reword to call out dbt's official "not supported" stance and
dbt-databricks' best-effort behavior that may change without notice.
Drops the implication that we do nothing — we partially honor it.

Co-authored-by: Isaac
sd-db added a commit that referenced this pull request Apr 27, 2026
…1422)

Makes the unit vs functional test split explicit in AGENTS.md. The
current section distinguishes the two by where they live and how they
run, but the rule for *what each type should assert* was conveyed only
through examples. A contributor could reasonably put specific-warning or
compiled-SQL assertions in a functional test without tripping any review
signal (surfaced in #1421 review).

Adds two short paragraphs: the principle (functional = outcomes, unit =
specifics) and a note that trivial macro additions do not need a test.

### 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
- [ ] I have updated the `CHANGELOG.md` and added information about my
change to the "dbt-databricks next" section.

> Docs-only change; CHANGELOG entry intentionally omitted.
@sd-db sd-db merged commit a1daff7 into main May 4, 2026
7 checks passed
@sd-db sd-db deleted the sd-db/fix/1279-mv-contract-enforced-warning branch May 4, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Materialized views silently ignore contract.enforced: true

2 participants