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. |
| 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? |
system_tests/monitoring.py
Outdated
| 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.