fix: retry on body support#3294
Conversation
|
I'd need to adjust testing and also scope properly the validation for the body; will try to do it Today's evening |
ronag
left a comment
There was a problem hiding this comment.
isDisturbed already handles this. not sure what this is trying to fix?
|
Yeah, the |
|
Saw what you mean, the issue is that the handler was not wrapping the body as done for redirect handler e.g. I made an abstraction and will open other PRs to remove the duplication and use the abstraction instead |
mcollina
left a comment
There was a problem hiding this comment.
I'm -1 to this implementation.
I don't think POST, PUT etc should be retried. If we want to retry them, we need to provide an on-disk store and write the content down there, so it can be resumed. The user should enable this manually.
So you suggest to just remove them from the |
|
PUT should be idempotent so I don't see why not retry. |
|
But I don't think that has anything to do with this PR? |
The retry handler supports retrying network errors, and in my case (I filed the original bug) I was retrying requests that never even made it to the upstream. In my case, the connection got reset when kubernetes deployed a new set of pods (I suspect there's another Additionally, not all It's not clear what role an on-disk store would play in these scenarios. I'm making a simple request with a string body that I want retried, but |
|
Part of the problem is that you are using fetch? Retries are not really part of the standard. |
Okay, that's fair I guess. I'm using the I took what you said above literally, in that "this problem doesn't exist if you don't use At this point I've worked around this issue by using Thanks for the responses and effort here, everybody. I'll keep an eye on |
|
@metcoder95 PUT POST etc are not idempotent ;). Note that this does not fix the issue. That fix should be to not convert to a stream things that are not. |
Oh sure, I'm not implying that As @sdelano exemplifies, the The biggest issue comes with stateful bodies (i.e. The PR just attempts to identify and not retry on stateful bodies (buffers and strings can be retried "safely" up to the user). I can also extend documentation to highlight this. Are we ok moving this way or we prefer to take another direction? |
This relates to...
Closes #3288
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status