-
Notifications
You must be signed in to change notification settings - Fork 274
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
Fix ClientPayloadError
while reading
#787
Conversation
There were no tests added in #601 so I don't know how to proceed. If there are any suggestions on how to implement tests, I'm happy to follow up |
That is fine |
Unfortunately, there isn't a way I know of to get the moto server or any other mock to cause the case you were seeing. Se, as long as this doesn't break anything, but it fixes your workflow, we should be good. |
@martindurant can you enable the workflow for CI, please? |
I wonder if there's anything we can do about a retry wrapping around _call_s3, which itself has retries. Once the read on the body fails, I don't know whether it's possible/useful to try to repeat just that part. |
As it is right now, if the read on the body fails, the entire request is repeated. I think this is a requirement since I doubt the body is still valid after such a failure. The fact that there is a duplicated retry in case of an exception in I see three options
|
@martindurant is it possible to get a patch release with this once merged? |
OK, I will merge this as it is, and consider refactoring in the future. Thanks for contributing! A release should be out in the next few days. |
Closes #786
The
_call_and_read
pattern was already implemented for_cat_file
in #601 so I'm just applying this pattern again. I don't know the library well enough to judge if this can be refactored somehow else but I would prefer to separate fix from the refactor