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

All unit_test configs in dbt_project.yaml are incorrectly identified as being unused #10311

Closed
2 tasks done
QMalcolm opened this issue Jun 13, 2024 · 0 comments · Fixed by #10312
Closed
2 tasks done
Assignees
Labels
backport 1.8.latest bug Something isn't working

Comments

@QMalcolm
Copy link
Contributor

QMalcolm commented Jun 13, 2024

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

Currently, if you specify and config for unit tests in dbt_project.yaml you get a warning for them as being unused even if they are. Notably, they will still be used, but a warning is produced that they are not. An example can be seen here dbt-labs/jaffle-shop#46

(venv) quigleymalcolm@Quigley-Malcolm jaffle-shop % dbt parse                                                                 
22:56:16  Running with dbt=1.8.2
22:56:16  Registered adapter: postgres=1.8.1
22:56:16  [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 3 unused configuration paths:
- seeds.jaffle_shop
- unit_tests.jaffle_shop
- unit_tests.jaffle_shop.marts.order_items.test_supply_costs_sum_correctly
22:56:16  Performance info: /Users/quigleymalcolm/Developer/dbt-labs/jaffle-shop/target/perf_info.json

Expected Behavior

A warning should not be produced for used unit_test config paths

(venv) quigleymalcolm@Quigley-Malcolm jaffle-shop % dbt parse                                                                 
22:56:16  Running with dbt=1.8.2
22:56:16  Registered adapter: postgres=1.8.1
22:56:16  [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- seeds.jaffle_shop
22:56:16  Performance info: /Users/quigleymalcolm/Developer/dbt-labs/jaffle-shop/target/perf_info.json

Steps To Reproduce

  1. Pull down my jaffle-shop branch qmalcolm--demo-broken-unused-config-warning-for-unit-tests
  2. Run dbt parse
  3. Observer the output

Relevant log output

No response

Environment

- OS: macOS 14.2
- Python: 3.10.14
- dbt: 1.8.2

Which database adapter are you using with dbt?

dbt-postgres

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.8.latest bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants