smithy-lang / smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
https://smithy.io
Apache License 2.0
1.77k stars 209 forks source link

Fix a timing issue in the waiters retry delay calculation #2259

Closed jdisanti closed 5 months ago

jdisanti commented 5 months ago

Background

Subtracting minDelay from remainingTime results in the waiter exiting before the user's desired max wait time. This is especially apparent in models that use a minDelay value that is larger than the default 2 seconds. For example, AWS EC2 uses 15 seconds, so it would exit the waiter a full 15 seconds before the desired max wait time.

Testing

Tested these changes in the implementation of waiters for the AWS Rust SDK.

Links


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.