-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 exception handling masking on cleanup (#997) #1000
Conversation
3cfde94
to
47db27f
Compare
dbt/node_runners.py
Outdated
'Error releasing connection for node {}: {!s}' | ||
.format(node_name, exc) | ||
) | ||
logger.debug(traceback.format_exc()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think traceback
isn't imported here
I gave this a spin locally and found one issue around a missing import. When I imported
It's a little funky that the line:
shows up in the terminal. I think that's due to I was able to test this out by spinning up a postgres server:
then ctrl-c'ing it mid-run. This model is helpful:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments above
Ok, comments addressed - I lowered that error back to debug and added the missing import. |
ship it! |
…id raising during exception handling
…essage on python 2.7
10630f5
to
22d4a1d
Compare
Fix #997 by improving error handling during cleanup.
I'm not sure this is exactly what we want, but the general idea here is:
except:
block, stash the exception.I don't have logs for the original failure so this is about as good as I can do. I suspect we'll also need to add explicit handling for SSL errors and converting them into RuntimeExceptions if we haven't already. At the end of the day, the bad error message comes from how main.py handles non-dbt errors.