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 #9511: Handle exceptions for failing on-run-* hooks in source freshness #9763

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

aranke
Copy link
Member

@aranke aranke commented Mar 14, 2024

resolves #9511

Problem

on-run-* hooks were not handled in source freshness, leading to an AttributeError being thrown

Solution

If a hook fails, re-raise the exception as a 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/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

@cla-bot cla-bot bot added the cla:yes label Mar 14, 2024
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 Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.17%. Comparing base (65b366b) to head (a74c214).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9763      +/-   ##
==========================================
- Coverage   88.18%   88.17%   -0.02%     
==========================================
  Files         178      178              
  Lines       22480    22480              
==========================================
- Hits        19825    19822       -3     
- Misses       2655     2658       +3     
Flag Coverage Δ
integration 85.64% <100.00%> (-0.02%) ⬇️
unit 62.74% <0.00%> (-0.06%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aranke aranke added the artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking label Mar 18, 2024
@aranke aranke marked this pull request as ready for review March 18, 2024 15:57
@aranke aranke requested a review from a team as a code owner March 18, 2024 15:57
@aranke aranke merged commit 2c1926c into main Mar 18, 2024
62 of 63 checks passed
@aranke aranke deleted the fix_9511 branch March 18, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking cla:yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Unhandled exception for failing on-run-* hooks in source freshness
2 participants