dbt-labs / docs.getdbt.com

The code behind docs.getdbt.com
https://docs.getdbt.com/
Apache License 2.0
113 stars 863 forks source link

[Core] Explain `warn_error_options` vs. `warn_error` #5629

Open dbeatty10 opened 3 weeks ago

dbeatty10 commented 3 weeks ago

Link to the page(s) on docs.getdbt.com requiring updates

https://docs.getdbt.com/reference/global-configs/warnings

Tell us more about this update

We can do a better job of clearly communicating the differences between WARN_ERROR and WARN_ERROR_OPTIONS and when to use each. Also in communicating that they are mutually exclusive (but very similar).

A few suggestions:

  1. It would have helped me if this were much earlier in the page: image
  2. These two are equivalent and show how warn_error can be converted to warn_error_options -- we should give an example of this!
    dbt --warn-error test
    dbt --warn-error-options '{"error": "all"}' test
  3. Explain the trade-offs between warn_error and warn_error_options. The former is shorter to write (especially as a CLI arg) while the latter is very verbose but allows for silencing warnings you want to ignore.
  4. Maybe we suggest always using warn_error_options instead of warn_error?!
  5. Alternatively, consider warn_error just shorthand / a special case of warn_error_options where nothing is silenced and everything is an error.

Enhancement idea for dbt-core: instead of making warn_error and warn_error_options mutually exclusive, just favor warn_error_options over warn_error whenever both are provided.

Reviewers/Stakeholders/SMEs

.

Related GitHub issues

https://github.com/dbt-labs/dbt-core/issues/10274#issuecomment-2155582205

Additional information

No response