[Bug] Write run_results.json
even if we encounter an exception on main thread
#11012
Closed
2 tasks done
Is this a new bug in dbt-core?
Current Behavior
run_results.json
is not present if an exception is encountered on the main thread; this is a problem because we run hooks on the main threadException is caught here:
dbt-core/core/dbt/cli/requires.py
Line 158 in 359a2c0
Expected Behavior
run_results.json
should be written out regardless of error on main thread.Steps To Reproduce
❯ cat dbt_project.yml ... on-run-end: - "{{ rce() }}" ...
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
We have similar code for handling exceptions on runner threads:
dbt-core/core/dbt/task/run.py
Lines 805 to 813 in 89caa33
The scope of this issue is to port this work to the main thread for hooks.
The text was updated successfully, but these errors were encountered: