From cf8df40f18a554b642aa257973fdf1331d723d2b Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Fri, 28 Jul 2023 10:09:18 -0700 Subject: [PATCH] Merge `sra-test` into the SDK integration tests and fix its tests (#2883) This PR merges the benchmark and integration tests from `aws/sra-test` into the SDK integration tests, and updates the tests so that they compile and pass. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --- .../aws-runtime/src/request_info.rs | 20 +- .../rustsdk/IntegrationTestDependencies.kt | 9 +- .../orchestrator-vs-middleware/Cargo.lock | 2451 +++++++++++++++++ .../orchestrator-vs-middleware/Cargo.toml | 24 + .../benches/README.md | 6 + .../benches/middleware_vs_orchestrator.rs | 89 +- .../s3-throughput}/README.md | 0 .../s3-throughput}/benchmark/Cargo.lock | 0 .../s3-throughput}/benchmark/Cargo.toml | 0 .../s3-throughput}/benchmark/src/get_test.rs | 0 .../s3-throughput}/benchmark/src/latencies.rs | 0 .../s3-throughput}/benchmark/src/main.rs | 0 .../benchmark/src/multipart_get.rs | 0 .../benchmark/src/multipart_put.rs | 0 .../s3-throughput}/benchmark/src/put_test.rs | 0 .../s3-throughput}/benchmark/src/verify.rs | 0 .../infrastructure/.eslintrc.json | 0 .../s3-throughput}/infrastructure/.gitignore | 0 .../s3-throughput}/infrastructure/.npmignore | 0 .../s3-throughput}/infrastructure/.prettierrc | 0 .../infrastructure/assets/init_instance.sh | 0 .../infrastructure/assets/run_benchmark.sh | 0 .../infrastructure/bin/infrastructure.ts | 0 .../infrastructure/cdk.context.json | 0 .../s3-throughput}/infrastructure/cdk.json | 0 .../lib/infrastructure-stack.ts | 0 .../infrastructure/package-lock.json | 0 .../infrastructure/package.json | 0 .../infrastructure/tsconfig.json | 0 aws/sdk/integration-tests/s3/Cargo.toml | 2 + .../slow-network-and-late-client-clock.json | 0 .../three-retries_and-then-success.json | 32 +- .../three-successful-attempts.json | 0 .../s3/tests/interceptors.rs | 125 + .../s3/tests/request_information_headers.rs | 285 ++ aws/sra-test/.gitignore | 1 - aws/sra-test/build.gradle.kts | 126 - .../integration-tests/aws-sdk-s3/.gitignore | 1 - .../integration-tests/aws-sdk-s3/Cargo.toml | 32 - .../aws-sdk-s3/benches/README.md | 6 - .../aws-sdk-s3/test-data/list-objects-v2.json | 105 - .../aws-sdk-s3/tests/interceptors.rs | 170 -- .../tests/request_information_headers.rs | 257 -- .../aws-sdk-s3/tests/util.rs | 53 - .../ResiliencyConfigCustomization.kt | 12 +- .../customizations/TimeSourceCustomization.kt | 2 +- .../aws-smithy-client/src/dvr/replay.rs | 11 +- .../aws-smithy-http/src/connection.rs | 2 +- settings.gradle.kts | 1 - 49 files changed, 2975 insertions(+), 847 deletions(-) create mode 100644 aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.lock create mode 100644 aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.toml create mode 100644 aws/sdk/benchmarks/orchestrator-vs-middleware/benches/README.md rename aws/{sra-test/integration-tests/aws-sdk-s3 => sdk/benchmarks/orchestrator-vs-middleware}/benches/middleware_vs_orchestrator.rs (52%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/README.md (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/Cargo.lock (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/Cargo.toml (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/get_test.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/latencies.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/main.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/multipart_get.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/multipart_put.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/put_test.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/benchmark/src/verify.rs (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/.eslintrc.json (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/.gitignore (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/.npmignore (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/.prettierrc (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/assets/init_instance.sh (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/assets/run_benchmark.sh (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/bin/infrastructure.ts (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/cdk.context.json (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/cdk.json (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/lib/infrastructure-stack.ts (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/package-lock.json (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/package.json (100%) rename aws/sdk/{s3-benchmark => benchmarks/s3-throughput}/infrastructure/tsconfig.json (100%) rename aws/{sra-test/integration-tests/aws-sdk-s3/test-data => sdk/integration-tests/s3/tests/data}/request-information-headers/slow-network-and-late-client-clock.json (100%) rename aws/{sra-test/integration-tests/aws-sdk-s3/test-data => sdk/integration-tests/s3/tests/data}/request-information-headers/three-retries_and-then-success.json (86%) rename aws/{sra-test/integration-tests/aws-sdk-s3/test-data => sdk/integration-tests/s3/tests/data}/request-information-headers/three-successful-attempts.json (100%) create mode 100644 aws/sdk/integration-tests/s3/tests/interceptors.rs create mode 100644 aws/sdk/integration-tests/s3/tests/request_information_headers.rs delete mode 100644 aws/sra-test/.gitignore delete mode 100644 aws/sra-test/build.gradle.kts delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/.gitignore delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/benches/README.md delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/test-data/list-objects-v2.json delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/tests/interceptors.rs delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/tests/request_information_headers.rs delete mode 100644 aws/sra-test/integration-tests/aws-sdk-s3/tests/util.rs diff --git a/aws/rust-runtime/aws-runtime/src/request_info.rs b/aws/rust-runtime/aws-runtime/src/request_info.rs index ab3311f338..5b7dccee55 100644 --- a/aws/rust-runtime/aws-runtime/src/request_info.rs +++ b/aws/rust-runtime/aws-runtime/src/request_info.rs @@ -4,6 +4,7 @@ */ use crate::service_clock_skew::ServiceClockSkew; +use aws_smithy_async::time::TimeSource; use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut; use aws_smithy_runtime_api::client::interceptors::Interceptor; @@ -16,7 +17,7 @@ use aws_smithy_types::timeout::TimeoutConfig; use aws_smithy_types::DateTime; use http::{HeaderName, HeaderValue}; use std::borrow::Cow; -use std::time::{Duration, SystemTime}; +use std::time::Duration; #[allow(clippy::declare_interior_mutable_const)] // we will never mutate this const AMZ_SDK_REQUEST: HeaderName = HeaderName::from_static("amz-sdk-request"); @@ -63,11 +64,15 @@ impl RequestInfoInterceptor { } } - fn build_ttl_pair(&self, cfg: &ConfigBag) -> Option<(Cow<'static, str>, Cow<'static, str>)> { + fn build_ttl_pair( + &self, + cfg: &ConfigBag, + timesource: impl TimeSource, + ) -> Option<(Cow<'static, str>, Cow<'static, str>)> { let timeout_config = cfg.load::()?; let socket_read = timeout_config.read_timeout()?; let estimated_skew: Duration = cfg.load::().cloned()?.into(); - let current_time = SystemTime::now(); + let current_time = timesource.now(); let ttl = current_time.checked_add(socket_read + estimated_skew)?; let mut timestamp = DateTime::from(ttl); // Set subsec_nanos to 0 so that the formatted `DateTime` won't have fractional seconds. @@ -94,11 +99,16 @@ impl Interceptor for RequestInfoInterceptor { fn modify_before_transmit( &self, context: &mut BeforeTransmitInterceptorContextMut<'_>, - _runtime_components: &RuntimeComponents, + runtime_components: &RuntimeComponents, cfg: &mut ConfigBag, ) -> Result<(), BoxError> { let mut pairs = RequestPairs::new(); - if let Some(pair) = self.build_ttl_pair(cfg) { + if let Some(pair) = self.build_ttl_pair( + cfg, + runtime_components + .time_source() + .ok_or("A timesource must be provided")?, + ) { pairs = pairs.with_pair(pair); } if let Some(pair) = self.build_attempts_pair(cfg) { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt index 5a39041ef2..3cee565e64 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt @@ -35,6 +35,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.writable import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.core.testutil.testDependenciesOnly +import software.amazon.smithy.rustsdk.AwsCargoDependency.awsRuntime import java.nio.file.Files import java.nio.file.Paths import kotlin.io.path.absolute @@ -99,6 +100,7 @@ class IntegrationTestDependencies( if (codegenContext.smithyRuntimeMode.generateOrchestrator) { addDependency(smithyRuntime(runtimeConfig).copy(features = setOf("test-util"), scope = DependencyScope.Dev)) addDependency(smithyRuntimeApi(runtimeConfig).copy(features = setOf("test-util"), scope = DependencyScope.Dev)) + addDependency(awsRuntime(runtimeConfig).toDevDependency().withFeature("test-util")) } } if (hasBenches) { @@ -148,12 +150,5 @@ class S3TestDependencies(private val codegenContext: ClientCodegenContext) : Lib addDependency(TempFile) addDependency(TracingAppender) addDependency(TracingTest) - - // TODO(enableNewSmithyRuntimeCleanup): These additional dependencies may not be needed anymore when removing this flag - // depending on if the sra-test is kept around or not. - if (codegenContext.smithyRuntimeMode.generateOrchestrator) { - addDependency(smithyRuntime(codegenContext.runtimeConfig).toDevDependency()) - addDependency(smithyRuntimeApi(codegenContext.runtimeConfig).toDevDependency()) - } } } diff --git a/aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.lock b/aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.lock new file mode 100644 index 0000000000..7cf3c5ef2e --- /dev/null +++ b/aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.lock @@ -0,0 +1,2451 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "assert-json-diff" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4259cbe96513d2f1073027a259fc2ca917feb3026a5a8d984e3628e490255cc0" +dependencies = [ + "extend", + "serde", + "serde_json", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "aws-config" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-http 0.0.0-smithy-rs-head", + "aws-sdk-sso", + "aws-sdk-sts", + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-client 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-http-tower 0.0.0-smithy-rs-head", + "aws-smithy-json 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "bytes", + "fastrand 2.0.0", + "hex", + "http", + "hyper", + "ring", + "time", + "tokio", + "tower", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "fastrand 2.0.0", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fcdb2f7acbc076ff5ad05e7864bdb191ca70a6fd07668dc3a1a8bcd051de5ae" +dependencies = [ + "aws-smithy-async 0.55.3", + "aws-smithy-types 0.55.3", + "fastrand 1.9.0", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-endpoint" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "http", + "regex", + "tracing", +] + +[[package]] +name = "aws-endpoint" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cce1c41a6cfaa726adee9ebb9a56fcd2bbfd8be49fd8a04c5e20fd968330b04" +dependencies = [ + "aws-smithy-http 0.55.3", + "aws-smithy-types 0.55.3", + "aws-types 0.55.3", + "http", + "regex", + "tracing", +] + +[[package]] +name = "aws-http" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "bytes", + "http", + "http-body", + "lazy_static", + "percent-encoding", + "pin-project-lite", + "tracing", +] + +[[package]] +name = "aws-http" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aadbc44e7a8f3e71c8b374e03ecd972869eb91dd2bc89ed018954a52ba84bc44" +dependencies = [ + "aws-credential-types 0.55.3", + "aws-smithy-http 0.55.3", + "aws-smithy-types 0.55.3", + "aws-types 0.55.3", + "bytes", + "http", + "http-body", + "lazy_static", + "percent-encoding", + "pin-project-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-s3" +version = "0.0.0-local" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-endpoint 0.0.0-smithy-rs-head", + "aws-http 0.0.0-smithy-rs-head", + "aws-sig-auth 0.0.0-smithy-rs-head", + "aws-sigv4 0.0.0-smithy-rs-head", + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-checksums 0.0.0-smithy-rs-head", + "aws-smithy-client 0.0.0-smithy-rs-head", + "aws-smithy-eventstream 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-http-tower 0.0.0-smithy-rs-head", + "aws-smithy-json 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "aws-smithy-xml 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "bytes", + "http", + "http-body", + "once_cell", + "percent-encoding", + "regex", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "aws-sdk-s3" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba197193cbb4bcb6aad8d99796b2291f36fa89562ded5d4501363055b0de89f" +dependencies = [ + "aws-credential-types 0.55.3", + "aws-endpoint 0.55.3", + "aws-http 0.55.3", + "aws-sig-auth 0.55.3", + "aws-sigv4 0.55.3", + "aws-smithy-async 0.55.3", + "aws-smithy-checksums 0.55.3", + "aws-smithy-client 0.55.3", + "aws-smithy-eventstream 0.55.3", + "aws-smithy-http 0.55.3", + "aws-smithy-http-tower 0.55.3", + "aws-smithy-json 0.55.3", + "aws-smithy-types 0.55.3", + "aws-smithy-xml 0.55.3", + "aws-types 0.55.3", + "bytes", + "http", + "http-body", + "once_cell", + "percent-encoding", + "regex", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "aws-sdk-sso" +version = "0.0.0-local" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-endpoint 0.0.0-smithy-rs-head", + "aws-http 0.0.0-smithy-rs-head", + "aws-sig-auth 0.0.0-smithy-rs-head", + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-client 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-http-tower 0.0.0-smithy-rs-head", + "aws-smithy-json 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "bytes", + "http", + "regex", + "tokio-stream", + "tower", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "0.0.0-local" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-endpoint 0.0.0-smithy-rs-head", + "aws-http 0.0.0-smithy-rs-head", + "aws-sig-auth 0.0.0-smithy-rs-head", + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-client 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-http-tower 0.0.0-smithy-rs-head", + "aws-smithy-json 0.0.0-smithy-rs-head", + "aws-smithy-query", + "aws-smithy-types 0.0.0-smithy-rs-head", + "aws-smithy-xml 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "bytes", + "http", + "regex", + "tower", + "tracing", +] + +[[package]] +name = "aws-sig-auth" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-sigv4 0.0.0-smithy-rs-head", + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-eventstream 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-types 0.0.0-smithy-rs-head", + "http", + "tracing", +] + +[[package]] +name = "aws-sig-auth" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b94acb10af0c879ecd5c7bdf51cda6679a0a4f4643ce630905a77673bfa3c61" +dependencies = [ + "aws-credential-types 0.55.3", + "aws-sigv4 0.55.3", + "aws-smithy-eventstream 0.55.3", + "aws-smithy-http 0.55.3", + "aws-types 0.55.3", + "http", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-eventstream 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http", + "once_cell", + "percent-encoding", + "regex", + "sha2", + "time", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2ce6f507be68e968a33485ced670111d1cbad161ddbbab1e313c03d37d8f4c" +dependencies = [ + "aws-smithy-eventstream 0.55.3", + "aws-smithy-http 0.55.3", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http", + "once_cell", + "percent-encoding", + "regex", + "sha2", + "time", + "tracing", +] + +[[package]] +name = "aws-smithy-async" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", + "tokio-stream", +] + +[[package]] +name = "aws-smithy-async" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13bda3996044c202d75b91afeb11a9afae9db9a721c6a7a427410018e286b880" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", + "tokio-stream", +] + +[[package]] +name = "aws-smithy-checksums" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "bytes", + "crc32c", + "crc32fast", + "hex", + "http", + "http-body", + "md-5", + "pin-project-lite", + "sha1", + "sha2", + "tracing", +] + +[[package]] +name = "aws-smithy-checksums" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ed8b96d95402f3f6b8b57eb4e0e45ee365f78b1a924faf20ff6e97abf1eae6" +dependencies = [ + "aws-smithy-http 0.55.3", + "aws-smithy-types 0.55.3", + "bytes", + "crc32c", + "crc32fast", + "hex", + "http", + "http-body", + "md-5", + "pin-project-lite", + "sha1", + "sha2", + "tracing", +] + +[[package]] +name = "aws-smithy-client" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-http-tower 0.0.0-smithy-rs-head", + "aws-smithy-protocol-test 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "bytes", + "fastrand 2.0.0", + "http", + "http-body", + "hyper", + "hyper-rustls 0.24.1", + "lazy_static", + "pin-project-lite", + "rustls 0.21.5", + "serde", + "serde_json", + "tokio", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-client" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a86aa6e21e86c4252ad6a0e3e74da9617295d8d6e374d552be7d3059c41cedd" +dependencies = [ + "aws-smithy-async 0.55.3", + "aws-smithy-http 0.55.3", + "aws-smithy-http-tower 0.55.3", + "aws-smithy-protocol-test 0.55.3", + "aws-smithy-types 0.55.3", + "bytes", + "fastrand 1.9.0", + "http", + "http-body", + "hyper", + "hyper-rustls 0.23.2", + "lazy_static", + "pin-project-lite", + "rustls 0.20.8", + "serde", + "serde_json", + "tokio", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-eventstream" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-types 0.0.0-smithy-rs-head", + "bytes", + "crc32fast", +] + +[[package]] +name = "aws-smithy-eventstream" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460c8da5110835e3d9a717c61f5556b20d03c32a1dec57f8fc559b360f733bb8" +dependencies = [ + "aws-smithy-types 0.55.3", + "bytes", + "crc32fast", +] + +[[package]] +name = "aws-smithy-http" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-eventstream 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", + "hyper", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "aws-smithy-http" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b3b693869133551f135e1f2c77cb0b8277d9e3e17feaf2213f735857c4f0d28" +dependencies = [ + "aws-smithy-eventstream 0.55.3", + "aws-smithy-types 0.55.3", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", + "hyper", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "aws-smithy-http-tower" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "bytes", + "http", + "http-body", + "pin-project-lite", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-http-tower" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae4f6c5798a247fac98a867698197d9ac22643596dc3777f0c76b91917616b9" +dependencies = [ + "aws-smithy-http 0.55.3", + "aws-smithy-types 0.55.3", + "bytes", + "http", + "http-body", + "pin-project-lite", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-types 0.0.0-smithy-rs-head", +] + +[[package]] +name = "aws-smithy-json" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f9f42fbfa96d095194a632fbac19f60077748eba536eb0b9fecc28659807f8" +dependencies = [ + "aws-smithy-types 0.55.3", +] + +[[package]] +name = "aws-smithy-protocol-test" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "assert-json-diff", + "http", + "pretty_assertions", + "regex", + "roxmltree", + "serde_json", + "thiserror", +] + +[[package]] +name = "aws-smithy-protocol-test" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabbf8d2bfefa4870ba497c1ae3b40e5e26be18af1cb8c871856b0a393a15ffa" +dependencies = [ + "assert-json-diff", + "http", + "pretty_assertions", + "regex", + "roxmltree", + "serde_json", + "thiserror", +] + +[[package]] +name = "aws-smithy-query" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-smithy-types 0.0.0-smithy-rs-head", + "urlencoding", +] + +[[package]] +name = "aws-smithy-types" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "base64-simd", + "itoa", + "num-integer", + "ryu", + "serde", + "time", +] + +[[package]] +name = "aws-smithy-types" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a3d0bf4f324f4ef9793b86a1701d9700fbcdbd12a846da45eed104c634c6e8" +dependencies = [ + "base64-simd", + "itoa", + "num-integer", + "ryu", + "time", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1b9d12875731bd07e767be7baad95700c3137b56730ec9ddeedb52a5e5ca63b" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "0.0.0-smithy-rs-head" +dependencies = [ + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-smithy-async 0.0.0-smithy-rs-head", + "aws-smithy-client 0.0.0-smithy-rs-head", + "aws-smithy-http 0.0.0-smithy-rs-head", + "aws-smithy-types 0.0.0-smithy-rs-head", + "http", + "rustc_version", + "tracing", +] + +[[package]] +name = "aws-types" +version = "0.55.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd209616cc8d7bfb82f87811a5c655dc97537f592689b18743bddf5dc5c4829" +dependencies = [ + "aws-credential-types 0.55.3", + "aws-smithy-async 0.55.3", + "aws-smithy-client 0.55.3", + "aws-smithy-http 0.55.3", + "aws-smithy-types 0.55.3", + "http", + "rustc_version", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "bytes-utils" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47d3a8076e283f3acd27400535992edb3ba4b5bb72f8891ad8fbe7932a7d4b9" +dependencies = [ + "bytes", + "either", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "bitflags", + "clap_lex", + "indexmap", + "textwrap", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32c" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" +dependencies = [ + "anes", + "atty", + "cast", + "ciborium", + "clap", + "criterion-plot", + "futures", + "itertools", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "tokio", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "extend" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f47da3a72ec598d9c8937a7ebca8962a5c7a1f28444e38c2b33c771ba3f55f05" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-core", + "futures-macro", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "h2" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +dependencies = [ + "http", + "hyper", + "log", + "rustls 0.20.8", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.23.4", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls 0.21.5", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "md-5" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +dependencies = [ + "digest", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.2", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "orchestrator-vs-middleware" +version = "0.1.0" +dependencies = [ + "aws-config", + "aws-credential-types 0.0.0-smithy-rs-head", + "aws-sdk-s3 0.0.0-local", + "aws-sdk-s3 0.28.0", + "aws-smithy-client 0.0.0-smithy-rs-head", + "aws-smithy-client 0.55.3", + "criterion", + "http", + "tokio", +] + +[[package]] +name = "os_str_bytes" +version = "6.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" + +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "roxmltree" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "921904a62e410e37e215c40381b7117f830d9d89ba60ab5236170541dd25646b" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustls" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +dependencies = [ + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ba2516aa6bf82e0b19ca8b50019d52df58455d3cf9bdaf6315225fdd0c560a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "401797fe7833d72109fedec6bfcbe67c0eed9b99772f26eb8afd261f0abc6fd3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "serde_json" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + +[[package]] +name = "thiserror" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "time" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +dependencies = [ + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +dependencies = [ + "time-core", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +dependencies = [ + "autocfg", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls 0.20.8", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.5", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.27", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "xmlparser" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.toml b/aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.toml new file mode 100644 index 0000000000..e4b6af798a --- /dev/null +++ b/aws/sdk/benchmarks/orchestrator-vs-middleware/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "orchestrator-vs-middleware" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +aws-config = { path = "../../build/aws-sdk/sdk/aws-config" } +aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } +aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3" } +aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util", "wiremock"] } +criterion = { version = "0.4", features = ["async_tokio"] } +http = "0.2.3" +middleware-s3 = { version = "0.28", package = "aws-sdk-s3", features = ["test-util"] } +middleware-smithy-client = { version = "0.55.3", package = "aws-smithy-client", features = ["test-util", "rustls"] } +tokio = { version = "1.23.1", features = ["macros", "test-util", "rt-multi-thread"] } + +[profile.release] +debug = 1 + +[[bench]] +name = "middleware_vs_orchestrator" +harness = false diff --git a/aws/sdk/benchmarks/orchestrator-vs-middleware/benches/README.md b/aws/sdk/benchmarks/orchestrator-vs-middleware/benches/README.md new file mode 100644 index 0000000000..0f2e81f432 --- /dev/null +++ b/aws/sdk/benchmarks/orchestrator-vs-middleware/benches/README.md @@ -0,0 +1,6 @@ +### Middleware vs. Orchestrator Benchmark + +To run the benchmark: +```bash +./gradlew :aws:sdk:assemble && (cd aws/sdk/integration-tests/s3 && cargo bench) +``` diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/benches/middleware_vs_orchestrator.rs b/aws/sdk/benchmarks/orchestrator-vs-middleware/benches/middleware_vs_orchestrator.rs similarity index 52% rename from aws/sra-test/integration-tests/aws-sdk-s3/benches/middleware_vs_orchestrator.rs rename to aws/sdk/benchmarks/orchestrator-vs-middleware/benches/middleware_vs_orchestrator.rs index b728a6fa14..6920f80fe0 100644 --- a/aws/sra-test/integration-tests/aws-sdk-s3/benches/middleware_vs_orchestrator.rs +++ b/aws/sdk/benchmarks/orchestrator-vs-middleware/benches/middleware_vs_orchestrator.rs @@ -9,12 +9,6 @@ use aws_sdk_s3 as s3; use criterion::{BenchmarkId, Criterion}; macro_rules! test_connection { - (head) => { - test_connection!(aws_smithy_client) - }; - (last_release) => { - test_connection!(last_release_smithy_client) - }; ($package:ident) => { $package::test_connection::infallible_connection_fn(|req| { assert_eq!( @@ -46,44 +40,6 @@ macro_rules! test_connection { }; } -macro_rules! create_client { - (head) => { - create_client!(head, aws_sdk_s3) - }; - (last_release) => { - create_client!(last_release, last_release_s3) - }; - ($original:ident, $package:ident) => {{ - let conn = test_connection!($original); - let config = $package::Config::builder() - .credentials_provider($package::config::Credentials::for_tests()) - .region($package::config::Region::new("us-east-1")) - .http_connector(conn.clone()) - .build(); - $package::Client::from_conf(config) - }}; -} - -macro_rules! middleware_bench_fn { - ($fn_name:ident, head) => { - middleware_bench_fn!($fn_name, aws_sdk_s3) - }; - ($fn_name:ident, last_release) => { - middleware_bench_fn!($fn_name, last_release_s3) - }; - ($fn_name:ident, $package:ident) => { - async fn $fn_name(client: &$package::Client) { - client - .list_objects_v2() - .bucket("test-bucket") - .prefix("prefix~") - .send() - .await - .expect("successful execution"); - } - }; -} - async fn orchestrator(client: &s3::Client) { let _output = client .list_objects_v2() @@ -94,34 +50,49 @@ async fn orchestrator(client: &s3::Client) { .expect("successful execution"); } -fn bench(c: &mut Criterion) { - let head_client = create_client!(head); - middleware_bench_fn!(middleware_head, head); +async fn middleware(client: &middleware_s3::Client) { + client + .list_objects_v2() + .bucket("test-bucket") + .prefix("prefix~") + .send() + .await + .expect("successful execution"); +} - let last_release_client = create_client!(last_release); - middleware_bench_fn!(middleware_last_release, last_release); +fn bench(c: &mut Criterion) { + let orchestrator_client = { + let conn = test_connection!(aws_smithy_client); + let config = aws_sdk_s3::Config::builder() + .credentials_provider(aws_sdk_s3::config::Credentials::for_tests()) + .region(aws_sdk_s3::config::Region::new("us-east-1")) + .http_connector(conn.clone()) + .build(); + aws_sdk_s3::Client::from_conf(config) + }; + let middleware_client = { + let conn = test_connection!(middleware_smithy_client); + let config = middleware_s3::Config::builder() + .credentials_provider(middleware_s3::config::Credentials::for_tests()) + .region(middleware_s3::config::Region::new("us-east-1")) + .http_connector(conn.clone()) + .build(); + middleware_s3::Client::from_conf(config) + }; let mut group = c.benchmark_group("compare"); let param = "S3 ListObjectsV2"; - group.bench_with_input( - BenchmarkId::new("middleware (HEAD)", param), - param, - |b, _| { - b.to_async(tokio::runtime::Runtime::new().unwrap()) - .iter(|| async { middleware_head(&head_client).await }) - }, - ); group.bench_with_input( BenchmarkId::new("middleware (last_release)", param), param, |b, _| { b.to_async(tokio::runtime::Runtime::new().unwrap()) - .iter(|| async { middleware_last_release(&last_release_client).await }) + .iter(|| async { middleware(&middleware_client).await }) }, ); group.bench_with_input(BenchmarkId::new("orchestrator", param), param, |b, _| { b.to_async(tokio::runtime::Runtime::new().unwrap()) - .iter(|| async { orchestrator(&head_client).await }) + .iter(|| async { orchestrator(&orchestrator_client).await }) }); group.finish(); } diff --git a/aws/sdk/s3-benchmark/README.md b/aws/sdk/benchmarks/s3-throughput/README.md similarity index 100% rename from aws/sdk/s3-benchmark/README.md rename to aws/sdk/benchmarks/s3-throughput/README.md diff --git a/aws/sdk/s3-benchmark/benchmark/Cargo.lock b/aws/sdk/benchmarks/s3-throughput/benchmark/Cargo.lock similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/Cargo.lock rename to aws/sdk/benchmarks/s3-throughput/benchmark/Cargo.lock diff --git a/aws/sdk/s3-benchmark/benchmark/Cargo.toml b/aws/sdk/benchmarks/s3-throughput/benchmark/Cargo.toml similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/Cargo.toml rename to aws/sdk/benchmarks/s3-throughput/benchmark/Cargo.toml diff --git a/aws/sdk/s3-benchmark/benchmark/src/get_test.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/get_test.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/get_test.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/get_test.rs diff --git a/aws/sdk/s3-benchmark/benchmark/src/latencies.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/latencies.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/latencies.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/latencies.rs diff --git a/aws/sdk/s3-benchmark/benchmark/src/main.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/main.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/main.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/main.rs diff --git a/aws/sdk/s3-benchmark/benchmark/src/multipart_get.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/multipart_get.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/multipart_get.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/multipart_get.rs diff --git a/aws/sdk/s3-benchmark/benchmark/src/multipart_put.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/multipart_put.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/multipart_put.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/multipart_put.rs diff --git a/aws/sdk/s3-benchmark/benchmark/src/put_test.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/put_test.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/put_test.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/put_test.rs diff --git a/aws/sdk/s3-benchmark/benchmark/src/verify.rs b/aws/sdk/benchmarks/s3-throughput/benchmark/src/verify.rs similarity index 100% rename from aws/sdk/s3-benchmark/benchmark/src/verify.rs rename to aws/sdk/benchmarks/s3-throughput/benchmark/src/verify.rs diff --git a/aws/sdk/s3-benchmark/infrastructure/.eslintrc.json b/aws/sdk/benchmarks/s3-throughput/infrastructure/.eslintrc.json similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/.eslintrc.json rename to aws/sdk/benchmarks/s3-throughput/infrastructure/.eslintrc.json diff --git a/aws/sdk/s3-benchmark/infrastructure/.gitignore b/aws/sdk/benchmarks/s3-throughput/infrastructure/.gitignore similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/.gitignore rename to aws/sdk/benchmarks/s3-throughput/infrastructure/.gitignore diff --git a/aws/sdk/s3-benchmark/infrastructure/.npmignore b/aws/sdk/benchmarks/s3-throughput/infrastructure/.npmignore similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/.npmignore rename to aws/sdk/benchmarks/s3-throughput/infrastructure/.npmignore diff --git a/aws/sdk/s3-benchmark/infrastructure/.prettierrc b/aws/sdk/benchmarks/s3-throughput/infrastructure/.prettierrc similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/.prettierrc rename to aws/sdk/benchmarks/s3-throughput/infrastructure/.prettierrc diff --git a/aws/sdk/s3-benchmark/infrastructure/assets/init_instance.sh b/aws/sdk/benchmarks/s3-throughput/infrastructure/assets/init_instance.sh similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/assets/init_instance.sh rename to aws/sdk/benchmarks/s3-throughput/infrastructure/assets/init_instance.sh diff --git a/aws/sdk/s3-benchmark/infrastructure/assets/run_benchmark.sh b/aws/sdk/benchmarks/s3-throughput/infrastructure/assets/run_benchmark.sh similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/assets/run_benchmark.sh rename to aws/sdk/benchmarks/s3-throughput/infrastructure/assets/run_benchmark.sh diff --git a/aws/sdk/s3-benchmark/infrastructure/bin/infrastructure.ts b/aws/sdk/benchmarks/s3-throughput/infrastructure/bin/infrastructure.ts similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/bin/infrastructure.ts rename to aws/sdk/benchmarks/s3-throughput/infrastructure/bin/infrastructure.ts diff --git a/aws/sdk/s3-benchmark/infrastructure/cdk.context.json b/aws/sdk/benchmarks/s3-throughput/infrastructure/cdk.context.json similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/cdk.context.json rename to aws/sdk/benchmarks/s3-throughput/infrastructure/cdk.context.json diff --git a/aws/sdk/s3-benchmark/infrastructure/cdk.json b/aws/sdk/benchmarks/s3-throughput/infrastructure/cdk.json similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/cdk.json rename to aws/sdk/benchmarks/s3-throughput/infrastructure/cdk.json diff --git a/aws/sdk/s3-benchmark/infrastructure/lib/infrastructure-stack.ts b/aws/sdk/benchmarks/s3-throughput/infrastructure/lib/infrastructure-stack.ts similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/lib/infrastructure-stack.ts rename to aws/sdk/benchmarks/s3-throughput/infrastructure/lib/infrastructure-stack.ts diff --git a/aws/sdk/s3-benchmark/infrastructure/package-lock.json b/aws/sdk/benchmarks/s3-throughput/infrastructure/package-lock.json similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/package-lock.json rename to aws/sdk/benchmarks/s3-throughput/infrastructure/package-lock.json diff --git a/aws/sdk/s3-benchmark/infrastructure/package.json b/aws/sdk/benchmarks/s3-throughput/infrastructure/package.json similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/package.json rename to aws/sdk/benchmarks/s3-throughput/infrastructure/package.json diff --git a/aws/sdk/s3-benchmark/infrastructure/tsconfig.json b/aws/sdk/benchmarks/s3-throughput/infrastructure/tsconfig.json similarity index 100% rename from aws/sdk/s3-benchmark/infrastructure/tsconfig.json rename to aws/sdk/benchmarks/s3-throughput/infrastructure/tsconfig.json diff --git a/aws/sdk/integration-tests/s3/Cargo.toml b/aws/sdk/integration-tests/s3/Cargo.toml index 650d1a5db0..74453e21e6 100644 --- a/aws/sdk/integration-tests/s3/Cargo.toml +++ b/aws/sdk/integration-tests/s3/Cargo.toml @@ -15,6 +15,7 @@ async-std = "1.12.0" aws-config = { path = "../../build/aws-sdk/sdk/aws-config" } aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } aws-http = { path = "../../build/aws-sdk/sdk/aws-http" } +aws-runtime = { path = "../../build/aws-sdk/sdk/aws-runtime", features = ["test-util"] } aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3" } aws-sdk-sts = { path = "../../build/aws-sdk/sdk/sts" } aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util", "rt-tokio"] } @@ -22,6 +23,7 @@ aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", featur aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test" } aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util"] } +aws-smithy-runtime-api = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"] } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1" diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/slow-network-and-late-client-clock.json b/aws/sdk/integration-tests/s3/tests/data/request-information-headers/slow-network-and-late-client-clock.json similarity index 100% rename from aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/slow-network-and-late-client-clock.json rename to aws/sdk/integration-tests/s3/tests/data/request-information-headers/slow-network-and-late-client-clock.json diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/three-retries_and-then-success.json b/aws/sdk/integration-tests/s3/tests/data/request-information-headers/three-retries_and-then-success.json similarity index 86% rename from aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/three-retries_and-then-success.json rename to aws/sdk/integration-tests/s3/tests/data/request-information-headers/three-retries_and-then-success.json index b0aee24861..2903739925 100644 --- a/aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/three-retries_and-then-success.json +++ b/aws/sdk/integration-tests/s3/tests/data/request-information-headers/three-retries_and-then-success.json @@ -11,7 +11,7 @@ "notarealsessiontoken" ], "authorization": [ - "AWS4-HMAC-SHA256 Credential=ANOTREAL/20210618/us-east-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=e7eccf4e792113f5f17a50bfd8f1719479e89ba0b476894e6f3dba030dc87f82" + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20190601/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=43970cfd0324cb28a86459789b7a1c7684cf54b0b3c9842a84f3b24343fa038a" ], "x-amz-user-agent": [ "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0" @@ -55,9 +55,6 @@ "status": 500, "version": "HTTP/1.1", "headers": { - "server": [ - "AmazonS3" - ], "x-amz-request-id": [ "foo-id" ], @@ -103,7 +100,7 @@ } }, { - "connection_id": 0, + "connection_id": 1, "action": { "Request": { "request": { @@ -113,7 +110,7 @@ "notarealsessiontoken" ], "authorization": [ - "AWS4-HMAC-SHA256 Credential=ANOTREAL/20210618/us-east-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=e7eccf4e792113f5f17a50bfd8f1719479e89ba0b476894e6f3dba030dc87f82" + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20190601/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=6d0f0da831a7d3ad1bde4e98580177bc0ef0acc21064dd26394006006392cb14" ], "x-amz-user-agent": [ "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0" @@ -140,7 +137,7 @@ } }, { - "connection_id": 0, + "connection_id": 1, "action": { "Eof": { "ok": true, @@ -149,7 +146,7 @@ } }, { - "connection_id": 0, + "connection_id": 1, "action": { "Response": { "response": { @@ -157,9 +154,6 @@ "status": 500, "version": "HTTP/1.1", "headers": { - "server": [ - "AmazonS3" - ], "x-amz-request-id": [ "foo-id" ], @@ -185,7 +179,7 @@ } }, { - "connection_id": 0, + "connection_id": 1, "action": { "Data": { "data": { @@ -196,7 +190,7 @@ } }, { - "connection_id": 0, + "connection_id": 1, "action": { "Eof": { "ok": true, @@ -205,7 +199,7 @@ } }, { - "connection_id": 0, + "connection_id": 2, "action": { "Request": { "request": { @@ -215,7 +209,7 @@ "notarealsessiontoken" ], "authorization": [ - "AWS4-HMAC-SHA256 Credential=ANOTREAL/20210618/us-east-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=e7eccf4e792113f5f17a50bfd8f1719479e89ba0b476894e6f3dba030dc87f82" + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20190601/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=8160b1d1200c10cde681ac6f4490c98023af9c4b3b8fd8a82e7560f87c126a53" ], "x-amz-user-agent": [ "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0" @@ -242,7 +236,7 @@ } }, { - "connection_id": 0, + "connection_id": 2, "action": { "Eof": { "ok": true, @@ -251,7 +245,7 @@ } }, { - "connection_id": 0, + "connection_id": 2, "action": { "Response": { "response": { @@ -287,7 +281,7 @@ } }, { - "connection_id": 0, + "connection_id": 2, "action": { "Data": { "data": { @@ -298,7 +292,7 @@ } }, { - "connection_id": 0, + "connection_id": 2, "action": { "Eof": { "ok": true, diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/three-successful-attempts.json b/aws/sdk/integration-tests/s3/tests/data/request-information-headers/three-successful-attempts.json similarity index 100% rename from aws/sra-test/integration-tests/aws-sdk-s3/test-data/request-information-headers/three-successful-attempts.json rename to aws/sdk/integration-tests/s3/tests/data/request-information-headers/three-successful-attempts.json diff --git a/aws/sdk/integration-tests/s3/tests/interceptors.rs b/aws/sdk/integration-tests/s3/tests/interceptors.rs new file mode 100644 index 0000000000..be3caa493a --- /dev/null +++ b/aws/sdk/integration-tests/s3/tests/interceptors.rs @@ -0,0 +1,125 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +#[cfg(not(aws_sdk_middleware_mode))] +mod tests { + use aws_sdk_s3::config::interceptors::BeforeTransmitInterceptorContextMut; + use aws_sdk_s3::config::{Credentials, Region}; + use aws_sdk_s3::Client; + use aws_smithy_client::erase::DynConnector; + use aws_smithy_client::test_connection::capture_request; + use aws_smithy_runtime_api::box_error::BoxError; + use aws_smithy_runtime_api::client::interceptors::Interceptor; + use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; + use aws_smithy_types::config_bag::{ConfigBag, Layer, Storable, StoreReplace}; + use http::header::USER_AGENT; + use http::HeaderValue; + + #[tokio::test] + async fn interceptor_priority() { + #[derive(Debug, Eq, PartialEq)] + struct TestValue(&'static str); + impl Storable for TestValue { + type Storer = StoreReplace; + } + + #[derive(Debug)] + struct TestInterceptor(&'static str); + impl Interceptor for TestInterceptor { + fn name(&self) -> &'static str { + "TestInterceptor" + } + + fn modify_before_signing( + &self, + _context: &mut BeforeTransmitInterceptorContextMut<'_>, + _components: &RuntimeComponents, + cfg: &mut ConfigBag, + ) -> Result<(), BoxError> { + let mut layer = Layer::new("test"); + layer.store_put(TestValue(self.0)); + cfg.push_layer(layer); + Ok(()) + } + + fn modify_before_transmit( + &self, + context: &mut BeforeTransmitInterceptorContextMut<'_>, + _runtime_components: &RuntimeComponents, + cfg: &mut ConfigBag, + ) -> Result<(), BoxError> { + let value = cfg.load::().unwrap(); + context + .request_mut() + .headers_mut() + .insert("test-header", HeaderValue::from_static(value.0)); + Ok(()) + } + } + + let (conn, rx) = capture_request(None); + + // The first `TestInterceptor` will put `value1` into config + let config = aws_sdk_s3::Config::builder() + .credentials_provider(Credentials::for_tests()) + .region(Region::new("us-east-1")) + .http_connector(DynConnector::new(conn)) + .interceptor(TestInterceptor("value1")) + .build(); + let client = Client::from_conf(config); + + // The second `TestInterceptor` will replace `value1` with `value2` in config + dbg!( + client + .list_objects_v2() + .bucket("test-bucket") + .prefix("prefix~") + .customize() + .await + .unwrap() + .interceptor(TestInterceptor("value2")) + .send() + .await + ) + .expect_err("no fake response set"); + + let request = rx.expect_request(); + assert_eq!("value2", request.headers()["test-header"]); + } + + #[tokio::test] + async fn set_test_user_agent_through_request_mutation() { + let (conn, rx) = capture_request(None); + + let config = aws_sdk_s3::Config::builder() + .credentials_provider(Credentials::for_tests()) + .region(Region::new("us-east-1")) + .http_connector(DynConnector::new(conn.clone())) + .build(); + let client = Client::from_conf(config); + + dbg!( + client + .list_objects_v2() + .bucket("test-bucket") + .prefix("prefix~") + .customize() + .await + .unwrap() + .mutate_request(|request| { + let headers = request.headers_mut(); + headers.insert(USER_AGENT, HeaderValue::try_from("test").unwrap()); + headers.insert("x-amz-user-agent", HeaderValue::try_from("test").unwrap()); + }) + .send() + .await + ) + .expect_err("no fake response set"); + + let request = rx.expect_request(); + assert_eq!("test", request.headers()[USER_AGENT]); + assert_eq!("test", request.headers()["x-amz-user-agent"]); + } +} diff --git a/aws/sdk/integration-tests/s3/tests/request_information_headers.rs b/aws/sdk/integration-tests/s3/tests/request_information_headers.rs new file mode 100644 index 0000000000..33ee18fb9d --- /dev/null +++ b/aws/sdk/integration-tests/s3/tests/request_information_headers.rs @@ -0,0 +1,285 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +#[cfg(not(aws_sdk_middleware_mode))] +mod tests { + use aws_http::user_agent::AwsUserAgent; + use aws_runtime::invocation_id::{InvocationId, PredefinedInvocationIdGenerator}; + use aws_sdk_s3::config::interceptors::BeforeSerializationInterceptorContextMut; + use aws_sdk_s3::config::interceptors::FinalizerInterceptorContextRef; + use aws_sdk_s3::config::retry::RetryConfig; + use aws_sdk_s3::config::timeout::TimeoutConfig; + use aws_sdk_s3::config::{Credentials, Region}; + use aws_sdk_s3::config::{Interceptor, SharedAsyncSleep}; + use aws_sdk_s3::Client; + use aws_smithy_async::test_util::InstantSleep; + use aws_smithy_async::test_util::ManualTimeSource; + use aws_smithy_async::time::SharedTimeSource; + use aws_smithy_client::dvr; + use aws_smithy_client::dvr::MediaType; + use aws_smithy_client::erase::DynConnector; + use aws_smithy_runtime::test_util::capture_test_logs::capture_test_logs; + use aws_smithy_runtime_api::box_error::BoxError; + use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; + use aws_smithy_types::config_bag::{ConfigBag, Layer}; + use std::time::{Duration, UNIX_EPOCH}; + + // # One SDK operation invocation. + // # Client retries 3 times, successful response on 3rd attempt. + // # Fast network, latency + server time is less than one second. + // # No clock skew + // # Client waits 1 second between retry attempts. + #[tokio::test] + async fn three_retries_and_then_success() { + let _logs = capture_test_logs(); + + #[derive(Debug)] + struct TimeInterceptor { + time_source: ManualTimeSource, + } + impl Interceptor for TimeInterceptor { + fn name(&self) -> &'static str { + "TimeInterceptor" + } + + fn modify_before_serialization( + &self, + _context: &mut BeforeSerializationInterceptorContextMut<'_>, + _runtime_components: &RuntimeComponents, + cfg: &mut ConfigBag, + ) -> Result<(), BoxError> { + let mut layer = Layer::new("test"); + layer.store_put(AwsUserAgent::for_tests()); + cfg.push_layer(layer); + Ok(()) + } + + fn read_after_attempt( + &self, + _context: &FinalizerInterceptorContextRef<'_>, + _runtime_components: &RuntimeComponents, + _cfg: &mut ConfigBag, + ) -> Result<(), BoxError> { + self.time_source.advance(Duration::from_secs(1)); + tracing::info!( + "################ ADVANCED TIME BY 1 SECOND, {:?}", + &self.time_source + ); + Ok(()) + } + } + + let time_source = ManualTimeSource::new(UNIX_EPOCH + Duration::from_secs(1559347200)); + + let path = "tests/data/request-information-headers/three-retries_and-then-success.json"; + let conn = dvr::ReplayingConnection::from_file(path).unwrap(); + let config = aws_sdk_s3::Config::builder() + .credentials_provider(Credentials::for_tests()) + .region(Region::new("us-east-1")) + .http_connector(DynConnector::new(conn.clone())) + .time_source(SharedTimeSource::new(time_source.clone())) + .sleep_impl(SharedAsyncSleep::new(InstantSleep::new(Default::default()))) + .retry_config(RetryConfig::standard()) + .timeout_config( + TimeoutConfig::builder() + .connect_timeout(Duration::from_secs(10)) + .read_timeout(Duration::from_secs(10)) + .build(), + ) + .invocation_id_generator(PredefinedInvocationIdGenerator::new(vec![ + InvocationId::new_from_str("00000000-0000-4000-8000-000000000000"), + ])) + .interceptor(TimeInterceptor { time_source }) + .build(); + let client = Client::from_conf(config); + + let resp = dbg!( + client + .list_objects_v2() + .bucket("test-bucket") + .prefix("prefix~") + .send() + .await + ); + + let resp = resp.expect("valid e2e test"); + assert_eq!(resp.name(), Some("test-bucket")); + conn.full_validate(MediaType::Xml).await.expect("failed") + } + // + // // # Client makes 3 separate SDK operation invocations + // // # All succeed on first attempt. + // // # Fast network, latency + server time is less than one second. + // // - request: + // // time: 2019-06-01T00:00:00Z + // // headers: + // // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 + // // amz-sdk-request: attempt=1; max=3 + // // response: + // // status: 200 + // // time_received: 2019-06-01T00:00:00Z + // // headers: + // // Date: Sat, 01 Jun 2019 00:00:00 GMT + // // - request: + // // time: 2019-06-01T00:01:01Z + // // headers: + // // # Note the different invocation id because it's a new SDK + // // # invocation operation. + // // amz-sdk-invocation-id: 70370531-7b83-4b90-8b93-46975687ecf6 + // // amz-sdk-request: ttl=20190601T000011Z; attempt=1; max=3 + // // response: + // // status: 200 + // // time_received: 2019-06-01T00:00:01Z + // // headers: + // // Date: Sat, 01 Jun 2019 00:00:01 GMT + // // - request: + // // time: 2019-06-01T00:00:02Z + // // headers: + // // amz-sdk-invocation-id: 910bf450-6c90-43de-a508-3fa126a06b71 + // // amz-sdk-request: ttl=20190601T000012Z; attempt=1; max=3 + // // response: + // // status: 200 + // // time_received: 2019-06-01T00:00:02Z + // // headers: + // // Date: Sat, 01 Jun 2019 00:00:02 GMT + // const THREE_SUCCESSFUL_ATTEMPTS_PATH: &str = "test-data/request-information-headers/three-successful-attempts.json"; + // #[tokio::test] + // async fn three_successful_attempts() { + // tracing_subscriber::fmt::init(); + // + // impl RuntimePlugin for FixupPlugin { + // fn configure( + // &self, + // cfg: &mut ConfigBag, + // ) -> Result<(), aws_smithy_runtime_api::client::runtime_plugin::BoxError> { + // let params_builder = Params::builder() + // .set_region(self.client.conf().region().map(|c| c.as_ref().to_string())) + // .bucket("test-bucket"); + // + // cfg.put(params_builder); + // cfg.set_request_time(RequestTime::new(self.timestamp.clone())); + // cfg.put(AwsUserAgent::for_tests()); + // cfg.put(InvocationId::for_tests()); + // Ok(()) + // } + // } + // + // let conn = dvr::ReplayingConnection::from_file(THREE_SUCCESSFUL_ATTEMPTS_PATH).unwrap(); + // let config = aws_sdk_s3::Config::builder() + // .credentials_provider(Credentials::for_tests()) + // .region(Region::new("us-east-1")) + // .http_connector(DynConnector::new(conn.clone())) + // .build(); + // let client = Client::from_conf(config); + // let fixup = FixupPlugin { + // client: client.clone(), + // timestamp: UNIX_EPOCH + Duration::from_secs(1624036048), + // }; + // + // let resp = dbg!( + // client + // .list_objects_v2() + // .bucket("test-bucket") + // .prefix("prefix~") + // .send_v2_with_plugin(Some(fixup)) + // .await + // ); + // + // let resp = resp.expect("valid e2e test"); + // assert_eq!(resp.name(), Some("test-bucket")); + // conn.full_validate(MediaType::Xml).await.expect("failed") + // } + // + // // # One SDK operation invocation. + // // # Client retries 3 times, successful response on 3rd attempt. + // // # Slow network, one way latency is 2 seconds. + // // # Server takes 1 second to generate response. + // // # Client clock is 10 minutes behind server clock. + // // # One second delay between retries. + // // - request: + // // time: 2019-06-01T00:00:00Z + // // headers: + // // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 + // // amz-sdk-request: attempt=1; max=3 + // // response: + // // status: 500 + // // time_received: 2019-06-01T00:00:05Z + // // headers: + // // Date: Sat, 01 Jun 2019 00:10:03 GMT + // // - request: + // // time: 2019-06-01T00:00:06Z + // // # The ttl is 00:00:16 with the client clock, + // // # but accounting for skew we have + // // # 00:10:03 - 00:00:05 = 00:09:58 + // // # ttl = 00:00:16 + 00:09:58 = 00:10:14 + // // headers: + // // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 + // // amz-sdk-request: ttl=20190601T001014Z; attempt=2; max=3 + // // response: + // // status: 500 + // // time_received: 2019-06-01T00:00:11Z + // // headers: + // // Date: Sat, 01 Jun 2019 00:10:09 GMT + // // - request: + // // time: 2019-06-01T00:00:12Z + // // headers: + // // # ttl = 00:00:12 + 20 = 00:00:22 + // // # skew is: + // // # 00:10:09 - 00:00:11 + // // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 + // // amz-sdk-request: ttl=20190601T001020Z; attempt=3; max=3 + // // response: + // // status: 200 + // // time_received: 2019-06-01T00:00:17Z + // // headers: + // // Date: Sat, 01 Jun 2019 00:10:15 GMT + // const SLOW_NETWORK_AND_LATE_CLIENT_CLOCK_PATH: &str = "test-data/request-information-headers/slow-network-and-late-client-clock.json"; + // #[tokio::test] + // async fn slow_network_and_late_client_clock() { + // tracing_subscriber::fmt::init(); + // + // impl RuntimePlugin for FixupPlugin { + // fn configure( + // &self, + // cfg: &mut ConfigBag, + // ) -> Result<(), aws_smithy_runtime_api::client::runtime_plugin::BoxError> { + // let params_builder = Params::builder() + // .set_region(self.client.conf().region().map(|c| c.as_ref().to_string())) + // .bucket("test-bucket"); + // + // cfg.put(params_builder); + // cfg.set_request_time(RequestTime::new(self.timestamp.clone())); + // cfg.put(AwsUserAgent::for_tests()); + // cfg.put(InvocationId::for_tests()); + // Ok(()) + // } + // } + // + // let conn = dvr::ReplayingConnection::from_file(SLOW_NETWORK_AND_LATE_CLIENT_CLOCK_PATH).unwrap(); + // let config = aws_sdk_s3::Config::builder() + // .credentials_provider(Credentials::for_tests()) + // .region(Region::new("us-east-1")) + // .http_connector(DynConnector::new(conn.clone())) + // .build(); + // let client = Client::from_conf(config); + // let fixup = FixupPlugin { + // client: client.clone(), + // timestamp: UNIX_EPOCH + Duration::from_secs(1624036048), + // }; + // + // let resp = dbg!( + // client + // .list_objects_v2() + // .bucket("test-bucket") + // .prefix("prefix~") + // .send_v2_with_plugin(Some(fixup)) + // .await + // ); + // + // let resp = resp.expect("valid e2e test"); + // assert_eq!(resp.name(), Some("test-bucket")); + // conn.full_validate(MediaType::Xml).await.expect("failed") + // } +} diff --git a/aws/sra-test/.gitignore b/aws/sra-test/.gitignore deleted file mode 100644 index 388d181b4d..0000000000 --- a/aws/sra-test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/smithy-build.json diff --git a/aws/sra-test/build.gradle.kts b/aws/sra-test/build.gradle.kts deleted file mode 100644 index a9bb7c328f..0000000000 --- a/aws/sra-test/build.gradle.kts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -extra["displayName"] = "Smithy :: Rust :: AWS-SDK :: SRA Test" -extra["moduleName"] = "software.amazon.smithy.rust.awssdk.sra.test" - -tasks["jar"].enabled = false - -plugins { - id("software.amazon.smithy") -} - -val smithyVersion: String by project -val defaultRustDocFlags: String by project -val properties = PropertyRetriever(rootProject, project) - -val pluginName = "rust-client-codegen" -val workingDirUnderBuildDir = "smithyprojections/sdk-sra-test/" - -val publisherToolPath = rootProject.projectDir.resolve("tools/ci-build/publisher") -val outputDir = buildDir.resolve("sdk") - -configure { - outputDirectory = file("$buildDir/$workingDirUnderBuildDir") -} - -buildscript { - val smithyVersion: String by project - dependencies { - classpath("software.amazon.smithy:smithy-cli:$smithyVersion") - } -} - -dependencies { - implementation(project(":aws:sdk-codegen")) - implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion") - implementation("software.amazon.smithy:smithy-aws-traits:$smithyVersion") -} - -data class Service( - val serviceId: String, - val moduleName: String, - val imports: List, -) -val servicesToGenerate = listOf( - Service( - "com.amazonaws.dynamodb#DynamoDB_20120810", - "aws-sdk-dynamodb", - listOf("../sdk/aws-models/dynamodb.json"), - ), - Service( - "com.amazonaws.s3#AmazonS3", - "aws-sdk-s3", - listOf("../sdk/aws-models/s3.json", "../sdk/aws-models/s3-tests.smithy"), - ), -) -val allCodegenTests = servicesToGenerate.map { - CodegenTest( - it.serviceId, - it.moduleName, - imports = it.imports, - extraConfig = """ - , - "codegen": { - "includeFluentClient": false, - "enableNewSmithyRuntime": "orchestrator", - "includeEndpointUrlConfig": false - }, - "customizationConfig": { - "awsSdk": { - "generateReadme": false - } - } - """, - ) -} - -project.registerGenerateSmithyBuildTask(rootProject, pluginName, allCodegenTests) -project.registerGenerateCargoWorkspaceTask(rootProject, pluginName, allCodegenTests, workingDirUnderBuildDir) -project.registerGenerateCargoConfigTomlTask(buildDir.resolve(workingDirUnderBuildDir)) - -tasks["smithyBuildJar"].dependsOn("generateSmithyBuild") -tasks["assemble"].finalizedBy("generateCargoWorkspace") - -project.registerModifyMtimeTask() -project.registerCargoCommandsTasks(buildDir.resolve(workingDirUnderBuildDir), defaultRustDocFlags) - -tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString }) - -tasks["clean"].doFirst { delete("smithy-build.json") } - -/** - * The aws/rust-runtime crates depend on local versions of the Smithy core runtime enabling local compilation. However, - * those paths need to be replaced in the final build. We should probably fix this with some symlinking. - */ -fun rewritePathDependency(line: String): String { - // some runtime crates are actually dependent on the generated bindings: - return line.replace("../sdk/build/aws-sdk/sdk/", "") - // others use relative dependencies:: - .replace("../../rust-runtime/", "") -} - -tasks.register("relocateServices") { - description = "relocate AWS services to their final destination" - doLast { - servicesToGenerate.forEach { service -> - logger.info("Relocating ${service.moduleName}...") - copy { - from("$buildDir/smithyprojections/sdk-sra-test/${service.moduleName}/rust-client-codegen") - into(outputDir.resolve(service.moduleName)) - } - copy { - from(projectDir.resolve("integration-tests/${service.moduleName}/tests")) - into(outputDir.resolve(service.moduleName).resolve("tests")) - } - } - } - dependsOn("smithyBuildJar") - inputs.dir("$buildDir/smithyprojections/sdk-sra-test/") - outputs.dir(outputDir) -} -tasks["assemble"].apply { - dependsOn("relocateServices") -} diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/.gitignore b/aws/sra-test/integration-tests/aws-sdk-s3/.gitignore deleted file mode 100644 index 5a44eef09a..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Cargo.lock diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml b/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml deleted file mode 100644 index 82abf8c094..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "aws-smithy-runtime-test" -version = "0.1.0" -edition = "2021" -publish = false -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -aws-http = { path = "../../../rust-runtime/aws-http" } -aws-runtime = { path = "../../../rust-runtime/aws-runtime" } -aws-sdk-s3 = { path = "../../build/sdk/aws-sdk-s3", features = ["test-util"] } -aws-smithy-async = { path = "../../../../rust-runtime/aws-smithy-async", features = ["test-util"]} -aws-smithy-client = { path = "../../../../rust-runtime/aws-smithy-client", features = ["test-util", "rustls"] } -aws-smithy-runtime = { path = "../../../../rust-runtime/aws-smithy-runtime" } -aws-smithy-runtime-api = { path = "../../../../rust-runtime/aws-smithy-runtime-api" } -aws-smithy-types = { path = "../../../../rust-runtime/aws-smithy-types" } -aws-types = { path = "../../../rust-runtime/aws-types" } -criterion = { version = "0.4", features = ["async_tokio"] } -http = "0.2.3" -http-body = "0.4.5" -last-release-smithy-client = { version = "0.55.3", package = "aws-smithy-client", features = ["test-util", "rustls"] } -last-release-s3 = { version = "0.28", package = "aws-sdk-s3", features = ["test-util"] } -tokio = { version = "1.23.1", features = ["macros", "test-util", "rt-multi-thread"] } -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.15", features = ["env-filter", "json"] } - -[profile.release] -debug = 1 - -[[bench]] -name = "middleware_vs_orchestrator" -harness = false diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/benches/README.md b/aws/sra-test/integration-tests/aws-sdk-s3/benches/README.md deleted file mode 100644 index cf8f97680c..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/benches/README.md +++ /dev/null @@ -1,6 +0,0 @@ -### Middleware vs. Orchestrator Benchmark - -To run the benchmark: -```bash -./gradlew :aws:sra-test:assemble && (cd aws/sra-test/integration-tests/aws-sdk-s3 && cargo bench) -``` diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/test-data/list-objects-v2.json b/aws/sra-test/integration-tests/aws-sdk-s3/test-data/list-objects-v2.json deleted file mode 100644 index 366e1fab1b..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/test-data/list-objects-v2.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "events": [ - { - "connection_id": 0, - "action": { - "Request": { - "request": { - "uri": "https://test-bucket.s3.us-east-1.amazonaws.com/?list-type=2&prefix=prefix~", - "headers": { - "x-amz-security-token": [ - "notarealsessiontoken" - ], - "authorization": [ - "AWS4-HMAC-SHA256 Credential=ANOTREAL/20210618/us-east-1/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=e7eccf4e792113f5f17a50bfd8f1719479e89ba0b476894e6f3dba030dc87f82" - ], - "x-amz-user-agent": [ - "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0" - ], - "x-amz-date": [ - "20210618T170728Z" - ], - "x-amz-content-sha256": [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - "amz-sdk-invocation-id": [ - "00000000-0000-4000-8000-000000000000" - ], - "user-agent": [ - "aws-sdk-rust/0.123.test os/windows/XPSP3 lang/rust/1.50.0" - ] - }, - "method": "GET" - } - } - } - }, - { - "connection_id": 0, - "action": { - "Eof": { - "ok": true, - "direction": "Request" - } - } - }, - { - "connection_id": 0, - "action": { - "Response": { - "response": { - "Ok": { - "status": 200, - "version": "HTTP/1.1", - "headers": { - "x-amz-request-id": [ - "9X5E7C9EAB6AQEP2" - ], - "x-amz-id-2": [ - "gZsrBxajPyo1Q0DE2plGf7T6kAnxd4Xx7/S+8lq18GegL6kFbnVXLLh1LnBzpEpFiHN9XoNHkeA=" - ], - "content-type": [ - "application/xml" - ], - "transfer-encoding": [ - "chunked" - ], - "server": [ - "AmazonS3" - ], - "date": [ - "Wed, 26 Apr 2023 14:00:24 GMT" - ], - "x-amz-bucket-region": [ - "us-east-1" - ] - } - } - } - } - } - }, - { - "connection_id": 0, - "action": { - "Data": { - "data": { - "Utf8": "\n\n test-bucket\n prefix~\n 1\n 1000\n false\n \n some-file.file\n 2009-10-12T17:50:30.000Z\n 434234\n STANDARD\n \n" - }, - "direction": "Response" - } - } - }, - { - "connection_id": 0, - "action": { - "Eof": { - "ok": true, - "direction": "Response" - } - } - } - ], - "docs": "Test sending an S3 ListObjectsV2 operation with a successful response.", - "version": "V0" -} diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/tests/interceptors.rs b/aws/sra-test/integration-tests/aws-sdk-s3/tests/interceptors.rs deleted file mode 100644 index c65605c8eb..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/tests/interceptors.rs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -mod util; - -use aws_http::user_agent::AwsUserAgent; -use aws_sdk_s3::config::{Credentials, Region}; -use aws_sdk_s3::Client; -use aws_smithy_async::test_util::StaticTimeSource; -use aws_smithy_client::dvr; -use aws_smithy_client::dvr::MediaType; -use aws_smithy_client::erase::DynConnector; -use aws_smithy_runtime_api::client::interceptors::{ - BeforeTransmitInterceptorContextMut, Interceptor, -}; -use aws_smithy_runtime_api::client::orchestrator::ConfigBagAccessors; -use aws_smithy_types::config_bag::ConfigBag; -use http::header::USER_AGENT; -use http::HeaderValue; -use std::time::{Duration, SystemTime, UNIX_EPOCH}; - -const LIST_BUCKETS_PATH: &str = "test-data/list-objects-v2.json"; - -#[tokio::test] -async fn operation_interceptor_test() { - tracing_subscriber::fmt::init(); - - let conn = dvr::ReplayingConnection::from_file(LIST_BUCKETS_PATH).unwrap(); - - // Not setting `TestUserAgentInterceptor` here, expecting it to be set later by the - // operation-level config. - let config = aws_sdk_s3::Config::builder() - .credentials_provider(Credentials::for_tests()) - .region(Region::new("us-east-1")) - .http_connector(DynConnector::new(conn.clone())) - .build(); - let client = Client::from_conf(config); - let fixup = util::FixupPlugin { - timestamp: UNIX_EPOCH + Duration::from_secs(1624036048), - }; - - let resp = dbg!( - client - .list_objects_v2() - .bucket("test-bucket") - .prefix("prefix~") - .customize() - .await - .unwrap() - .interceptor(util::TestUserAgentInterceptor) - .send_orchestrator_with_plugin(Some(fixup)) - .await - ); - let resp = resp.expect("valid e2e test"); - assert_eq!(resp.name(), Some("test-bucket")); - conn.full_validate(MediaType::Xml).await.expect("success") -} - -#[derive(Debug)] -struct RequestTimeResetInterceptor; -impl Interceptor for RequestTimeResetInterceptor { - fn modify_before_signing( - &self, - _context: &mut BeforeTransmitInterceptorContextMut<'_>, - cfg: &mut ConfigBag, - ) -> Result<(), aws_smithy_runtime_api::client::interceptors::BoxError> { - cfg.set_request_time(StaticTimeSource::new(UNIX_EPOCH)); - - Ok(()) - } -} - -#[derive(Debug)] -struct RequestTimeAdvanceInterceptor(Duration); -impl Interceptor for RequestTimeAdvanceInterceptor { - fn modify_before_signing( - &self, - _context: &mut BeforeTransmitInterceptorContextMut<'_>, - cfg: &mut ConfigBag, - ) -> Result<(), aws_smithy_runtime_api::client::interceptors::BoxError> { - let request_time = cfg.request_time().unwrap(); - let request_time = StaticTimeSource::new(request_time.now() + self.0); - cfg.set_request_time(request_time); - - Ok(()) - } -} - -#[tokio::test] -async fn interceptor_priority() { - let conn = dvr::ReplayingConnection::from_file(LIST_BUCKETS_PATH).unwrap(); - - // `RequestTimeResetInterceptor` will reset a `RequestTime` to `UNIX_EPOCH`, whose previous - // value should be `SystemTime::now()` set by `FixupPlugin`. - let config = aws_sdk_s3::Config::builder() - .credentials_provider(Credentials::for_tests()) - .region(Region::new("us-east-1")) - .http_connector(DynConnector::new(conn.clone())) - .interceptor(util::TestUserAgentInterceptor) - .interceptor(RequestTimeResetInterceptor) - .build(); - let client = Client::from_conf(config); - let fixup = util::FixupPlugin { - timestamp: SystemTime::now(), - }; - - // `RequestTimeAdvanceInterceptor` configured at the operation level should run after, - // expecting the `RequestTime` to move forward by the specified amount since `UNIX_EPOCH`. - let resp = dbg!( - client - .list_objects_v2() - .bucket("test-bucket") - .prefix("prefix~") - .customize() - .await - .unwrap() - .interceptor(RequestTimeAdvanceInterceptor(Duration::from_secs( - 1624036048 - ))) - .send_orchestrator_with_plugin(Some(fixup)) - .await - ); - let resp = resp.expect("valid e2e test"); - assert_eq!(resp.name(), Some("test-bucket")); - conn.full_validate(MediaType::Xml).await.expect("success") -} - -#[tokio::test] -async fn set_test_user_agent_through_request_mutation() { - let conn = dvr::ReplayingConnection::from_file(LIST_BUCKETS_PATH).unwrap(); - - let config = aws_sdk_s3::Config::builder() - .credentials_provider(Credentials::for_tests()) - .region(Region::new("us-east-1")) - .http_connector(DynConnector::new(conn.clone())) - .build(); - let client = Client::from_conf(config); - let fixup = util::FixupPlugin { - timestamp: UNIX_EPOCH + Duration::from_secs(1624036048), - }; - - let resp = dbg!( - client - .list_objects_v2() - .bucket("test-bucket") - .prefix("prefix~") - .customize() - .await - .unwrap() - .mutate_request(|request| { - let headers = request.headers_mut(); - let user_agent = AwsUserAgent::for_tests(); - headers.insert( - USER_AGENT, - HeaderValue::try_from(user_agent.ua_header()).unwrap(), - ); - headers.insert( - util::X_AMZ_USER_AGENT, - HeaderValue::try_from(user_agent.aws_ua_header()).unwrap(), - ); - }) - .send_orchestrator_with_plugin(Some(fixup)) - .await - ); - let resp = resp.expect("valid e2e test"); - assert_eq!(resp.name(), Some("test-bucket")); - conn.full_validate(MediaType::Xml).await.expect("success") -} diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/tests/request_information_headers.rs b/aws/sra-test/integration-tests/aws-sdk-s3/tests/request_information_headers.rs deleted file mode 100644 index 28a8df6c04..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/tests/request_information_headers.rs +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use aws_http::user_agent::AwsUserAgent; -use aws_runtime::invocation_id::InvocationId; -use aws_sdk_s3::config::{Credentials, Region}; -use aws_sdk_s3::endpoint::Params; -use aws_sdk_s3::Client; -use aws_smithy_client::dvr; -use aws_smithy_client::dvr::MediaType; -use aws_smithy_client::erase::DynConnector; -use aws_smithy_runtime::client::retries::strategy::FixedDelayRetryStrategy; -use aws_smithy_runtime_api::client::interceptors::InterceptorRegistrar; -use aws_smithy_runtime_api::client::orchestrator::ConfigBagAccessors; -use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin; -use aws_smithy_types::client::orchestrator::ConfigBagAccessors; -use aws_smithy_types::config_bag::ConfigBag; -use std::time::{Duration, UNIX_EPOCH}; - -#[derive(Debug)] -struct FixupPlugin { - client: Client, -} - -// # One SDK operation invocation. -// # Client retries 3 times, successful response on 3rd attempt. -// # Fast network, latency + server time is less than one second. -// # No clock skew -// # Client waits 1 second between retry attempts. -#[tokio::test] -async fn three_retries_and_then_success() { - tracing_subscriber::fmt::init(); - - impl RuntimePlugin for FixupPlugin { - fn configure( - &self, - cfg: &mut ConfigBag, - _interceptors: &mut InterceptorRegistrar, - ) -> Result<(), aws_smithy_runtime_api::client::runtime_plugin::BoxError> { - let params_builder = Params::builder() - .set_region(self.client.conf().region().map(|c| c.as_ref().to_string())) - .bucket("test-bucket"); - - cfg.put(params_builder); - cfg.put(AwsUserAgent::for_tests()); - cfg.put(InvocationId::for_tests()); - cfg.set_retry_strategy(FixedDelayRetryStrategy::one_second_delay()); - Ok(()) - } - } - - let path = "test-data/request-information-headers/three-retries_and-then-success.json"; - let conn = dvr::ReplayingConnection::from_file(path).unwrap(); - let config = aws_sdk_s3::Config::builder() - .credentials_provider(Credentials::for_tests()) - .region(Region::new("us-east-1")) - .http_connector(DynConnector::new(conn.clone())) - .time_source(UNIX_EPOCH + Duration::from_secs(1624036048)) - .build(); - let client = Client::from_conf(config); - let fixup = FixupPlugin { - client: client.clone(), - }; - - let resp = dbg!( - client - .list_objects_v2() - .bucket("test-bucket") - .prefix("prefix~") - .customize() - .await - .unwrap() - .config_override(aws_sdk_s3::Config::builder().force_path_style(false)) - .send_orchestrator_with_plugin(Some(fixup)) - .await - ); - - let resp = resp.expect("valid e2e test"); - assert_eq!(resp.name(), Some("test-bucket")); - conn.full_validate(MediaType::Xml).await.expect("failed") -} -// -// // # Client makes 3 separate SDK operation invocations -// // # All succeed on first attempt. -// // # Fast network, latency + server time is less than one second. -// // - request: -// // time: 2019-06-01T00:00:00Z -// // headers: -// // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 -// // amz-sdk-request: attempt=1; max=3 -// // response: -// // status: 200 -// // time_received: 2019-06-01T00:00:00Z -// // headers: -// // Date: Sat, 01 Jun 2019 00:00:00 GMT -// // - request: -// // time: 2019-06-01T00:01:01Z -// // headers: -// // # Note the different invocation id because it's a new SDK -// // # invocation operation. -// // amz-sdk-invocation-id: 70370531-7b83-4b90-8b93-46975687ecf6 -// // amz-sdk-request: ttl=20190601T000011Z; attempt=1; max=3 -// // response: -// // status: 200 -// // time_received: 2019-06-01T00:00:01Z -// // headers: -// // Date: Sat, 01 Jun 2019 00:00:01 GMT -// // - request: -// // time: 2019-06-01T00:00:02Z -// // headers: -// // amz-sdk-invocation-id: 910bf450-6c90-43de-a508-3fa126a06b71 -// // amz-sdk-request: ttl=20190601T000012Z; attempt=1; max=3 -// // response: -// // status: 200 -// // time_received: 2019-06-01T00:00:02Z -// // headers: -// // Date: Sat, 01 Jun 2019 00:00:02 GMT -// const THREE_SUCCESSFUL_ATTEMPTS_PATH: &str = "test-data/request-information-headers/three-successful-attempts.json"; -// #[tokio::test] -// async fn three_successful_attempts() { -// tracing_subscriber::fmt::init(); -// -// impl RuntimePlugin for FixupPlugin { -// fn configure( -// &self, -// cfg: &mut ConfigBag, -// ) -> Result<(), aws_smithy_runtime_api::client::runtime_plugin::BoxError> { -// let params_builder = Params::builder() -// .set_region(self.client.conf().region().map(|c| c.as_ref().to_string())) -// .bucket("test-bucket"); -// -// cfg.put(params_builder); -// cfg.set_request_time(RequestTime::new(self.timestamp.clone())); -// cfg.put(AwsUserAgent::for_tests()); -// cfg.put(InvocationId::for_tests()); -// Ok(()) -// } -// } -// -// let conn = dvr::ReplayingConnection::from_file(THREE_SUCCESSFUL_ATTEMPTS_PATH).unwrap(); -// let config = aws_sdk_s3::Config::builder() -// .credentials_provider(Credentials::for_tests()) -// .region(Region::new("us-east-1")) -// .http_connector(DynConnector::new(conn.clone())) -// .build(); -// let client = Client::from_conf(config); -// let fixup = FixupPlugin { -// client: client.clone(), -// timestamp: UNIX_EPOCH + Duration::from_secs(1624036048), -// }; -// -// let resp = dbg!( -// client -// .list_objects_v2() -// .bucket("test-bucket") -// .prefix("prefix~") -// .send_v2_with_plugin(Some(fixup)) -// .await -// ); -// -// let resp = resp.expect("valid e2e test"); -// assert_eq!(resp.name(), Some("test-bucket")); -// conn.full_validate(MediaType::Xml).await.expect("failed") -// } -// -// // # One SDK operation invocation. -// // # Client retries 3 times, successful response on 3rd attempt. -// // # Slow network, one way latency is 2 seconds. -// // # Server takes 1 second to generate response. -// // # Client clock is 10 minutes behind server clock. -// // # One second delay between retries. -// // - request: -// // time: 2019-06-01T00:00:00Z -// // headers: -// // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 -// // amz-sdk-request: attempt=1; max=3 -// // response: -// // status: 500 -// // time_received: 2019-06-01T00:00:05Z -// // headers: -// // Date: Sat, 01 Jun 2019 00:10:03 GMT -// // - request: -// // time: 2019-06-01T00:00:06Z -// // # The ttl is 00:00:16 with the client clock, -// // # but accounting for skew we have -// // # 00:10:03 - 00:00:05 = 00:09:58 -// // # ttl = 00:00:16 + 00:09:58 = 00:10:14 -// // headers: -// // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 -// // amz-sdk-request: ttl=20190601T001014Z; attempt=2; max=3 -// // response: -// // status: 500 -// // time_received: 2019-06-01T00:00:11Z -// // headers: -// // Date: Sat, 01 Jun 2019 00:10:09 GMT -// // - request: -// // time: 2019-06-01T00:00:12Z -// // headers: -// // # ttl = 00:00:12 + 20 = 00:00:22 -// // # skew is: -// // # 00:10:09 - 00:00:11 -// // amz-sdk-invocation-id: 3dfe4f26-c090-4887-8c14-7bac778bca07 -// // amz-sdk-request: ttl=20190601T001020Z; attempt=3; max=3 -// // response: -// // status: 200 -// // time_received: 2019-06-01T00:00:17Z -// // headers: -// // Date: Sat, 01 Jun 2019 00:10:15 GMT -// const SLOW_NETWORK_AND_LATE_CLIENT_CLOCK_PATH: &str = "test-data/request-information-headers/slow-network-and-late-client-clock.json"; -// #[tokio::test] -// async fn slow_network_and_late_client_clock() { -// tracing_subscriber::fmt::init(); -// -// impl RuntimePlugin for FixupPlugin { -// fn configure( -// &self, -// cfg: &mut ConfigBag, -// ) -> Result<(), aws_smithy_runtime_api::client::runtime_plugin::BoxError> { -// let params_builder = Params::builder() -// .set_region(self.client.conf().region().map(|c| c.as_ref().to_string())) -// .bucket("test-bucket"); -// -// cfg.put(params_builder); -// cfg.set_request_time(RequestTime::new(self.timestamp.clone())); -// cfg.put(AwsUserAgent::for_tests()); -// cfg.put(InvocationId::for_tests()); -// Ok(()) -// } -// } -// -// let conn = dvr::ReplayingConnection::from_file(SLOW_NETWORK_AND_LATE_CLIENT_CLOCK_PATH).unwrap(); -// let config = aws_sdk_s3::Config::builder() -// .credentials_provider(Credentials::for_tests()) -// .region(Region::new("us-east-1")) -// .http_connector(DynConnector::new(conn.clone())) -// .build(); -// let client = Client::from_conf(config); -// let fixup = FixupPlugin { -// client: client.clone(), -// timestamp: UNIX_EPOCH + Duration::from_secs(1624036048), -// }; -// -// let resp = dbg!( -// client -// .list_objects_v2() -// .bucket("test-bucket") -// .prefix("prefix~") -// .send_v2_with_plugin(Some(fixup)) -// .await -// ); -// -// let resp = resp.expect("valid e2e test"); -// assert_eq!(resp.name(), Some("test-bucket")); -// conn.full_validate(MediaType::Xml).await.expect("failed") -// } diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/tests/util.rs b/aws/sra-test/integration-tests/aws-sdk-s3/tests/util.rs deleted file mode 100644 index 992f9a748e..0000000000 --- a/aws/sra-test/integration-tests/aws-sdk-s3/tests/util.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use aws_http::user_agent::AwsUserAgent; -use aws_runtime::invocation_id::InvocationId; -use aws_smithy_async::test_util::StaticTimeSource; -use aws_smithy_runtime_api::client::interceptors::{ - BeforeTransmitInterceptorContextMut, Interceptor, InterceptorRegistrar, -}; -use aws_smithy_runtime_api::client::orchestrator::ConfigBagAccessors; -use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin; -use aws_smithy_types::config_bag::ConfigBag; -use http::header::USER_AGENT; -use http::{HeaderName, HeaderValue}; -use std::time::SystemTime; - -pub const X_AMZ_USER_AGENT: HeaderName = HeaderName::from_static("x-amz-user-agent"); - -#[derive(Debug)] -pub struct FixupPlugin; -impl RuntimePlugin for FixupPlugin { - fn configure( - &self, - cfg: &mut ConfigBag, - _interceptors: &mut InterceptorRegistrar, - ) -> Result<(), aws_smithy_runtime_api::client::runtime_plugin::BoxError> { - cfg.put(InvocationId::for_tests()); - Ok(()) - } -} - -#[derive(Debug)] -pub struct TestUserAgentInterceptor; -impl Interceptor for TestUserAgentInterceptor { - fn modify_before_signing( - &self, - context: &mut BeforeTransmitInterceptorContextMut<'_>, - _cfg: &mut ConfigBag, - ) -> Result<(), aws_smithy_runtime_api::client::interceptors::BoxError> { - let headers = context.request_mut().headers_mut(); - let user_agent = AwsUserAgent::for_tests(); - // Overwrite user agent header values provided by `UserAgentInterceptor` - headers.insert(USER_AGENT, HeaderValue::try_from(user_agent.ua_header())?); - headers.insert( - X_AMZ_USER_AGENT, - HeaderValue::try_from(user_agent.aws_ua_header())?, - ); - - Ok(()) - } -} diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/ResiliencyConfigCustomization.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/ResiliencyConfigCustomization.kt index a79e2be687..8dde7f43a8 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/ResiliencyConfigCustomization.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/ResiliencyConfigCustomization.kt @@ -370,8 +370,16 @@ class ResiliencyConfigCustomization(private val codegenContext: ClientCodegenCon if (runtimeMode.generateOrchestrator) { rustTemplate( """ - let retry_partition = layer.load::<#{RetryPartition}>().cloned().unwrap_or_else(|| #{RetryPartition}::new("${codegenContext.serviceShape.sdkId()}")); - let retry_config = layer.load::<#{RetryConfig}>().cloned().unwrap_or_else(#{RetryConfig}::disabled); + if layer.load::<#{RetryConfig}>().is_none() { + layer.store_put(#{RetryConfig}::disabled()); + } + let retry_config = layer.load::<#{RetryConfig}>().expect("set to default above").clone(); + + if layer.load::<#{RetryPartition}>().is_none() { + layer.store_put(#{RetryPartition}::new("${codegenContext.serviceShape.sdkId()}")); + } + let retry_partition = layer.load::<#{RetryPartition}>().expect("set to default above").clone(); + if retry_config.has_retry() { #{debug}!("using retry strategy with partition '{}'", retry_partition); } diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/TimeSourceCustomization.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/TimeSourceCustomization.kt index ab9a96155c..83e1119013 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/TimeSourceCustomization.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/TimeSourceCustomization.kt @@ -116,7 +116,7 @@ class TimeSourceCustomization(codegenContext: ClientCodegenContext) : ConfigCust rustTemplate( """ if self.runtime_components.time_source().is_none() { - self.runtime_components.set_time_source(#{Default}::default()); + self.runtime_components.set_time_source(#{Some}(#{Default}::default())); } """, *codegenScope, diff --git a/rust-runtime/aws-smithy-client/src/dvr/replay.rs b/rust-runtime/aws-smithy-client/src/dvr/replay.rs index 94d9123e0e..27e606f082 100644 --- a/rust-runtime/aws-smithy-client/src/dvr/replay.rs +++ b/rust-runtime/aws-smithy-client/src/dvr/replay.rs @@ -19,6 +19,7 @@ use tokio::task::JoinHandle; use aws_smithy_http::body::SdkBody; use aws_smithy_http::result::ConnectorError; use aws_smithy_protocol_test::MediaType; +use aws_smithy_types::error::display::DisplayErrorContext; use crate::dvr::{Action, ConnectionId, Direction, Event, NetworkTraffic}; @@ -137,7 +138,14 @@ impl ReplayingConnection { )) }) .collect::>(); - aws_smithy_protocol_test::validate_headers(actual.headers(), expected_headers)?; + aws_smithy_protocol_test::validate_headers(actual.headers(), expected_headers) + .map_err(|err| { + format!( + "event {} validation failed with: {}", + conn_id.0, + DisplayErrorContext(&err) + ) + })?; } Ok(()) } @@ -272,6 +280,7 @@ impl tower::Service> for ReplayingConnection { fn call(&mut self, mut req: Request) -> Self::Future { let event_id = self.next_id(); + tracing::debug!("received event {}: {req:?}", event_id.0); let mut events = match self.live_events.lock().unwrap().remove(&event_id) { Some(traffic) => traffic, None => { diff --git a/rust-runtime/aws-smithy-http/src/connection.rs b/rust-runtime/aws-smithy-http/src/connection.rs index eb81f63687..f98bb780bd 100644 --- a/rust-runtime/aws-smithy-http/src/connection.rs +++ b/rust-runtime/aws-smithy-http/src/connection.rs @@ -82,7 +82,7 @@ impl CaptureSmithyConnection { match self.loader.lock().unwrap().as_ref() { Some(loader) => loader(), None => { - println!("no loader was set :-/"); + tracing::debug!("no loader was set on the CaptureSmithyConnection"); None } } diff --git a/settings.gradle.kts b/settings.gradle.kts index e33a925bb7..6c920d7217 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,7 +19,6 @@ include(":aws:rust-runtime") include(":aws:sdk") include(":aws:sdk-adhoc-test") include(":aws:sdk-codegen") -include(":aws:sra-test") pluginManagement { val smithyGradlePluginVersion: String by settings