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

Fix #11012: Catch DbtRuntimeError for hooks #11023

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Fix #11012: Catch DbtRuntimeError for hooks #11023

merged 2 commits into from
Nov 21, 2024

Conversation

aranke
Copy link
Member

@aranke aranke commented Nov 21, 2024

Resolves #11012

Problem

DbtRuntimeError was not caught for hooks, which resulted in run_results.json not being written.

Solution

Explicitly catch DbtRuntimeError

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.13%. Comparing base (a42303c) to head (5f3dad1).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11023      +/-   ##
==========================================
- Coverage   89.15%   89.13%   -0.03%     
==========================================
  Files         183      183              
  Lines       23764    23764              
==========================================
- Hits        21186    21181       -5     
- Misses       2578     2583       +5     
Flag Coverage Δ
integration 86.43% <100.00%> (-0.10%) ⬇️
unit 62.17% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.17% <0.00%> (ø)
Integration Tests 86.43% <100.00%> (-0.10%) ⬇️
---- 🚨 Try these New Features:

@aranke aranke marked this pull request as ready for review November 21, 2024 18:32
@aranke aranke requested a review from a team as a code owner November 21, 2024 18:32
Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that it ended up being pretty simple!

@aranke aranke closed this Nov 21, 2024
@aranke aranke reopened this Nov 21, 2024
@aranke aranke added the cla:yes label Nov 21, 2024
@aranke aranke closed this Nov 21, 2024
@aranke aranke reopened this Nov 21, 2024
@aranke aranke merged commit f582ac2 into main Nov 21, 2024
157 of 158 checks passed
@aranke aranke deleted the fix_11012 branch November 21, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Write run_results.json even if we encounter an exception on main thread
3 participants