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 edge case where summary_message is not assigned in dbt debug #9437

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dbeatty10
Copy link
Contributor

resolves #9436

Problem

When running dbt debug in certain circumstances, I get a python stack trace that ends in the following:

UnboundLocalError: local variable 'summary_message' referenced before assignment

Solution

Two parts to the solution:

  1. Add a default summary_message
  2. Consider it an error if no profile names are found

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

@cla-bot cla-bot bot added the cla:yes label Jan 24, 2024
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2f2e0ce) 87.85% compared to head (ade867b) 87.85%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9437      +/-   ##
==========================================
- Coverage   87.85%   87.85%   -0.01%     
==========================================
  Files         150      150              
  Lines       21915    21918       +3     
==========================================
+ Hits        19253    19255       +2     
- Misses       2662     2663       +1     
Flag Coverage Δ
integration 85.30% <66.66%> (-0.01%) ⬇️
unit 62.56% <100.00%> (+0.17%) ⬆️

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.

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] UnboundLocalError: local variable 'summary_message' referenced before assignment
1 participant