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

Add retry of additional errors #2694

Merged
merged 5 commits into from Aug 12, 2020

Conversation

kconvey
Copy link
Contributor

@kconvey kconvey commented Aug 11, 2020

resolves #1579

Description

This is a follow-up to #1963 which I've been sitting on for a while, which adds a few more errors to the class of retryable errors in BigQuery, and re-opens a connection for some that involve a broken connection. Would love to get this out of our local patches :)

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 Aug 11, 2020
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.

I have some suggestions on the mechanics of the error type checks (isinstance takes a tuple of types instead of requiring multiple calls), but otherwise this looks good to me!

As always, thanks for your contribution to dbt! Please remember to add yourself to the contributors list in the changelog as well.

Comment on lines 407 to 408
for type in REOPENABLE_ERRORS:
if isinstance(error, type):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just do if isinstance(error, REOPENABLE_ERRORS) here, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL. Done.

Comment on lines 451 to 452
for error_type in RETRYABLE_ERRORS:
if isinstance(error, error_type):
Copy link
Contributor

Choose a reason for hiding this comment

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

See above, I think this can just be if isinstance(error, RETRYABLE_ERRORS)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@kconvey kconvey requested a review from beckjake August 11, 2020 21:39
@kconvey
Copy link
Contributor Author

kconvey commented Aug 11, 2020

Thanks for the quick review! Believe I got the changes you requested @beckjake

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! I'll get this merged, it'll go out in 0.18.0

@beckjake beckjake merged commit 1bd82d4 into dbt-labs:dev/marian-anderson Aug 12, 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.

dbt seed should retry on bigquery when it tells us to
2 participants