-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 More Retries to 400 on Query #2412
Conversation
@dhermes Can't do much about all the retrying but I think this will fix the test. |
@@ -26,6 +26,7 @@ | |||
|
|||
retry_404 = RetryErrors(NotFound, max_tries=5) | |||
retry_404_500 = RetryErrors((NotFound, InternalServerError)) | |||
retry_400_500 = RetryErrors((BadRequest, InternalServerError)) | |||
retry_500 = RetryErrors(InternalServerError) | |||
retry_503 = RetryErrors(ServiceUnavailable) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thanks for the quick turnaround @waprin! |
You can tweak the retry defaults like the initial delay and the number of retries. |
@waprin This doesn't fix the issue reported in #2402. I just checked out the stacktrace and it happens when the iterator is cast to a list: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/af4f346e238e1a45ff5754335b9f8a4d98708e49/system_tests/monitoring.py#L212 |
@dhermes does it look right to you now? |
@@ -206,7 +206,7 @@ def _has_timeseries(result): | |||
return len(list(result)) > 0 | |||
retry_result = RetryResult(_has_timeseries, max_tries=7)( | |||
client.query) | |||
return RetryErrors(BadRequest)(retry_result) | |||
return RetryErrors(BadRequest, max_tries=7)(retry_result) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM pending Travis. Can you
|
@dhermes travis green |
Fixes #2402.