Unverified Commit 6b96c1d4 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Make `customize()` sync and infallible (#3039)

This PR addresses a TODO comment to make `customize()` sync and
fallible.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 08196ec8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -291,3 +291,9 @@ message = "`SdkError` is no longer re-exported in generated server crates."
references = ["smithy-rs#3038"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "server" }
author = "jdisanti"

[[smithy-rs]]
message = "The `customize()` method is now sync and infallible. Remove any `await`s and error handling from it to make things compile again."
references = ["smithy-rs#3039"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "client" }
author = "jdisanti"
+0 −2
Original line number Diff line number Diff line
@@ -156,8 +156,6 @@ internal class CredentialCacheConfigTest {
                        let _ = client
                            .say_hello()
                            .customize()
                            .await
                            .unwrap()
                            .config_override(operation_config_override)
                            .send()
                            .await
+0 −4
Original line number Diff line number Diff line
@@ -73,8 +73,6 @@ async fn generate_random() {
        .generate_random()
        .number_of_bytes(64)
        .customize()
        .await
        .expect("customizable")
        .mutate_request(|req| {
            // Remove the invocation ID since the signed request above doesn't have it
            req.headers_mut().remove("amz-sdk-invocation-id");
@@ -157,8 +155,6 @@ async fn generate_random_keystore_not_found() {
        .number_of_bytes(64)
        .custom_key_store_id("does not exist")
        .customize()
        .await
        .expect("customizable")
        .request_time_for_tests(UNIX_EPOCH + Duration::from_secs(1614955644))
        .user_agent_for_tests()
        .send()
+0 −2
Original line number Diff line number Diff line
@@ -45,8 +45,6 @@ async fn signv4_use_correct_service_name() {
                .unwrap(),
        )
        .customize()
        .await
        .expect("should be customizable")
        // Fix the request time and user agent so the headers are stable
        .request_time_for_tests(UNIX_EPOCH + Duration::from_secs(1614952162))
        .user_agent_for_tests()
+0 −4
Original line number Diff line number Diff line
@@ -74,8 +74,6 @@ async fn test_checksum_on_streaming_response(
        .key("test.txt")
        .checksum_mode(aws_sdk_s3::types::ChecksumMode::Enabled)
        .customize()
        .await
        .unwrap()
        .user_agent_for_tests()
        .send()
        .await
@@ -181,8 +179,6 @@ async fn test_checksum_on_streaming_request<'a>(
        .body(body)
        .checksum_algorithm(checksum_algorithm)
        .customize()
        .await
        .unwrap()
        .request_time_for_tests(UNIX_EPOCH + Duration::from_secs(1624036048))
        .user_agent_for_tests()
        .send()
Loading