dbt-labs/dbt-core

[Bug] `flags.warn_error_options.silence` should be settable `dbt_project.yml`

jtcohen6 opened this issue · 0 comments

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Missing silence here:

def convert_config(config_name, config_value):
"""Convert the values from config and original set_from_args to the correct type."""
ret = config_value
if config_name.lower() == "warn_error_options" and type(config_value) == dict:
ret = WarnErrorOptions(
include=config_value.get("include", []),
exclude=config_value.get("exclude", []),
valid_error_names=ALL_EVENT_NAMES,
)
return ret

Expected Behavior

def convert_config(config_name, config_value):
    """Convert the values from config and original set_from_args to the correct type."""
    ret = config_value
    if config_name.lower() == "warn_error_options" and type(config_value) == dict:
        ret = WarnErrorOptions(
            include=config_value.get("include", []),
            exclude=config_value.get("exclude", []),
            valid_error_names=ALL_EVENT_NAMES,
            silence=config_value.get("silence", []),  # this line is missing above
        )
    return ret

Steps To Reproduce

  1. Create a project with a test in it
# dbt_project.yml
flags:
  warn_error_options:
    silence:
      - TestsConfigDeprecation

tests:  # has been renamed to data_tests
  +enabled: true
  1. dbt parse -> still see the deprecation warning ("The tests config has been renamed to data_tests")
  2. Apply the patch shown above -> dbt parse -> no deprecation warning

Relevant log output

No response

Environment

- Python: 3.10.11
- dbt: 1.8.0

Which database adapter are you using with dbt?

No response

Additional Context

No response