Skip to content
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

Override smithy client retry config #1528

Closed

Conversation

ymwjbxxq
Copy link

@ymwjbxxq ymwjbxxq commented Jul 5, 2022

Motivation and Context

The current Retry logic is incorrect because the current behaviour is to generate random values before retrying, but other AWS SDK follow the rule:

  • 100ms for all services
  • 50ms for DynamoDB

awslabs/aws-sdk-rust#567

Description

  • I changed the base to have a default of 100ms
  • I exposed a method to overwrite the default value
  • Calculating the backoff using the base of the configuration

Testing

  1. Added integration test overriding the base value
  2. Running all tests inside the rust-runtime/aws-smithy-client

All other commands in the readme like "./gradlew aws:rust-runtime:cargoTest" are failing with

./gradlew aws:rust-runtime:cargoTest

> Configure project :codegen-server-test
(scanned and found a Smithy CLI version 1.21.0. You will need to add an explicit dependency on smithy-model if publishing a JAR)

> Configure project :codegen-test
(scanned and found a Smithy CLI version 1.21.0. You will need to add an explicit dependency on smithy-model if publishing a JAR)

> Configure project :aws:sdk
(scanned and found a Smithy CLI version 1.21.0. You will need to add an explicit dependency on smithy-model if publishing a JAR)

> Configure project :aws:sdk-codegen-test
(scanned and found a Smithy CLI version 1.22.0. You will need to add an explicit dependency on smithy-model if publishing a JAR)

> Configure project :codegen-server-test:python
(scanned and found a Smithy CLI version 1.21.0. You will need to add an explicit dependency on smithy-model if publishing a JAR)

FAILURE: Build failed with an exception.

* What went wrong:
Task 'cargoTest' not found in project ':aws:rust-runtime'.

* Try:
> Run gradlew tasks to get a list of available tasks.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
9 actionable tasks: 9 up-to-date

Checklist

  • [] I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

Help is needed

  • to setup correctly the environment, I cannot make it with following the readme :(
  • to understand how to move the changes into "/aws-sdk-rust/sdk/dynamodb/src)/config.rs", DynamoDB must be set with a base of 50ms for completetion.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution under the terms of your choice.

@ymwjbxxq ymwjbxxq changed the title Override smithy client config Override smithy client retry config Jul 5, 2022
@ymwjbxxq ymwjbxxq closed this Jul 6, 2022
@ymwjbxxq ymwjbxxq deleted the override-smithy-client-config branch July 6, 2022 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant