You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A breaking change to a model with an enforced contract should raise a warning (but CI will still succeed)
Unless that model is versioned, in which case dbt understands that its API is locked in
If it is versioned, you can add a new version (or just bump the existing model's version) to facilitate the breaking change
If it's just a warning, you can still optionally promote that warning to an error (without messing with model versions) via the --warn-error / --warn-error-optionsconfig
Acceptance criteria
As the create of a model with an enforced contract, if I remove/type/rename column(s) relative to a previous invocation, I should see a warning if I perform a state comparison (state:modified).
That warning/event should have a unique name, and I should be able to promote that warning to an error via --warn-error or --warn-error-options.
As the creator of a versioned model with an enforced contract, if I remove/retype/rename column(s) relative to a previous invocation, I should still see an error if I perform a state comparison (state:modified).
github-actionsbot
changed the title
[ModelGov3] Turn "Breaking Change to Contract" into warning, unless model is versioned
[CT-2969] [ModelGov3] Turn "Breaking Change to Contract" into warning, unless model is versioned
Aug 14, 2023
Housekeeping
Short description
--warn-error
/--warn-error-options
configAcceptance criteria
As the create of a model with an enforced contract, if I remove/type/rename column(s) relative to a previous invocation, I should see a warning if I perform a state comparison (
state:modified
).That warning/event should have a unique name, and I should be able to promote that warning to an error via
--warn-error
or--warn-error-options
.As the creator of a versioned model with an enforced contract, if I remove/retype/rename column(s) relative to a previous invocation, I should still see an error if I perform a state comparison (
state:modified
).Impact to Adapters
zero impact
Context
Context & conversation:
dbt-core/core/dbt/contracts/graph/nodes.py
Lines 761 to 780 in 8350dfe
The text was updated successfully, but these errors were encountered: