Skip to content

test: add retries to flaky datalab-migration test #8435

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

Merged
merged 6 commits into from
Nov 2, 2022
Merged

test: add retries to flaky datalab-migration test #8435

merged 6 commits into from
Nov 2, 2022

Conversation

kweinmeister
Copy link
Contributor

Wraps the existing test with the Google API Core Retry decorator. The Retry defaults looked fine, so I didn't override any parameters.

Fixes #8331.

@kweinmeister kweinmeister requested review from shollyman and a team as code owners October 23, 2022 19:11
@snippet-bot
Copy link

snippet-bot bot commented Oct 23, 2022

Here is the summary of changes.

You are about to add 2 region tags.
You are about to delete 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Oct 23, 2022
@leahecole
Copy link
Collaborator

Interesting, I didn't know/maybe I forgot that api core had a built in exponential retry. In the authoring guide we recommend backoff. Not sure if other @GoogleCloudPlatform/python-samples-reviewers have feelings about this vs. backoff. If we do stick with this, consider using the if_exception_type parameter on the specific error we're having problems with just to reduce retries on errors that are "legit"

@kweinmeister
Copy link
Contributor Author

Sounds good. Happy to make changes if needed.

BTW, I was thinking the same thing about the scope of errors. I saw that the default scope for exception types is is_transient_error, which includes common "flaky" scenarios (which we can narrow down if using this class is OK).

Copy link
Contributor

@nicain nicain left a comment

Choose a reason for hiding this comment

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

LGTM

@nicain nicain merged commit b04113a into main Nov 2, 2022
@nicain nicain deleted the issue-8330 branch November 2, 2022 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bigquery.datalab-migration.samples_test: test_datalab_load_table_from_dataframe failed
4 participants