Skip to content

fix: collect all NoNodeForYamlKey errors instead of stopping at first when using --warn-error-options#12564

Open
kalluripradeep wants to merge 1 commit intodbt-labs:mainfrom
kalluripradeep:fix-warn-error-all-errors
Open

fix: collect all NoNodeForYamlKey errors instead of stopping at first when using --warn-error-options#12564
kalluripradeep wants to merge 1 commit intodbt-labs:mainfrom
kalluripradeep:fix-warn-error-all-errors

Conversation

@kalluripradeep
Copy link
Contributor

Fixes #12339

What changed

When using --warn-error-options '{"error": ["NoNodeForYamlKey"]}',
dbt was only surfacing the first missing node error and stopping.
All subsequent patches in the YAML were never processed.

Root cause

In PatchParser.parse(), warn_or_error() raises EventCompilationError
immediately on the first missing node, exiting the loop early.

Fix

Wrapped self.parse_patch() in a try/except EventCompilationError
block so the loop continues, collects all errors, and raises them
together at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant