Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2910] [Mesh] Restructure ContractBreakingChangeError message to explicitly list breaking changes #8282

Closed
1 task done
Tracked by #7979
MichelleArk opened this issue Aug 2, 2023 · 0 comments · Fixed by #8451
Closed
1 task done
Tracked by #7979

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Aug 2, 2023

Housekeeping

  • I am a maintainer of dbt-core

Short description

The current error message:

Breaking Change to Contract Error in model model_x (model_x.sql)
  While comparing to previous project state, dbt detected a breaking change to an enforced contract.
  
  The contract's enforcement has been disabled.

results in confusion because it's unclear that the "The contract's enforcement has been disabled." is the breaking change, as opposed to an effect that dbt had as a result of a command.

The ContractBreakingChangeError already aggregates breaking changes into a list, so it should be a matter of updating the formatting here!

Acceptance critera

The error message is formatted as a list, where each list element is a breaking change (more than one are possible in the scope of a single ContractBreakingChangeError exception)

For example,

While comparing to previous project state, dbt detected one or more breaking changes to a model with an enforced contract.
  - Contract enforcement was removed: Previously, this model's configuration included contract: {enforced: true}. It is no longer configured to enforce its contract, and this is a breaking change.
  - Columns were removed:
     - this_column_will_be_removed
     - this_one_too
  - Columns with data_type changes:
     - id (integer -> text)
     - another_column (date -> string)

Context

Refinement issue: #8029 (includes reproduction steps)

@github-actions github-actions bot changed the title [Mesh] Restructure ContractBreakingChangeError message to explicitly list breaking changes [CT-2910] [Mesh] Restructure ContractBreakingChangeError message to explicitly list breaking changes Aug 2, 2023
@emmyoop emmyoop self-assigned this Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants