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 fast-fail not logging original error message #2646

Merged
merged 2 commits into from
Jul 27, 2020
Merged

Fix fast-fail not logging original error message #2646

merged 2 commits into from
Jul 27, 2020

Conversation

joshpeng-quibi
Copy link
Contributor

resolves #2644

Description

The exception handling in execute_nodes() calls _cancel_connections(). For adapters that aren't cancellable, it goes down a code path that short-circuits the rest of the handling logic via a raise. This PR removes the short-circuit path which allows the handling to reach the print_run_result_error(). Prior behavior never reached there so it never printed the original error messages.

This PR also guards against iterating through a NoneType return from adapter.cancel_open_connections(). In BigQuery's case, it is always None.

Checklist

  • I have signed the CLA
  • 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
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

@cla-bot cla-bot bot added the cla:yes label Jul 24, 2020
@jtcohen6 jtcohen6 linked an issue Jul 24, 2020 that may be closed by this pull request
5 tasks
Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

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

This rocks, thanks for the quick patch! Some minor suggestions and then we'll get this in for 0.17.2.

CHANGELOG.md Outdated Show resolved Hide resolved
core/dbt/task/runnable.py Outdated Show resolved Hide resolved
Co-authored-by: Jacob Beck <beckjake@users.noreply.github.com>
@joshpeng-quibi
Copy link
Contributor Author

@beckjake Thank you sir!

Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

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

Thanks! Once tests are done, I'll get this merged.

@joshpeng-quibi
Copy link
Contributor Author

Hm, some weird

createdb.exe : The term 'createdb.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.

in the test.

@beckjake
Copy link
Contributor

I fixed this in the dev/marian-anderson branch but never merged it back here (6e161ab). We'll ignore that test for this PR, I will cherry-pick that commit into the next PR I do for 0.17.2.

@beckjake beckjake merged commit b9cf0cf into dbt-labs:dev/0.17.2 Jul 27, 2020
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.

--fail-fast with BigQuery does not show original error message
2 participants