[CT-2378] [Bug] state:modified
not catching breaking changes if model body also changes
#7282
Labels
state:modified
not catching breaking changes if model body also changes
#7282
If I change both the contract and the body of a model with an enforced contract,
state:modified
selects the model without raising the exception added in #6869 / #7216.Repro case
If I change just the yaml to
data_type: string
:But if I also change the model's SQL to
select 1::text as id
, such that the contract works again — but has still undergone a breaking change! — it's no longer being caught during thestate:modified
comparison:If I had to take a wild guess, this is because the model is first selected on the basis of the change to its
body
, before we get to thesame_contract
comparison?If I had my druthers / as a UX improvement, the
ModelContractError
message would also make clear what in the contract changed (similar to #7209). In practice, the change would also be reflected in thegit diff
, which someone could inspect in order to understand the cause for the failing CI check.The text was updated successfully, but these errors were encountered: