From 035fd72fd20361fcbd31abb5ead50b64aca2a7ba Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Tue, 17 Dec 2024 10:21:38 -0600 Subject: [PATCH 1/5] add tracking for checksum algorithm business metric --- aws/rust-runtime/Cargo.lock | 2 +- aws/rust-runtime/aws-config/Cargo.lock | 2 +- .../src/http_request_checksum.rs | 17 + .../aws-runtime/src/user_agent/metrics.rs | 44 ++- .../rustsdk/HttpRequestChecksumDecorator.kt | 1 + .../smithy/rustsdk/UserAgentDecoratorTest.kt | 290 +++++++++++++++++- rust-runtime/Cargo.lock | 80 ++--- rust-runtime/aws-smithy-runtime/Cargo.toml | 2 +- .../src/client/sdk_feature.rs | 11 + rust-runtime/aws-smithy-types/Cargo.toml | 2 +- .../inlineable/src/sdk_feature_tracker.rs | 77 +++++ 11 files changed, 477 insertions(+), 51 deletions(-) diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index 1f610db1b5..55c31d2b9a 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.9" +version = "1.2.10" dependencies = [ "base64-simd", "bytes", diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index b29b7078fd..84af2fb247 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -298,7 +298,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.9" +version = "1.2.10" dependencies = [ "base64-simd", "bytes", diff --git a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs index 689edcc556..b187d9703c 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs @@ -12,6 +12,7 @@ use aws_runtime::content_encoding::header_value::AWS_CHUNKED; use aws_runtime::content_encoding::{AwsChunkedBody, AwsChunkedBodyOptions}; use aws_smithy_checksums::ChecksumAlgorithm; use aws_smithy_checksums::{body::calculate, http::HttpChecksum}; +use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature; use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::client::interceptors::context::{ BeforeSerializationInterceptorContextRef, BeforeTransmitInterceptorContextMut, Input, @@ -130,6 +131,22 @@ where cfg: &mut ConfigBag, ) -> Result<(), BoxError> { let checksum_algorithm = (self.algorithm_provider)(context.input())?; + if let Some(checksum_algorithm) = checksum_algorithm { + let feature = match checksum_algorithm { + ChecksumAlgorithm::Crc32 => Some(SmithySdkFeature::FlexibleChecksumsReqCrc32), + ChecksumAlgorithm::Crc32c => Some(SmithySdkFeature::FlexibleChecksumsReqCrc32c), + // TODO(flexible checksums v2) add CRC64 to this list + ChecksumAlgorithm::Sha1 => Some(SmithySdkFeature::FlexibleChecksumsReqSha1), + ChecksumAlgorithm::Sha256 => Some(SmithySdkFeature::FlexibleChecksumsReqSha256), + _ => { + tracing::warn!("can't insert business metric for unknown checksum algorithm."); + None + } + }; + if let Some(feature) = feature { + cfg.interceptor_state().store_append(feature); + } + } let mut layer = Layer::new("RequestChecksumInterceptor"); layer.store_put(RequestChecksumInterceptorState { checksum_algorithm }); diff --git a/aws/rust-runtime/aws-runtime/src/user_agent/metrics.rs b/aws/rust-runtime/aws-runtime/src/user_agent/metrics.rs index be10fe7be4..c667bc7645 100644 --- a/aws/rust-runtime/aws-runtime/src/user_agent/metrics.rs +++ b/aws/rust-runtime/aws-runtime/src/user_agent/metrics.rs @@ -127,7 +127,16 @@ iterable_enum!( AccountIdModeDisabled, AccountIdModeRequired, Sigv4aSigning, - ResolvedAccountId + ResolvedAccountId, + FlexibleChecksumsReqCrc32, + FlexibleChecksumsReqCrc32c, + FlexibleChecksumsReqCrc64, + FlexibleChecksumsReqSha1, + FlexibleChecksumsReqSha256, + FlexibleChecksumsReqWhenSupported, + FlexibleChecksumsReqWhenRequired, + FlexibleChecksumsResWhenSupported, + FlexibleChecksumsResWhenRequired ); pub(crate) trait ProvideBusinessMetric { @@ -142,6 +151,25 @@ impl ProvideBusinessMetric for SmithySdkFeature { Paginator => Some(BusinessMetric::Paginator), GzipRequestCompression => Some(BusinessMetric::GzipRequestCompression), ProtocolRpcV2Cbor => Some(BusinessMetric::ProtocolRpcV2Cbor), + RetryModeStandard => Some(BusinessMetric::RetryModeStandard), + RetryModeAdaptive => Some(BusinessMetric::RetryModeAdaptive), + FlexibleChecksumsReqCrc32 => Some(BusinessMetric::FlexibleChecksumsReqCrc32), + FlexibleChecksumsReqCrc32c => Some(BusinessMetric::FlexibleChecksumsReqCrc32c), + FlexibleChecksumsReqCrc64 => Some(BusinessMetric::FlexibleChecksumsReqCrc64), + FlexibleChecksumsReqSha1 => Some(BusinessMetric::FlexibleChecksumsReqSha1), + FlexibleChecksumsReqSha256 => Some(BusinessMetric::FlexibleChecksumsReqSha256), + FlexibleChecksumsReqWhenSupported => { + Some(BusinessMetric::FlexibleChecksumsReqWhenSupported) + } + FlexibleChecksumsReqWhenRequired => { + Some(BusinessMetric::FlexibleChecksumsReqWhenRequired) + } + FlexibleChecksumsResWhenSupported => { + Some(BusinessMetric::FlexibleChecksumsResWhenSupported) + } + FlexibleChecksumsResWhenRequired => { + Some(BusinessMetric::FlexibleChecksumsResWhenRequired) + } otherwise => { // This may occur if a customer upgrades only the `aws-smithy-runtime-api` crate // while continuing to use an outdated version of an SDK crate or the `aws-runtime` @@ -260,7 +288,16 @@ mod tests { "ACCOUNT_ID_MODE_DISABLED": "Q", "ACCOUNT_ID_MODE_REQUIRED": "R", "SIGV4A_SIGNING": "S", - "RESOLVED_ACCOUNT_ID": "T" + "RESOLVED_ACCOUNT_ID": "T", + "FLEXIBLE_CHECKSUMS_REQ_CRC32" : "U", + "FLEXIBLE_CHECKSUMS_REQ_CRC32C" : "V", + "FLEXIBLE_CHECKSUMS_REQ_CRC64" : "W", + "FLEXIBLE_CHECKSUMS_REQ_SHA1" : "X", + "FLEXIBLE_CHECKSUMS_REQ_SHA256" : "Y", + "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED" : "Z", + "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED" : "a", + "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED" : "b", + "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED" : "c" } "#; @@ -268,8 +305,9 @@ mod tests { assert_eq!(expected.len(), FEATURE_ID_TO_METRIC_VALUE.len()); for (feature_id, metric_value) in &*FEATURE_ID_TO_METRIC_VALUE { + let expected = expected.get(format!("{feature_id}").as_str()); assert_eq!( - expected.get(format!("{feature_id}").as_str()).unwrap(), + expected.expect(&format!("Expected {feature_id} to have value `{metric_value}` but it was `{expected:?}` instead.")), metric_value, ); } diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt index 2794fc0295..da5c2ac7bf 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt @@ -39,6 +39,7 @@ internal fun RuntimeConfig.awsInlineableHttpRequestChecksum() = CargoDependency.smithyHttp(this), CargoDependency.smithyRuntimeApiClient(this), CargoDependency.smithyTypes(this), + CargoDependency.TempFile, ), ) diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt index dbc30c940f..1f200faed0 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt @@ -7,6 +7,7 @@ package software.amazon.smithy.rustsdk import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.core.rustlang.rust import software.amazon.smithy.rust.codegen.core.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.core.smithy.RuntimeType import software.amazon.smithy.rust.codegen.core.smithy.RuntimeType.Companion.preludeScope @@ -176,9 +177,7 @@ class UserAgentDecoratorTest { val moduleName = ctx.moduleUseName() rustTemplate( """ - use $moduleName::config::{ - Region, - }; + use $moduleName::config::Region; use $moduleName::{Client, Config}; let (http_client, rcvr) = #{capture_request}(#{None}); @@ -197,7 +196,290 @@ class UserAgentDecoratorTest { #{assert_ua_contains_metric_values}(user_agent, &["M"]); """, *preludeScope, - "assert_ua_contains_metric_values" to AwsRuntimeType.awsRuntimeTestUtil(rc).resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "capture_request" to RuntimeType.captureRequest(rc), + "disable_interceptor" to + RuntimeType.smithyRuntimeApiClient(rc) + .resolve("client::interceptors::disable_interceptor"), + "UserAgentInterceptor" to + AwsRuntimeType.awsRuntime(rc) + .resolve("user_agent::UserAgentInterceptor"), + ) + } + } + } + } + + @Test + fun `it emits business metric for checksum usage`() { + val model = + """ + namespace test + + use aws.api#service + use aws.auth#sigv4 + use aws.protocols#httpChecksum + use aws.protocols#restJson1 + use smithy.rules#endpointRuleSet + + @service(sdkId: "dontcare") + @restJson1 + @sigv4(name: "dontcare") + @auth([sigv4]) + @endpointRuleSet({ + "version": "1.0", + "rules": [{ "type": "endpoint", "conditions": [], "endpoint": { "url": "https://example.com" } }], + "parameters": { + "Region": { "required": false, "type": "String", "builtIn": "AWS::Region" }, + } + }) + service TestService { + version: "2023-01-01", + operations: [HttpChecksumOperation, HttpChecksumStreamingOperation] + } + + @http(uri: "/HttpChecksumOperation", method: "POST") + @optionalAuth + @httpChecksum( + requestChecksumRequired: true, + requestAlgorithmMember: "checksumAlgorithm", + requestValidationModeMember: "validationMode", + responseAlgorithms: ["CRC32", "CRC32C", "CRC64NVME", "SHA1", "SHA256"] + ) + operation HttpChecksumOperation { + input: SomeInput, + output: SomeOutput + } + + @input + structure SomeInput { + @httpHeader("x-amz-request-algorithm") + checksumAlgorithm: ChecksumAlgorithm + + @httpHeader("x-amz-response-validation-mode") + validationMode: ValidationMode + + @httpHeader("x-amz-checksum-crc32") + ChecksumCRC32: String + + @httpHeader("x-amz-checksum-crc32c") + ChecksumCRC32C: String + + @httpHeader("x-amz-checksum-crc64nvme") + ChecksumCRC64Nvme: String + + @httpHeader("x-amz-checksum-sha1") + ChecksumSHA1: String + + @httpHeader("x-amz-checksum-sha256") + ChecksumSHA256: String + + @httpPayload + @required + body: Blob + } + + @output + structure SomeOutput {} + + @http(uri: "/HttpChecksumStreamingOperation", method: "POST") + @optionalAuth + @httpChecksum( + requestChecksumRequired: true, + requestAlgorithmMember: "checksumAlgorithm", + requestValidationModeMember: "validationMode", + responseAlgorithms: ["CRC32", "CRC32C", "CRC64NVME", "SHA1", "SHA256"] + ) + operation HttpChecksumStreamingOperation { + input: SomeStreamingInput, + output: SomeStreamingOutput + } + + @streaming + blob StreamingBlob + + @input + structure SomeStreamingInput { + @httpHeader("x-amz-request-algorithm") + checksumAlgorithm: ChecksumAlgorithm + + @httpHeader("x-amz-response-validation-mode") + validationMode: ValidationMode + + @httpPayload + @required + body: StreamingBlob + } + + @output + structure SomeStreamingOutput {} + + enum ChecksumAlgorithm { + CRC32 + CRC32C + CRC64NVME + SHA1 + SHA256 + } + + enum ValidationMode { + ENABLED + } + """.asSmithyModel(smithyVersion = "2.0") + + awsSdkIntegrationTest(model) { ctx, rustCrate -> + rustCrate.integrationTest("business_metrics_for_checksums") { + val moduleName = ctx.moduleUseName() + val rc = ctx.runtimeConfig + rust( + """ + use $moduleName::config::Region; + use $moduleName::types::ChecksumAlgorithm; + use $moduleName::primitives::Blob; + use $moduleName::{Client, Config}; + """, + ) + + tokioTest("should_emit_metric_in_user_agent_for_crc32") { + rustTemplate( + """ + let (http_client, rcvr) = #{capture_request}(#{None}); + let config = Config::builder() + .region(Region::new("us-east-1")) + .http_client(http_client.clone()) + .with_test_defaults() + .build(); + let client = Client::from_conf(config); + let _ = client + .http_checksum_operation() + .checksum_algorithm(ChecksumAlgorithm::Crc32) + .body(Blob::new(b"Hello, world!")) + .send() + .await; + let expected_req = rcvr.expect_request(); + let user_agent = expected_req + .headers() + .get("x-amz-user-agent") + .unwrap(); + #{assert_ua_contains_metric_values}(user_agent, &["U"]); + """, + *preludeScope, + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "capture_request" to RuntimeType.captureRequest(rc), + "disable_interceptor" to + RuntimeType.smithyRuntimeApiClient(rc) + .resolve("client::interceptors::disable_interceptor"), + "UserAgentInterceptor" to + AwsRuntimeType.awsRuntime(rc) + .resolve("user_agent::UserAgentInterceptor"), + ) + } + + tokioTest("should_emit_metric_in_user_agent_for_crc32c") { + rustTemplate( + """ + let (http_client, rcvr) = #{capture_request}(#{None}); + let config = Config::builder() + .region(Region::new("us-east-1")) + .http_client(http_client.clone()) + .with_test_defaults() + .build(); + let client = Client::from_conf(config); + let _ = client + .http_checksum_operation() + .checksum_algorithm(ChecksumAlgorithm::Crc32C) + .body(Blob::new(b"Hello, world!")) + .send() + .await; + let expected_req = rcvr.expect_request(); + let user_agent = expected_req + .headers() + .get("x-amz-user-agent") + .unwrap(); + #{assert_ua_contains_metric_values}(user_agent, &["V"]); + """, + *preludeScope, + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "capture_request" to RuntimeType.captureRequest(rc), + "disable_interceptor" to + RuntimeType.smithyRuntimeApiClient(rc) + .resolve("client::interceptors::disable_interceptor"), + "UserAgentInterceptor" to + AwsRuntimeType.awsRuntime(rc) + .resolve("user_agent::UserAgentInterceptor"), + ) + } + + tokioTest("should_emit_metric_in_user_agent_for_sha1") { + rustTemplate( + """ + let (http_client, rcvr) = #{capture_request}(#{None}); + let config = Config::builder() + .region(Region::new("us-east-1")) + .http_client(http_client.clone()) + .with_test_defaults() + .build(); + let client = Client::from_conf(config); + let _ = client + .http_checksum_operation() + .checksum_algorithm(ChecksumAlgorithm::Sha1) + .body(Blob::new(b"Hello, world!")) + .send() + .await; + let expected_req = rcvr.expect_request(); + let user_agent = expected_req + .headers() + .get("x-amz-user-agent") + .unwrap(); + #{assert_ua_contains_metric_values}(user_agent, &["X"]); + """, + *preludeScope, + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "capture_request" to RuntimeType.captureRequest(rc), + "disable_interceptor" to + RuntimeType.smithyRuntimeApiClient(rc) + .resolve("client::interceptors::disable_interceptor"), + "UserAgentInterceptor" to + AwsRuntimeType.awsRuntime(rc) + .resolve("user_agent::UserAgentInterceptor"), + ) + } + + tokioTest("should_emit_metric_in_user_agent_for_sha256") { + rustTemplate( + """ + let (http_client, rcvr) = #{capture_request}(#{None}); + let config = Config::builder() + .region(Region::new("us-east-1")) + .http_client(http_client.clone()) + .with_test_defaults() + .build(); + let client = Client::from_conf(config); + let _ = client + .http_checksum_operation() + .checksum_algorithm(ChecksumAlgorithm::Sha256) + .body(Blob::new(b"Hello, world!")) + .send() + .await; + let expected_req = rcvr.expect_request(); + let user_agent = expected_req + .headers() + .get("x-amz-user-agent") + .unwrap(); + #{assert_ua_contains_metric_values}(user_agent, &["Y"]); + """, + *preludeScope, + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), "capture_request" to RuntimeType.captureRequest(rc), "disable_interceptor" to RuntimeType.smithyRuntimeApiClient(rc) diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 0ebc1921c1..f1931480c9 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -134,7 +134,7 @@ checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "zeroize", ] @@ -193,7 +193,7 @@ dependencies = [ "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime 1.7.3", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "aws-types", "bytes", "fastrand", @@ -222,7 +222,7 @@ dependencies = [ "aws-smithy-json 0.60.7", "aws-smithy-runtime 1.7.3", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "aws-smithy-xml 0.60.9 (registry+https://github.com/rust-lang/crates.io-index)", "aws-types", "bytes", @@ -250,7 +250,7 @@ dependencies = [ "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "crypto-bigint 0.5.5", "form_urlencoded", @@ -295,7 +295,7 @@ dependencies = [ name = "aws-smithy-cbor" version = "0.60.8" dependencies = [ - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "criterion", "minicbor", ] @@ -305,7 +305,7 @@ name = "aws-smithy-checksums" version = "0.60.13" dependencies = [ "aws-smithy-http 0.60.11", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "bytes-utils", "crc32c", @@ -330,7 +330,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba1a71073fca26775c8b5189175ea8863afb1c9ea2cceb02a5de5ad9dfbaa795" dependencies = [ "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "crc32c", "crc32fast", @@ -353,7 +353,7 @@ name = "aws-smithy-compression" version = "0.0.2" dependencies = [ "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "bytes-utils", "flate2", @@ -374,7 +374,7 @@ name = "aws-smithy-eventstream" version = "0.60.5" dependencies = [ "arbitrary", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "bytes-utils", "crc32fast", @@ -387,7 +387,7 @@ version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef7d0a272725f87e51ba2bf89f8c21e4df61b9e49ae1ac367a6d69916ef7c90" dependencies = [ - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "crc32fast", ] @@ -399,7 +399,7 @@ dependencies = [ "aws-smithy-async 1.2.1", "aws-smithy-runtime 1.7.4", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "h2 0.4.7", "http 1.2.0", "hyper 1.5.1", @@ -420,7 +420,7 @@ dependencies = [ "async-stream", "aws-smithy-eventstream 0.60.5", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "bytes-utils", "futures-core", @@ -445,7 +445,7 @@ checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" dependencies = [ "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "bytes-utils", "futures-core", @@ -470,7 +470,7 @@ dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-json 0.61.1", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "aws-smithy-xml 0.60.9", "bytes", "futures-util", @@ -500,7 +500,7 @@ dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-http-server", "aws-smithy-json 0.61.1", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "aws-smithy-xml 0.60.9", "bytes", "futures", @@ -542,14 +542,14 @@ version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" dependencies = [ - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", ] [[package]] name = "aws-smithy-json" version = "0.61.1" dependencies = [ - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "proptest", "serde_json", ] @@ -560,7 +560,7 @@ version = "0.2.1" dependencies = [ "aws-sdk-s3", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "tokio", ] @@ -604,7 +604,7 @@ dependencies = [ name = "aws-smithy-query" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "urlencoding", ] @@ -618,7 +618,7 @@ dependencies = [ "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-protocol-test 0.63.0 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "fastrand", "h2 0.3.26", @@ -649,7 +649,7 @@ dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "fastrand", "futures-util", @@ -680,7 +680,7 @@ name = "aws-smithy-runtime-api" version = "1.7.3" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "http 0.2.12", "http 1.2.0", @@ -698,7 +698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" dependencies = [ "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "bytes", "http 0.2.12", "http 1.2.0", @@ -711,60 +711,60 @@ dependencies = [ [[package]] name = "aws-smithy-types" version = "1.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" dependencies = [ - "base64 0.13.1", "base64-simd", "bytes", "bytes-utils", - "ciborium", - "criterion", "futures-core", "http 0.2.12", "http 1.2.0", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", - "hyper 0.14.31", "itoa", - "lazy_static", "num-integer", "pin-project-lite", "pin-utils", - "proptest", - "rand", "ryu", "serde", - "serde_json", - "tempfile", "time", "tokio", - "tokio-stream", "tokio-util", ] [[package]] name = "aws-smithy-types" -version = "1.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" +version = "1.2.10" dependencies = [ + "base64 0.13.1", "base64-simd", "bytes", "bytes-utils", + "ciborium", + "criterion", "futures-core", "http 0.2.12", "http 1.2.0", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", + "hyper 0.14.31", "itoa", + "lazy_static", "num-integer", "pin-project-lite", "pin-utils", + "proptest", + "rand", "ryu", "serde", + "serde_json", + "tempfile", "time", "tokio", + "tokio-stream", "tokio-util", ] @@ -773,7 +773,7 @@ name = "aws-smithy-types-convert" version = "0.60.8" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "chrono", "futures-core", "time", @@ -785,7 +785,7 @@ version = "0.1.3" dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "bytes", "http 1.2.0", "tracing", @@ -820,7 +820,7 @@ dependencies = [ "aws-credential-types", "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aws-smithy-types 1.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-types 1.2.9", "rustc_version", "tracing", ] @@ -1991,7 +1991,7 @@ dependencies = [ "aws-smithy-json 0.61.1", "aws-smithy-runtime 1.7.4", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.9", + "aws-smithy-types 1.2.10", "aws-smithy-xml 0.60.9", "bytes", "fastrand", diff --git a/rust-runtime/aws-smithy-runtime/Cargo.toml b/rust-runtime/aws-smithy-runtime/Cargo.toml index d25e3c3929..71c3610648 100644 --- a/rust-runtime/aws-smithy-runtime/Cargo.toml +++ b/rust-runtime/aws-smithy-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-runtime" -version = "1.7.4" +version = "1.7.6" authors = ["AWS Rust SDK Team ", "Zelda Hessler "] description = "The new smithy runtime crate" edition = "2021" diff --git a/rust-runtime/aws-smithy-runtime/src/client/sdk_feature.rs b/rust-runtime/aws-smithy-runtime/src/client/sdk_feature.rs index 5a8ab95a13..254458dc91 100644 --- a/rust-runtime/aws-smithy-runtime/src/client/sdk_feature.rs +++ b/rust-runtime/aws-smithy-runtime/src/client/sdk_feature.rs @@ -12,6 +12,17 @@ pub enum SmithySdkFeature { Paginator, GzipRequestCompression, ProtocolRpcV2Cbor, + RetryModeStandard, + RetryModeAdaptive, + FlexibleChecksumsReqCrc32, + FlexibleChecksumsReqCrc32c, + FlexibleChecksumsReqCrc64, + FlexibleChecksumsReqSha1, + FlexibleChecksumsReqSha256, + FlexibleChecksumsReqWhenSupported, + FlexibleChecksumsReqWhenRequired, + FlexibleChecksumsResWhenSupported, + FlexibleChecksumsResWhenRequired, } impl Storable for SmithySdkFeature { diff --git a/rust-runtime/aws-smithy-types/Cargo.toml b/rust-runtime/aws-smithy-types/Cargo.toml index e6093486c7..2497213697 100644 --- a/rust-runtime/aws-smithy-types/Cargo.toml +++ b/rust-runtime/aws-smithy-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-types" -version = "1.2.10" +version = "1.2.11" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", diff --git a/rust-runtime/inlineable/src/sdk_feature_tracker.rs b/rust-runtime/inlineable/src/sdk_feature_tracker.rs index 2f36e121df..710f4fcce5 100644 --- a/rust-runtime/inlineable/src/sdk_feature_tracker.rs +++ b/rust-runtime/inlineable/src/sdk_feature_tracker.rs @@ -172,3 +172,80 @@ pub(crate) mod waiter { } } } + +#[allow(dead_code)] +pub(crate) mod retry_mode { + use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature; + use aws_smithy_runtime_api::box_error::BoxError; + use aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextMut; + use aws_smithy_runtime_api::client::interceptors::{Intercept, SharedInterceptor}; + use aws_smithy_runtime_api::client::runtime_components::{ + RuntimeComponents, RuntimeComponentsBuilder, + }; + use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin; + use aws_smithy_types::config_bag::ConfigBag; + use aws_smithy_types::retry::{RetryConfig, RetryMode}; + use std::borrow::Cow; + + #[derive(Debug)] + struct RetryModeFeatureTrackerInterceptor; + + impl RetryModeFeatureTrackerInterceptor { + pub(crate) fn new() -> Self { + Self + } + } + + impl Intercept for RetryModeFeatureTrackerInterceptor { + fn name(&self) -> &'static str { + "RetryModeFeatureTrackerInterceptor" + } + + fn modify_before_serialization( + &self, + _context: &mut BeforeSerializationInterceptorContextMut<'_>, + _runtime_components: &RuntimeComponents, + cfg: &mut ConfigBag, + ) -> Result<(), BoxError> { + cfg.load::() + .map(|retry_config| match retry_config.mode() { + RetryMode::Standard => SmithySdkFeature::RetryModeStandard, + RetryMode::Adaptive => SmithySdkFeature::RetryModeAdaptive, + _ => unreachable!("retry mode must be standard or adaptive"), + }) + .map(|feature| { + cfg.interceptor_state() + .store_append::(feature) + }); + + Ok(()) + } + } + + #[derive(Debug)] + pub(crate) struct RetryModeFeatureTrackerRuntimePlugin { + runtime_components: RuntimeComponentsBuilder, + } + + impl RetryModeFeatureTrackerRuntimePlugin { + pub(crate) fn new() -> Self { + Self { + runtime_components: RuntimeComponentsBuilder::new( + "RetryModeFeatureTrackerRuntimePlugin", + ) + .with_interceptor(SharedInterceptor::new( + RetryModeFeatureTrackerInterceptor::new(), + )), + } + } + } + + impl RuntimePlugin for RetryModeFeatureTrackerRuntimePlugin { + fn runtime_components( + &self, + _: &RuntimeComponentsBuilder, + ) -> Cow<'_, RuntimeComponentsBuilder> { + Cow::Borrowed(&self.runtime_components) + } + } +} From 16a92c453b97cc81d9402dd62d0afa73b0f6ab3b Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Tue, 17 Dec 2024 10:46:02 -0600 Subject: [PATCH 2/5] add retry mode business metric tracking --- .../smithy/rustsdk/UserAgentDecoratorTest.kt | 117 ++++++++++++++++++ ...eatureTrackerRuntimePluginCustomization.kt | 38 ++++++ .../customize/RequiredCustomizations.kt | 4 +- rust-runtime/Cargo.lock | 40 +++--- .../inlineable/src/sdk_feature_tracker.rs | 43 +------ 5 files changed, 184 insertions(+), 58 deletions(-) create mode 100644 codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/RetryModeFeatureTrackerRuntimePluginCustomization.kt diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt index 1f200faed0..aa6c4f881c 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt @@ -212,6 +212,123 @@ class UserAgentDecoratorTest { } } + @Test + fun `it emits business metrics for retry modes`() { + val model = + """ + namespace test + + use aws.auth#sigv4 + use aws.api#service + use aws.protocols#restJson1 + use smithy.rules#endpointRuleSet + + @auth([sigv4]) + @sigv4(name: "dontcare") + @endpointRuleSet({ + "version": "1.0", + "rules": [{ "type": "endpoint", "conditions": [], "endpoint": { "url": "https://example.com" } }], + "parameters": {} + }) + @service(sdkId: "dontcare") + @restJson1 + service TestService { version: "2023-01-01", operations: [SomeOperation] } + + @http(uri: "/SomeOperation", method: "GET") + @optionalAuth + operation SomeOperation { + input: SomeInput, + output: SomeOutput + } + + @input + structure SomeInput {} + + @output + structure SomeOutput {} + """.asSmithyModel() + + awsSdkIntegrationTest(model) { ctx, rustCrate -> + rustCrate.integrationTest("retry_mode_feature_tracker") { + val rc = ctx.runtimeConfig + val moduleName = ctx.moduleUseName() + + rust( + """ + use $moduleName::config::{Region, retry::RetryConfig}; + use $moduleName::{Client, Config}; + """, + ) + + tokioTest("should_emit_metric_in_user_agent_standard_mode") { + rustTemplate( + """ + let (http_client, rcvr) = #{capture_request}(#{None}); + let config = Config::builder() + .region(Region::new("us-east-1")) + .http_client(http_client.clone()) + .retry_config(RetryConfig::standard()) + .with_test_defaults() + .build(); + let client = Client::from_conf(config); + let _ = client.some_operation().send().await; + let expected_req = rcvr.expect_request(); + let user_agent = expected_req + .headers() + .get("x-amz-user-agent") + .unwrap(); + #{assert_ua_contains_metric_values}(user_agent, &["E"]); + """, + *preludeScope, + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "capture_request" to RuntimeType.captureRequest(rc), + "disable_interceptor" to + RuntimeType.smithyRuntimeApiClient(rc) + .resolve("client::interceptors::disable_interceptor"), + "UserAgentInterceptor" to + AwsRuntimeType.awsRuntime(rc) + .resolve("user_agent::UserAgentInterceptor"), + ) + } + + tokioTest("should_emit_metric_in_user_agent_adaptive_mode") { + rustTemplate( + """ + let (http_client, rcvr) = #{capture_request}(#{None}); + let config = Config::builder() + .region(Region::new("us-east-1")) + .http_client(http_client.clone()) + .retry_config(RetryConfig::adaptive()) + .with_test_defaults() + .build(); + let client = Client::from_conf(config); + let _ = client.some_operation().send().await; + let expected_req = rcvr.expect_request(); + let user_agent = expected_req + .headers() + .get("x-amz-user-agent") + .unwrap(); + #{assert_ua_contains_metric_values}(user_agent, &["F"]); + """, + *preludeScope, + "assert_ua_contains_metric_values" to + AwsRuntimeType.awsRuntimeTestUtil(rc) + .resolve("user_agent::test_util::assert_ua_contains_metric_values"), + "capture_request" to RuntimeType.captureRequest(rc), + "disable_interceptor" to + RuntimeType.smithyRuntimeApiClient(rc) + .resolve("client::interceptors::disable_interceptor"), + "UserAgentInterceptor" to + AwsRuntimeType.awsRuntime(rc) + .resolve("user_agent::UserAgentInterceptor"), + ) + } + } + } + } + @Test fun `it emits business metric for checksum usage`() { val model = diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/RetryModeFeatureTrackerRuntimePluginCustomization.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/RetryModeFeatureTrackerRuntimePluginCustomization.kt new file mode 100644 index 0000000000..db02fba95d --- /dev/null +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/RetryModeFeatureTrackerRuntimePluginCustomization.kt @@ -0,0 +1,38 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.client.smithy.customizations + +import software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.client.smithy.generators.ServiceRuntimePluginCustomization +import software.amazon.smithy.rust.codegen.client.smithy.generators.ServiceRuntimePluginSection +import software.amazon.smithy.rust.codegen.core.rustlang.InlineDependency +import software.amazon.smithy.rust.codegen.core.rustlang.Writable +import software.amazon.smithy.rust.codegen.core.rustlang.rust +import software.amazon.smithy.rust.codegen.core.rustlang.writable +import software.amazon.smithy.rust.codegen.core.smithy.RuntimeType + +class RetryModeFeatureTrackerRuntimePluginCustomization(codegenContext: ClientCodegenContext) : + ServiceRuntimePluginCustomization() { + private val runtimeConfig = codegenContext.runtimeConfig + + override fun section(section: ServiceRuntimePluginSection): Writable = + writable { + when (section) { + is ServiceRuntimePluginSection.RegisterRuntimeComponents -> { + section.registerInterceptor(this) { + rust( + "#T::new()", + RuntimeType.forInlineDependency( + InlineDependency.sdkFeatureTracker(runtimeConfig), + ).resolve("retry_mode::RetryModeFeatureTrackerInterceptor"), + ) + } + } + + else -> emptySection + } + } +} diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RequiredCustomizations.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RequiredCustomizations.kt index a16f878002..3c11c75011 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RequiredCustomizations.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RequiredCustomizations.kt @@ -19,6 +19,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.customizations.Resilien import software.amazon.smithy.rust.codegen.client.smithy.customizations.RetryClassifierConfigCustomization import software.amazon.smithy.rust.codegen.client.smithy.customizations.RetryClassifierOperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customizations.RetryClassifierServiceRuntimePluginCustomization +import software.amazon.smithy.rust.codegen.client.smithy.customizations.RetryModeFeatureTrackerRuntimePluginCustomization import software.amazon.smithy.rust.codegen.client.smithy.customizations.TimeSourceCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.ServiceRuntimePluginCustomization @@ -134,5 +135,6 @@ class RequiredCustomizations : ClientCodegenDecorator { ): List = baseCustomizations + ConnectionPoisoningRuntimePluginCustomization(codegenContext) + - RetryClassifierServiceRuntimePluginCustomization(codegenContext) + RetryClassifierServiceRuntimePluginCustomization(codegenContext) + + RetryModeFeatureTrackerRuntimePluginCustomization(codegenContext) } diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index f1931480c9..62a445b1a2 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -295,7 +295,7 @@ dependencies = [ name = "aws-smithy-cbor" version = "0.60.8" dependencies = [ - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "criterion", "minicbor", ] @@ -305,7 +305,7 @@ name = "aws-smithy-checksums" version = "0.60.13" dependencies = [ "aws-smithy-http 0.60.11", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "bytes-utils", "crc32c", @@ -353,7 +353,7 @@ name = "aws-smithy-compression" version = "0.0.2" dependencies = [ "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "bytes-utils", "flate2", @@ -374,7 +374,7 @@ name = "aws-smithy-eventstream" version = "0.60.5" dependencies = [ "arbitrary", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "bytes-utils", "crc32fast", @@ -397,9 +397,9 @@ name = "aws-smithy-experimental" version = "0.1.5" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-runtime 1.7.4", + "aws-smithy-runtime 1.7.6", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "h2 0.4.7", "http 1.2.0", "hyper 1.5.1", @@ -420,7 +420,7 @@ dependencies = [ "async-stream", "aws-smithy-eventstream 0.60.5", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "bytes-utils", "futures-core", @@ -470,7 +470,7 @@ dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-json 0.61.1", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "aws-smithy-xml 0.60.9", "bytes", "futures-util", @@ -500,7 +500,7 @@ dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-http-server", "aws-smithy-json 0.61.1", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "aws-smithy-xml 0.60.9", "bytes", "futures", @@ -549,7 +549,7 @@ dependencies = [ name = "aws-smithy-json" version = "0.61.1" dependencies = [ - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "proptest", "serde_json", ] @@ -560,7 +560,7 @@ version = "0.2.1" dependencies = [ "aws-sdk-s3", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "tokio", ] @@ -604,7 +604,7 @@ dependencies = [ name = "aws-smithy-query" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "urlencoding", ] @@ -642,14 +642,14 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.4" +version = "1.7.6" dependencies = [ "approx", "aws-smithy-async 1.2.1", "aws-smithy-http 0.60.11", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "fastrand", "futures-util", @@ -680,7 +680,7 @@ name = "aws-smithy-runtime-api" version = "1.7.3" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "http 0.2.12", "http 1.2.0", @@ -736,7 +736,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.10" +version = "1.2.11" dependencies = [ "base64 0.13.1", "base64-simd", @@ -773,7 +773,7 @@ name = "aws-smithy-types-convert" version = "0.60.8" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "chrono", "futures-core", "time", @@ -785,7 +785,7 @@ version = "0.1.3" dependencies = [ "aws-smithy-http 0.60.11", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "bytes", "http 1.2.0", "tracing", @@ -1989,9 +1989,9 @@ dependencies = [ "aws-smithy-compression", "aws-smithy-http 0.60.11", "aws-smithy-json 0.61.1", - "aws-smithy-runtime 1.7.4", + "aws-smithy-runtime 1.7.6", "aws-smithy-runtime-api 1.7.3", - "aws-smithy-types 1.2.10", + "aws-smithy-types 1.2.11", "aws-smithy-xml 0.60.9", "bytes", "fastrand", diff --git a/rust-runtime/inlineable/src/sdk_feature_tracker.rs b/rust-runtime/inlineable/src/sdk_feature_tracker.rs index 710f4fcce5..acc653842b 100644 --- a/rust-runtime/inlineable/src/sdk_feature_tracker.rs +++ b/rust-runtime/inlineable/src/sdk_feature_tracker.rs @@ -177,18 +177,14 @@ pub(crate) mod waiter { pub(crate) mod retry_mode { use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature; use aws_smithy_runtime_api::box_error::BoxError; - use aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextMut; - use aws_smithy_runtime_api::client::interceptors::{Intercept, SharedInterceptor}; - use aws_smithy_runtime_api::client::runtime_components::{ - RuntimeComponents, RuntimeComponentsBuilder, - }; - use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin; + use aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef; + use aws_smithy_runtime_api::client::interceptors::Intercept; + use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; use aws_smithy_types::config_bag::ConfigBag; use aws_smithy_types::retry::{RetryConfig, RetryMode}; - use std::borrow::Cow; #[derive(Debug)] - struct RetryModeFeatureTrackerInterceptor; + pub(crate) struct RetryModeFeatureTrackerInterceptor; impl RetryModeFeatureTrackerInterceptor { pub(crate) fn new() -> Self { @@ -201,9 +197,9 @@ pub(crate) mod retry_mode { "RetryModeFeatureTrackerInterceptor" } - fn modify_before_serialization( + fn read_before_serialization( &self, - _context: &mut BeforeSerializationInterceptorContextMut<'_>, + _context: &BeforeSerializationInterceptorContextRef<'_>, _runtime_components: &RuntimeComponents, cfg: &mut ConfigBag, ) -> Result<(), BoxError> { @@ -221,31 +217,4 @@ pub(crate) mod retry_mode { Ok(()) } } - - #[derive(Debug)] - pub(crate) struct RetryModeFeatureTrackerRuntimePlugin { - runtime_components: RuntimeComponentsBuilder, - } - - impl RetryModeFeatureTrackerRuntimePlugin { - pub(crate) fn new() -> Self { - Self { - runtime_components: RuntimeComponentsBuilder::new( - "RetryModeFeatureTrackerRuntimePlugin", - ) - .with_interceptor(SharedInterceptor::new( - RetryModeFeatureTrackerInterceptor::new(), - )), - } - } - } - - impl RuntimePlugin for RetryModeFeatureTrackerRuntimePlugin { - fn runtime_components( - &self, - _: &RuntimeComponentsBuilder, - ) -> Cow<'_, RuntimeComponentsBuilder> { - Cow::Borrowed(&self.runtime_components) - } - } } From 27c5401e99b0b4325e233f152a578e039d910b3b Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Tue, 17 Dec 2024 11:02:20 -0600 Subject: [PATCH 3/5] bump version of aws-runtime --- aws/rust-runtime/aws-runtime/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/rust-runtime/aws-runtime/Cargo.toml b/aws/rust-runtime/aws-runtime/Cargo.toml index a9117d34f9..f9ac90dcf8 100644 --- a/aws/rust-runtime/aws-runtime/Cargo.toml +++ b/aws/rust-runtime/aws-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-runtime" -version = "1.5.1" +version = "1.5.2" authors = ["AWS Rust SDK Team "] description = "Runtime support code for the AWS SDK. This crate isn't intended to be used directly." edition = "2021" From 324f9dc53300fc476c392aac6a1c676497915667 Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Tue, 17 Dec 2024 14:39:11 -0600 Subject: [PATCH 4/5] remove checksum metric tracking --- .../src/http_request_checksum.rs | 16 - .../smithy/rustsdk/UserAgentDecoratorTest.kt | 281 ------------------ 2 files changed, 297 deletions(-) diff --git a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs index b187d9703c..b079edc12b 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs @@ -131,22 +131,6 @@ where cfg: &mut ConfigBag, ) -> Result<(), BoxError> { let checksum_algorithm = (self.algorithm_provider)(context.input())?; - if let Some(checksum_algorithm) = checksum_algorithm { - let feature = match checksum_algorithm { - ChecksumAlgorithm::Crc32 => Some(SmithySdkFeature::FlexibleChecksumsReqCrc32), - ChecksumAlgorithm::Crc32c => Some(SmithySdkFeature::FlexibleChecksumsReqCrc32c), - // TODO(flexible checksums v2) add CRC64 to this list - ChecksumAlgorithm::Sha1 => Some(SmithySdkFeature::FlexibleChecksumsReqSha1), - ChecksumAlgorithm::Sha256 => Some(SmithySdkFeature::FlexibleChecksumsReqSha256), - _ => { - tracing::warn!("can't insert business metric for unknown checksum algorithm."); - None - } - }; - if let Some(feature) = feature { - cfg.interceptor_state().store_append(feature); - } - } let mut layer = Layer::new("RequestChecksumInterceptor"); layer.store_put(RequestChecksumInterceptorState { checksum_algorithm }); diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt index aa6c4f881c..78c93af19e 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/UserAgentDecoratorTest.kt @@ -328,285 +328,4 @@ class UserAgentDecoratorTest { } } } - - @Test - fun `it emits business metric for checksum usage`() { - val model = - """ - namespace test - - use aws.api#service - use aws.auth#sigv4 - use aws.protocols#httpChecksum - use aws.protocols#restJson1 - use smithy.rules#endpointRuleSet - - @service(sdkId: "dontcare") - @restJson1 - @sigv4(name: "dontcare") - @auth([sigv4]) - @endpointRuleSet({ - "version": "1.0", - "rules": [{ "type": "endpoint", "conditions": [], "endpoint": { "url": "https://example.com" } }], - "parameters": { - "Region": { "required": false, "type": "String", "builtIn": "AWS::Region" }, - } - }) - service TestService { - version: "2023-01-01", - operations: [HttpChecksumOperation, HttpChecksumStreamingOperation] - } - - @http(uri: "/HttpChecksumOperation", method: "POST") - @optionalAuth - @httpChecksum( - requestChecksumRequired: true, - requestAlgorithmMember: "checksumAlgorithm", - requestValidationModeMember: "validationMode", - responseAlgorithms: ["CRC32", "CRC32C", "CRC64NVME", "SHA1", "SHA256"] - ) - operation HttpChecksumOperation { - input: SomeInput, - output: SomeOutput - } - - @input - structure SomeInput { - @httpHeader("x-amz-request-algorithm") - checksumAlgorithm: ChecksumAlgorithm - - @httpHeader("x-amz-response-validation-mode") - validationMode: ValidationMode - - @httpHeader("x-amz-checksum-crc32") - ChecksumCRC32: String - - @httpHeader("x-amz-checksum-crc32c") - ChecksumCRC32C: String - - @httpHeader("x-amz-checksum-crc64nvme") - ChecksumCRC64Nvme: String - - @httpHeader("x-amz-checksum-sha1") - ChecksumSHA1: String - - @httpHeader("x-amz-checksum-sha256") - ChecksumSHA256: String - - @httpPayload - @required - body: Blob - } - - @output - structure SomeOutput {} - - @http(uri: "/HttpChecksumStreamingOperation", method: "POST") - @optionalAuth - @httpChecksum( - requestChecksumRequired: true, - requestAlgorithmMember: "checksumAlgorithm", - requestValidationModeMember: "validationMode", - responseAlgorithms: ["CRC32", "CRC32C", "CRC64NVME", "SHA1", "SHA256"] - ) - operation HttpChecksumStreamingOperation { - input: SomeStreamingInput, - output: SomeStreamingOutput - } - - @streaming - blob StreamingBlob - - @input - structure SomeStreamingInput { - @httpHeader("x-amz-request-algorithm") - checksumAlgorithm: ChecksumAlgorithm - - @httpHeader("x-amz-response-validation-mode") - validationMode: ValidationMode - - @httpPayload - @required - body: StreamingBlob - } - - @output - structure SomeStreamingOutput {} - - enum ChecksumAlgorithm { - CRC32 - CRC32C - CRC64NVME - SHA1 - SHA256 - } - - enum ValidationMode { - ENABLED - } - """.asSmithyModel(smithyVersion = "2.0") - - awsSdkIntegrationTest(model) { ctx, rustCrate -> - rustCrate.integrationTest("business_metrics_for_checksums") { - val moduleName = ctx.moduleUseName() - val rc = ctx.runtimeConfig - rust( - """ - use $moduleName::config::Region; - use $moduleName::types::ChecksumAlgorithm; - use $moduleName::primitives::Blob; - use $moduleName::{Client, Config}; - """, - ) - - tokioTest("should_emit_metric_in_user_agent_for_crc32") { - rustTemplate( - """ - let (http_client, rcvr) = #{capture_request}(#{None}); - let config = Config::builder() - .region(Region::new("us-east-1")) - .http_client(http_client.clone()) - .with_test_defaults() - .build(); - let client = Client::from_conf(config); - let _ = client - .http_checksum_operation() - .checksum_algorithm(ChecksumAlgorithm::Crc32) - .body(Blob::new(b"Hello, world!")) - .send() - .await; - let expected_req = rcvr.expect_request(); - let user_agent = expected_req - .headers() - .get("x-amz-user-agent") - .unwrap(); - #{assert_ua_contains_metric_values}(user_agent, &["U"]); - """, - *preludeScope, - "assert_ua_contains_metric_values" to - AwsRuntimeType.awsRuntimeTestUtil(rc) - .resolve("user_agent::test_util::assert_ua_contains_metric_values"), - "capture_request" to RuntimeType.captureRequest(rc), - "disable_interceptor" to - RuntimeType.smithyRuntimeApiClient(rc) - .resolve("client::interceptors::disable_interceptor"), - "UserAgentInterceptor" to - AwsRuntimeType.awsRuntime(rc) - .resolve("user_agent::UserAgentInterceptor"), - ) - } - - tokioTest("should_emit_metric_in_user_agent_for_crc32c") { - rustTemplate( - """ - let (http_client, rcvr) = #{capture_request}(#{None}); - let config = Config::builder() - .region(Region::new("us-east-1")) - .http_client(http_client.clone()) - .with_test_defaults() - .build(); - let client = Client::from_conf(config); - let _ = client - .http_checksum_operation() - .checksum_algorithm(ChecksumAlgorithm::Crc32C) - .body(Blob::new(b"Hello, world!")) - .send() - .await; - let expected_req = rcvr.expect_request(); - let user_agent = expected_req - .headers() - .get("x-amz-user-agent") - .unwrap(); - #{assert_ua_contains_metric_values}(user_agent, &["V"]); - """, - *preludeScope, - "assert_ua_contains_metric_values" to - AwsRuntimeType.awsRuntimeTestUtil(rc) - .resolve("user_agent::test_util::assert_ua_contains_metric_values"), - "capture_request" to RuntimeType.captureRequest(rc), - "disable_interceptor" to - RuntimeType.smithyRuntimeApiClient(rc) - .resolve("client::interceptors::disable_interceptor"), - "UserAgentInterceptor" to - AwsRuntimeType.awsRuntime(rc) - .resolve("user_agent::UserAgentInterceptor"), - ) - } - - tokioTest("should_emit_metric_in_user_agent_for_sha1") { - rustTemplate( - """ - let (http_client, rcvr) = #{capture_request}(#{None}); - let config = Config::builder() - .region(Region::new("us-east-1")) - .http_client(http_client.clone()) - .with_test_defaults() - .build(); - let client = Client::from_conf(config); - let _ = client - .http_checksum_operation() - .checksum_algorithm(ChecksumAlgorithm::Sha1) - .body(Blob::new(b"Hello, world!")) - .send() - .await; - let expected_req = rcvr.expect_request(); - let user_agent = expected_req - .headers() - .get("x-amz-user-agent") - .unwrap(); - #{assert_ua_contains_metric_values}(user_agent, &["X"]); - """, - *preludeScope, - "assert_ua_contains_metric_values" to - AwsRuntimeType.awsRuntimeTestUtil(rc) - .resolve("user_agent::test_util::assert_ua_contains_metric_values"), - "capture_request" to RuntimeType.captureRequest(rc), - "disable_interceptor" to - RuntimeType.smithyRuntimeApiClient(rc) - .resolve("client::interceptors::disable_interceptor"), - "UserAgentInterceptor" to - AwsRuntimeType.awsRuntime(rc) - .resolve("user_agent::UserAgentInterceptor"), - ) - } - - tokioTest("should_emit_metric_in_user_agent_for_sha256") { - rustTemplate( - """ - let (http_client, rcvr) = #{capture_request}(#{None}); - let config = Config::builder() - .region(Region::new("us-east-1")) - .http_client(http_client.clone()) - .with_test_defaults() - .build(); - let client = Client::from_conf(config); - let _ = client - .http_checksum_operation() - .checksum_algorithm(ChecksumAlgorithm::Sha256) - .body(Blob::new(b"Hello, world!")) - .send() - .await; - let expected_req = rcvr.expect_request(); - let user_agent = expected_req - .headers() - .get("x-amz-user-agent") - .unwrap(); - #{assert_ua_contains_metric_values}(user_agent, &["Y"]); - """, - *preludeScope, - "assert_ua_contains_metric_values" to - AwsRuntimeType.awsRuntimeTestUtil(rc) - .resolve("user_agent::test_util::assert_ua_contains_metric_values"), - "capture_request" to RuntimeType.captureRequest(rc), - "disable_interceptor" to - RuntimeType.smithyRuntimeApiClient(rc) - .resolve("client::interceptors::disable_interceptor"), - "UserAgentInterceptor" to - AwsRuntimeType.awsRuntime(rc) - .resolve("user_agent::UserAgentInterceptor"), - ) - } - } - } - } } From 47e951bb903d5167f87df4e2e1eb4fad9e838dbe Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Wed, 18 Dec 2024 09:33:55 -0600 Subject: [PATCH 5/5] remove leftover import --- aws/rust-runtime/Cargo.lock | 8 ++--- aws/rust-runtime/aws-config/Cargo.lock | 4 +-- .../src/http_request_checksum.rs | 1 - rust-runtime/Cargo.lock | 30 +++++++++---------- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/aws/rust-runtime/Cargo.lock b/aws/rust-runtime/Cargo.lock index 5841caf232..0eaa3e5a74 100644 --- a/aws/rust-runtime/Cargo.lock +++ b/aws/rust-runtime/Cargo.lock @@ -138,7 +138,7 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.1" +version = "1.5.2" dependencies = [ "arbitrary", "aws-credential-types", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.2" +version = "1.2.3" dependencies = [ "futures-util", "pin-project-lite", @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.5" +version = "1.7.6" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.10" +version = "1.2.11" dependencies = [ "base64-simd", "bytes", diff --git a/aws/rust-runtime/aws-config/Cargo.lock b/aws/rust-runtime/aws-config/Cargo.lock index f31a921e10..2723f5bc73 100644 --- a/aws/rust-runtime/aws-config/Cargo.lock +++ b/aws/rust-runtime/aws-config/Cargo.lock @@ -89,7 +89,7 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.1" +version = "1.5.0" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -195,7 +195,7 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.2" +version = "1.2.1" dependencies = [ "futures-util", "pin-project-lite", diff --git a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs index b079edc12b..689edcc556 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs @@ -12,7 +12,6 @@ use aws_runtime::content_encoding::header_value::AWS_CHUNKED; use aws_runtime::content_encoding::{AwsChunkedBody, AwsChunkedBodyOptions}; use aws_smithy_checksums::ChecksumAlgorithm; use aws_smithy_checksums::{body::calculate, http::HttpChecksum}; -use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature; use aws_smithy_runtime_api::box_error::BoxError; use aws_smithy_runtime_api::client::interceptors::context::{ BeforeSerializationInterceptorContextRef, BeforeTransmitInterceptorContextMut, Input, diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index 62a445b1a2..abcb4268ca 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -132,7 +132,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" dependencies = [ - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-async 1.2.1", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-types 1.2.9", "zeroize", @@ -188,7 +188,7 @@ checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" dependencies = [ "aws-credential-types", "aws-sigv4", - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime 1.7.3", @@ -215,7 +215,7 @@ dependencies = [ "aws-credential-types", "aws-runtime", "aws-sigv4", - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-async 1.2.1", "aws-smithy-checksums 0.60.13 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-eventstream 0.60.5 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -272,23 +272,23 @@ dependencies = [ [[package]] name = "aws-smithy-async" version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" dependencies = [ "futures-util", "pin-project-lite", - "pin-utils", "tokio", - "tokio-test", ] [[package]] name = "aws-smithy-async" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +version = "1.2.3" dependencies = [ "futures-util", "pin-project-lite", + "pin-utils", "tokio", + "tokio-test", ] [[package]] @@ -396,7 +396,7 @@ dependencies = [ name = "aws-smithy-experimental" version = "0.1.5" dependencies = [ - "aws-smithy-async 1.2.1", + "aws-smithy-async 1.2.3", "aws-smithy-runtime 1.7.6", "aws-smithy-runtime-api 1.7.3", "aws-smithy-types 1.2.11", @@ -614,7 +614,7 @@ version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be28bd063fa91fd871d131fc8b68d7cd4c5fa0869bea68daca50dcb1cbd76be2" dependencies = [ - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-async 1.2.1", "aws-smithy-http 0.60.11 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-protocol-test 0.63.0 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -645,7 +645,7 @@ name = "aws-smithy-runtime" version = "1.7.6" dependencies = [ "approx", - "aws-smithy-async 1.2.1", + "aws-smithy-async 1.2.3", "aws-smithy-http 0.60.11", "aws-smithy-protocol-test 0.63.0", "aws-smithy-runtime-api 1.7.3", @@ -679,7 +679,7 @@ dependencies = [ name = "aws-smithy-runtime-api" version = "1.7.3" dependencies = [ - "aws-smithy-async 1.2.1", + "aws-smithy-async 1.2.3", "aws-smithy-types 1.2.11", "bytes", "http 0.2.12", @@ -697,7 +697,7 @@ version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" dependencies = [ - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-async 1.2.1", "aws-smithy-types 1.2.9", "bytes", "http 0.2.12", @@ -772,7 +772,7 @@ dependencies = [ name = "aws-smithy-types-convert" version = "0.60.8" dependencies = [ - "aws-smithy-async 1.2.1", + "aws-smithy-async 1.2.3", "aws-smithy-types 1.2.11", "chrono", "futures-core", @@ -818,7 +818,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" dependencies = [ "aws-credential-types", - "aws-smithy-async 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aws-smithy-async 1.2.1", "aws-smithy-runtime-api 1.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "aws-smithy-types 1.2.9", "rustc_version",