Skip to content

[Feature] Collect all errors raised by --warn-error-options '{"error": ["NoNodeForYamlKey"]}' #12339

@kverburg

Description

@kverburg

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

We got NoNodeForYamlKey warnings, so I wanted to make sure these get raised as errors and can't be merge as CI will block it.

But when I promote those with --warn-error-options, it just raises one error and does not display all. This would result in fixing one, running again and the next error would pop up.

Expected Behavior

I would expect this option to raise all the messages I previously got as warnings, to be raises an errors.

Steps To Reproduce

  1. Add a YML with some non existing models
  2. Run dbt compile --show-all-deprecations --no-partial-parse to see all the warnings
  3. Run dbt compile --show-all-deprecations --no-partial-parse --warn-error-options '{"error": ["NoNodeForYamlKey"]}' and see that there is just one

Relevant log output

(.venv) ➜ dbt compile --show-all-deprecations --no-partial-parse                                                       
12:07:32  Running with dbt=1.11.2
12:07:37  Registered adapter: bigquery=1.10.2
12:07:41  [WARNING]: Did not find matching node for patch with name 'first' in the 'models' section of file 'models/intermediate/_schema.yml'
12:07:41  [WARNING]: Did not find matching node for patch with name 'second' in the 'models' section of file 'models/intermediate/_schema.yml'
12:07:41  [WARNING]: Did not find matching node for patch with name 'third' in the 'models' section of file 'models/intermediate/_schema.yml'

(.venv) ➜  dbt compile --show-all-deprecations --no-partial-parse --warn-error-options '{"error": ["NoNodeForYamlKey"]}'             
12:06:03  Running with dbt=1.11.2
12:06:08  Registered adapter: bigquery=1.10.2
12:06:12  Encountered an error:
Compilation Error
  [WARNING]: Did not find matching node for patch with name 'first' in the 'models' section of file 'models/intermediate/_schema.yml'

Environment

- OS: Macos 26.2
- Python: 3.12
- dbt: 1.11.2

Also tested on dbt Cloud Latest

Which database adapter are you using with dbt?

bigquery

Additional Context

No response

Metadata

Metadata

Assignees

Labels

RefinementMaintainer input neededenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions