Replies: 1 comment 5 replies
-
Something to consider, the names Also, if a body is provided with the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, retry behavior in the SDK is implicit. Retries are always enabled and not easy to disable. Making things slightly more complex, retries will never be enabled when the body is streaming because a generalized streaming body cannot be retried.
This RFC proposes several changes to improve on this behavior:
Client level retry opt-out:
<servicename>::Config
will expose a.retry_mode
setting. Retry mode can also be read from environment variables.Operation level retry opt-out: Operation builders will expose a
.retry_mode
setting:Explicitly retryable bodies: Request bodies generated by the SDK via serialization will always be retryable. Internally, these bodies use
Bytes
which is cheap to clone. The issue arises with APIs likeS3::put_object()
where the user passes a byte stream directly. We propose introducing the following trait:Generated builders will add an additional builder method,
<bodyname>_retryable
:Customers who rely on retryable inputs can use the
body_retryable
API to validate that their request will be retryable at compile time.Retryable Byte Stream Internals
Internally, will introduce a
Retryable
variant onto SDK body that contains aBox<dyn RetryableByteStream>
. There is a bit more design work here to determine the best way to wire the pieces together coherently, but these are exclusively private APIs that we can rework at any point.RetryMode
RetryMode
will be a non-exhaustive enum:Beta Was this translation helpful? Give feedback.
All reactions