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

[Bug] warn_error_options.silence not working within dbt_project.yml #10278

Closed
2 tasks done
dbeatty10 opened this issue Jun 7, 2024 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@dbeatty10
Copy link
Contributor

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

CLI flag works:

dbt --warn-error-options '{"error": "all", "silence": ["TestsConfigDeprecation"]}' test --no-partial-parse

Environment variable works:

export DBT_WARN_ERROR_OPTIONS='{"error": "all", "silence": ["TestsConfigDeprecation"]}'
dbt test --no-partial-parse

But project flag in dbt_project.yml is not working for me no matter what I try:

flags:
  warn_error_options: {"error": "all", "silence": ["TestsConfigDeprecation"]}
flags:
  warn_error_options:
    error: all
    silence:
      - TestsConfigDeprecation
dbt test --no-partial-parse

Expected Behavior

I was expecting that the code example here would work to silence the warning. Instead, I get this:

[WARNING]: Deprecated functionality
The `tests` config has been renamed to `data_tests`. Please see
https://docs.getdbt.com/docs/build/data-tests#new-data_tests-syntax for more
information.

Steps To Reproduce

Create these files:

seeds/my_seed.csv

id
1

seeds/_seeds.yml

seeds:
  - name: my_seed
    columns:
      - name: id
        tests:
          - not_null

dbt_project.yml

# Seems to ignore the "silence" configuration (but still recognizes the "error" configuration):
flags:
  warn_error_options: {"error": "all", "silence": ["TestsConfigDeprecation"]}

Run these commands:

dbt seed

This raises an error presumably because the flags.warn_error_options.silence in dbt_project.yml it not taking effect:

dbt test --no-partial-parse

But silence works if using the CLI instead:

dbt test --no-partial-parse --warn-error-options '{"error": "all", "silence": ["TestsConfigDeprecation"]}'

Relevant log output

Compilation Error
  [WARNING]: Deprecated functionality
  The `tests` config has been renamed to `data_tests`. Please see
  https://docs.getdbt.com/docs/build/data-tests#new-data_tests-syntax for more
  information.

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

No response

Additional Context

Originally discovered here: #10274 (comment)

@dbeatty10 dbeatty10 added bug Something isn't working triage labels Jun 7, 2024
@graciegoheen
Copy link
Contributor

Closing as a dupe of #10160

@graciegoheen graciegoheen closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
@dbeatty10 dbeatty10 removed the triage label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants