Closed
Conversation
While the `RetryPolicy` has a `MaxTotalDelayRetryPolicy`, the retry `loop` would only check this configured delay once the operation future actually returns a value. However, without client-side timeouts, we're not super sure the operation is actually guaranteed to return anything (even an error, IIUC). So here, we enable some coarse client-side default timeouts to ensure the polled futures eventualy return either the response *or* an error we can handle via our retry logic.
.. as some types are part of our API.
|
👋 Hi! This PR is now in draft status. |
We here make use of `reqwest`'s `retry` functionlity that was introduced with its recent v0.12.23 release. As we can't fully replace the old 'application-level' behavior just yet, we configure it to only apply for error that arent INTERNAL_SERVER_ERROR, which is the status VSS uses to send error responses. We set some default values here, but note that these can always can be overridden by the user when using the `from_client` constructor.
We drop our (~broken) `RetryPolicy`, and replace it with the new-ish retry policy that is shipping in `reqwest` since 0.12.23.
9d56321 to
269e1fa
Compare
Contributor
Author
|
Nevermind, figured out how to do this already in #39. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #39.
Blocked on seanmonstar/reqwest#2852.
We drop our (~broken)
RetryPolicy, and fully replace it with the new-ish retry policy that is shipping inreqwestsince 0.12.23.