mirror of https://github.com/smithy-lang/smithy-rs
95714395f1
* feature: add retry_config to aws_config::ConfigLoader and aws_config::default_provider feature: add retry_config to aws_types::Config and aws_types::Builder feature: add RetryConfig and RetryMode to smithy_types feature: create EnvironmentVariableRetryConfigProvider feature: create RetryConfigProviderChain feature: create ProfileFileRetryConfigProvider update: make smithy-types dep non-optional for aws-config add: smithy-types dep to aws-types * Update aws/rust-runtime/aws-config/src/lib.rs Co-authored-by: John DiSanti <jdisanti@amazon.com> * refactor: simplify configuration logic of retry_configs update: use non-allocating string comparison for RetryMode::from_str update: panic on setting invalid values for RetryConfig remove: provider chain for retry_config remove: ProvideRetryConfig trait and related functionality * update: AwsFluentClientDecorator to work with retry_config refactor: rename smithy_client::retry::Config.max_retries to max_attempts and fix code broken by this change add: RetryConfigDecorator to smithy codegen with example and test add: RetryConfigDecorator to decorators list add: update SharedConfigDecorator to work with retry_config add: prop getters to RetryConfig add: From<RetryConfig> for smithy_client::retry::Config update: RegionDecorator example of generated code sort: decorators list alphabetically * fix: clone moved valued in AwsFluentClientDecorator update: imds client to refer to max attempts instead of max retries fix: clippy lint about FromStr add: RetryModeErr error struct for when FromStr fails fix: code affected by added FromStr<RetryMode> trait usage * formatting: run rustfmt * format: use 1.53 version of fustfmt * fix: smithy_client tests broken by max_attempts change * fix: clarify some confusing counter logic around request attempts * update: set_retry_config example code to be more helpful fix: broken docs link * add: missing PartialEq impl for RetryConfig update: EnvironmentVariableRetryConfigProvider tests remove: unused import * update: CHANGELOGs * update: Config builder decorators to match Config builder methods * fix: old references to ProtocolConfig * refactor: surface all retry_config errors in the default_provider add: RetryConfigErr * update: Changelog to not new semantics of max_attempts update: Config::retry_config() example fix: copy paste error rename: RetryModeErr to RetryModeParseErr update: note valid retry modes in error message add: helper for creating RetryConfig that disables retries update: use Cow<&str> for RetryConfigErr to save on allocations add: FailedToParseMaxAttempts error when creating RetryConfig from invalid max_attempts update: don't ignore invalid/unparseable max_attempts update: note panic that can occur in retry_config::default_provider remove: invalid/useless code from RetryConfigDecorator.kt remove: inside baseball comments previously added to CHANGELOG * disable: adaptive RetryMode tests * fix: don't listen to the IDE, err is being used * fix: don't listen to the IDE, err is being used * fix: really struggling with this underscore * fix: typo in doc comment example * fix: typo in doc comment example fix: outdated tests * Update rust-runtime/smithy-client/src/retry.rs Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com> * update: retry_config::default_provider to consider precedence per-field instead of per struct add: RetryConfigBuilder to make the above possible update: Env and Profile provider for RetryConfig to return RetryConfigBuilder add: docs to generated retry_config builders add: from_slice method to os_shim_internal::Fs * update: use old ordering of decorators in AwsCodegenDecorator * update: use old ordering of decorators in AwsCodegenDecorator fix: os_shim_internal example not compiling formatting: run ktlint update: tests broken by RetryConfigDecorator.kt changes * formatting: don't use * imports in kotlin * fix: tests broken by stubConfigProject change * Update codegen/src/test/kotlin/software/amazon/smithy/rust/RetryConfigProviderConfigTest.kt Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com> * formatting: run ktlint * add: back accidentally removed presigning decorator Co-authored-by: John DiSanti <jdisanti@amazon.com> Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com> |
||
---|---|---|
.cargo | ||
.github | ||
aws | ||
codegen | ||
codegen-server | ||
codegen-server-test | ||
codegen-test | ||
design | ||
gradle | ||
rust-runtime | ||
.gitignore | ||
.pre-commit-config.yaml | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
NOTICE | ||
README.md | ||
build.gradle.kts | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle.kts | ||
test.sh |
README.md
Smithy Rust
Smithy code generators for Rust
The nightly SDK build can be found under Actions -> CI (take latest run) -> Artifacts
All internal and external interfaces are considered unstable and subject to change without notice.
Setup
./gradlew
will setup gradle for you. JDK 11 is required.- Running tests requires a working Rust installation. See Rust docs for installation instructions on your platform. Minimum supported Rust version is the latest released Rust version, although older versions may work.
Generate an AWS SDK
The generated SDK will be placed in aws/sdk/build/aws-sdk
.
./gradlew :aws:sdk:assemble # Generate an SDK. Do not attempt to compile / run tests
./gradlew :aws:sdk:test # Run all the tests
./gradlew :aws:sdk:cargoCheck # only validate that it compiles
Run tests
./test.sh
This will run all the unit tests, codegen example models & Dynamo DB, validate that the generated code compiles, and run any tests targeting the generated code.
Development
For development, pre-commit hooks may be useful. Setup:
brew install pre-commit # (or appropriate for your platform: https://pre-commit.com/)
pre-commit install
Project Layout
aws
: AWS specific codegen & Rust code (signing, endpoints, customizations, etc.) Common commands:./gradlew :aws:sdk:assemble
: Generate (but do not test / compile etc.) a fresh SDK intosdk/build/aws-sdk
./gradlew :aws:sdk:test
: Generate & run all tests for a fresh SDK./gradlew :aws:sdk:{cargoCheck, cargoTest, cargoDocs, cargoClippy}
: Generate & run specified cargo command.
codegen
: Whitelabel Smithy code generationcodegen-test
: Smithy protocol test generation & integration tests for Smithy whitelabel codedesign
: Design documentation. See the design/README.md for details about building / viewing.