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

[Tidy-First] Fix node_status for hooks #10845

Merged
merged 5 commits into from
Oct 14, 2024
Merged

[Tidy-First] Fix node_status for hooks #10845

merged 5 commits into from
Oct 14, 2024

Conversation

aranke
Copy link
Member

@aranke aranke commented Oct 11, 2024

Problem

There's a discrepancy for hooks in run_results.json:

  1. result.node.node_info["node_status"] for hooks never changes from started
  2. result.status contains the actual run status for a node

This is causing the dbt Cloud IDE to report the wrong status to users.

Solution

  1. Set result.node.node_info["node_status"] at the end of hook node run
  2. Add a test for the same to ensure consistency.

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.

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.12%. Comparing base (c7d8693) to head (e9e0a7d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10845      +/-   ##
==========================================
- Coverage   89.18%   89.12%   -0.06%     
==========================================
  Files         183      183              
  Lines       23426    23430       +4     
==========================================
- Hits        20893    20883      -10     
- Misses       2533     2547      +14     
Flag Coverage Δ
integration 86.36% <100.00%> (-0.13%) ⬇️
unit 62.11% <0.00%> (-0.01%) ⬇️

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

Components Coverage Δ
Unit Tests 62.11% <0.00%> (-0.01%) ⬇️
Integration Tests 86.36% <100.00%> (-0.13%) ⬇️

@aranke aranke changed the title Fix node_status for hooks [Tidy-First] Fix node_status for hooks Oct 14, 2024
@aranke aranke marked this pull request as ready for review October 14, 2024 13:30
@aranke aranke requested a review from a team as a code owner October 14, 2024 13:30
@aranke aranke added the Skip Changelog Skips GHA to check for changelog file label Oct 14, 2024
@aranke aranke changed the title [Tidy-First] Fix node_status for hooks [Tidy-First] Fix node_status for hooks Oct 14, 2024
@aranke aranke requested a review from davidharting October 14, 2024 14:48
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

🚀

@aranke aranke merged commit ef9abe6 into main Oct 14, 2024
66 of 69 checks passed
@aranke aranke deleted the fix_node_status_hook branch October 14, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants