-
Notifications
You must be signed in to change notification settings - Fork 427
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
Enable retries in botocore. #970
base: master
Are you sure you want to change the base?
Conversation
Unless we have firm intentions of going off botocore (see #968), I'd see this as a positive change. As you can see in the docs for Standard retry mode, botocore has logic around which exceptions are transient and good candidates for retries, as well as exponential backoff. WDYT @garrettheel? |
I'm happy to improve the patch a bit to get it "ready" (cleaning up the Also, I think that this is a plus even if we end up turning away from botcore, because this is probably a good place to do it anyway, so even in whatever abstraction we come up with, it should maybe be there. |
A unit test wouldn't need to test it, since we'd rely on botocore's own unit tests to make sure its retries work well. For an integration test... maybe write a simple server with http.server that'd proxy to the underlying dynamodb-local, and make it fail the 1st request in a predictable way? |
I'm even unsure about manual testing as I don't know how a retry-worthy response looks like from dynamo. |
Yep, this sounds good to me. Let's just try to avoid exposing the botocore interface too much so as not to shut the door to replacing the client implementation. |
One problem that we've noticed is that (and I'm not sure about this) - this change maybe doesn't retry in all of the same scenarios. Is there a way to sanely add tests for these things to make sure we are good? |
I don't know that we need tests exactly, but I think it would be helpful to do some analysis of the botocore |
Botocore has built-in retries, we should probably use them rather than reimplement in pynamodb, no?
Any thoughts?