Unverified Commit 855a457a authored by AWS SDK Rust Bot's avatar AWS SDK Rust Bot Committed by GitHub
Browse files

Merge smithy-rs-release-1.x.y into main (#4123)

parents 84f5464a 2918b160
Loading
Loading
Loading
Loading

.changelog/1745330307.md

deleted100644 → 0
+0 −62
Original line number Diff line number Diff line
---
applies_to:
- client
- aws-sdk-rust
authors:
- aajtodd
references:
  - smithy-rs#4074
  - smithy-rs#3926
breaking: false
new_feature: true
bug_fix: true
---
Promote `aws-smithy-mocks-experimental` to `aws-smithy-mocks`. This crate is now a recommended tool for testing
generated SDK clients. This release includes several fixes as well as a new sequence builder API that can be
used to test more complex scenarios such as retries.

```rust
use aws_sdk_s3::operation::get_object::GetObjectOutput;
use aws_sdk_s3::config::retry::RetryConfig;
use aws_smithy_types::byte_stream::ByteStream;
use aws_smithy_mocks::{mock, mock_client, RuleMode};

#[tokio::test]
async fn test_retry_behavior() {
    // Create a rule that returns 503 twice, then succeeds
    let retry_rule = mock!(aws_sdk_s3::Client::get_object)
        .sequence()
        .http_status(503, None)
        .times(2)                                            // Return 503 HTTP status twice
        .output(|| GetObjectOutput::builder()                // Finally return a successful output
            .body(ByteStream::from_static(b"success"))
            .build())
        .build();

    // Create a mocked client with the rule
    let s3 = mock_client!(
        aws_sdk_s3,
        RuleMode::Sequential,
        [&retry_rule],
        |client_builder| {
            client_builder.retry_config(RetryConfig::standard().with_max_attempts(3))
        }
    );

    // This should succeed after two retries
    let result = s3
        .get_object()
        .bucket("test-bucket")
        .key("test-key")
        .send()
        .await
        .expect("success after retries");

    // Verify the response
    let data = result.body.collect().await.expect("successful read").to_vec();
    assert_eq!(data, b"success");

    // Verify all responses were used
    assert_eq!(retry_rule.num_calls(), 3);
}
```

.changelog/1746737221.md

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
---
applies_to:
- client
- server
- aws-sdk-rust
authors:
- ysaito1001
references:
- smithy-rs#4117
breaking: false
new_feature: false
bug_fix: true
---
Fix a bug where fields that were initially annotated with the `required` trait and later updated to use the `addedDefault` trait were not serialized when their values matched the default, even when the values were explicitly set. With this fix, fields with `addedDefault` are now always serialized.

.changelog/1746741193.md

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
---
applies_to:
- client
- server
- aws-sdk-rust
authors:
- ysaito1001
references:
- smithy-rs#4120
breaking: true
new_feature: false
bug_fix: false
---
Update MSRV to 1.82.0
+58 −0
Original line number Diff line number Diff line
<!-- Do not manually edit this file. Use the `changelogger` tool. -->
May 9th, 2025
=============
**Breaking Changes:**
- :warning: (all, [smithy-rs#4120](https://github.com/smithy-lang/smithy-rs/issues/4120)) Update MSRV to 1.82.0

**New this release:**
- :bug::tada: (client, [smithy-rs#4074](https://github.com/smithy-lang/smithy-rs/issues/4074), [smithy-rs#3926](https://github.com/smithy-lang/smithy-rs/issues/3926)) Promote `aws-smithy-mocks-experimental` to `aws-smithy-mocks`. This crate is now a recommended tool for testing
    generated SDK clients. This release includes several fixes as well as a new sequence builder API that can be
    used to test more complex scenarios such as retries.

    ```rust
    use aws_sdk_s3::operation::get_object::GetObjectOutput;
    use aws_sdk_s3::config::retry::RetryConfig;
    use aws_smithy_types::byte_stream::ByteStream;
    use aws_smithy_mocks::{mock, mock_client, RuleMode};

    #[tokio::test]
    async fn test_retry_behavior() {
        // Create a rule that returns 503 twice, then succeeds
        let retry_rule = mock!(aws_sdk_s3::Client::get_object)
            .sequence()
            .http_status(503, None)
            .times(2)                                            // Return 503 HTTP status twice
            .output(|| GetObjectOutput::builder()                // Finally return a successful output
                .body(ByteStream::from_static(b"success"))
                .build())
            .build();

        // Create a mocked client with the rule
        let s3 = mock_client!(
            aws_sdk_s3,
            RuleMode::Sequential,
            [&retry_rule],
            |client_builder| {
                client_builder.retry_config(RetryConfig::standard().with_max_attempts(3))
            }
        );

        // This should succeed after two retries
        let result = s3
            .get_object()
            .bucket("test-bucket")
            .key("test-key")
            .send()
            .await
            .expect("success after retries");

        // Verify the response
        let data = result.body.collect().await.expect("successful read").to_vec();
        assert_eq!(data, b"success");

        // Verify all responses were used
        assert_eq!(retry_rule.num_calls(), 3);
    }
    ```
- :bug: (all, [smithy-rs#4117](https://github.com/smithy-lang/smithy-rs/issues/4117)) Fix a bug where fields that were initially annotated with the `required` trait and later updated to use the `addedDefault` trait were not serialized when their values matched the default, even when the values were explicitly set. With this fix, fields with `addedDefault` are now always serialized.


May 2nd, 2025
=============

+48 −21
Original line number Diff line number Diff line
@@ -5,22 +5,6 @@
{
  "smithy-rs": [],
  "aws-sdk-rust": [
    {
      "message": "Updates the default HTTP client to be based on the 1.x version of hyper and updates the default TLS provider to [rustls](https://github.com/rustls/rustls) with [aws-lc](https://github.com/aws/aws-lc-rs). For more information see the GitHub [discussion](https://github.com/awslabs/aws-sdk-rust/discussions/1257).\n",
      "meta": {
        "bug": false,
        "breaking": false,
        "tada": false
      },
      "author": "aajtodd",
      "references": [
        "aws-sdk-rust#977",
        "smithy-rs#1925",
        "smithy-rs#3710"
      ],
      "since-commit": "bdec1a232a5dfdba16bafd1f637c99a920a30734",
      "age": 5
    },
    {
      "message": "Update spans to better align with spec.\n",
      "meta": {
@@ -33,7 +17,7 @@
        "smithy-rs#4052"
      ],
      "since-commit": "7558d31f17b69bce8785ffa833c575d0b172209c",
      "age": 4
      "age": 5
    },
    {
      "message": "Replace the `once_cell` crate with the `std` counterpart in AWS runtime crates.\n",
@@ -47,7 +31,7 @@
        "smithy-rs#4050"
      ],
      "since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
      "age": 2
      "age": 3
    },
    {
      "message": "Fix an issue where a custom `Content-Encoding` header was incorrectly overwritten by the `aws-chunked` header value.\n",
@@ -61,7 +45,7 @@
        "aws-sdk-rust#1281"
      ],
      "since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
      "age": 2
      "age": 3
    },
    {
      "message": "Add support for the account-based endpoints in AWS SDKs. For more details, please refer to the [AWS SDKs and Tools Reference Guide on Account-Based Endpoints](https://docs.aws.amazon.com/sdkref/latest/guide/feature-account-endpoints.html).\n",
@@ -75,7 +59,7 @@
        "smithy-rs#3776"
      ],
      "since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
      "age": 2
      "age": 3
    },
    {
      "message": "Fix service specific endpoint url keys\n",
@@ -89,7 +73,50 @@
        "aws-sdk-rust#1252"
      ],
      "since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
      "age": 2
      "age": 3
    },
    {
      "message": "Fix a bug where fields that were initially annotated with the `required` trait and later updated to use the `addedDefault` trait were not serialized when their values matched the default, even when the values were explicitly set. With this fix, fields with `addedDefault` are now always serialized.\n",
      "meta": {
        "bug": true,
        "breaking": false,
        "tada": false
      },
      "author": "ysaito1001",
      "references": [
        "smithy-rs#4117"
      ],
      "since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
      "age": 1
    },
    {
      "message": "Promote `aws-smithy-mocks-experimental` to `aws-smithy-mocks`. This crate is now a recommended tool for testing\ngenerated SDK clients. This release includes several fixes as well as a new sequence builder API that can be\nused to test more complex scenarios such as retries.\n\n```rust\nuse aws_sdk_s3::operation::get_object::GetObjectOutput;\nuse aws_sdk_s3::config::retry::RetryConfig;\nuse aws_smithy_types::byte_stream::ByteStream;\nuse aws_smithy_mocks::{mock, mock_client, RuleMode};\n\n#[tokio::test]\nasync fn test_retry_behavior() {\n    // Create a rule that returns 503 twice, then succeeds\n    let retry_rule = mock!(aws_sdk_s3::Client::get_object)\n        .sequence()\n        .http_status(503, None)\n        .times(2)                                            // Return 503 HTTP status twice\n        .output(|| GetObjectOutput::builder()                // Finally return a successful output\n            .body(ByteStream::from_static(b\"success\"))\n            .build())\n        .build();\n\n    // Create a mocked client with the rule\n    let s3 = mock_client!(\n        aws_sdk_s3,\n        RuleMode::Sequential,\n        [&retry_rule],\n        |client_builder| {\n            client_builder.retry_config(RetryConfig::standard().with_max_attempts(3))\n        }\n    );\n\n    // This should succeed after two retries\n    let result = s3\n        .get_object()\n        .bucket(\"test-bucket\")\n        .key(\"test-key\")\n        .send()\n        .await\n        .expect(\"success after retries\");\n\n    // Verify the response\n    let data = result.body.collect().await.expect(\"successful read\").to_vec();\n    assert_eq!(data, b\"success\");\n\n    // Verify all responses were used\n    assert_eq!(retry_rule.num_calls(), 3);\n}\n```\n",
      "meta": {
        "bug": true,
        "breaking": false,
        "tada": true
      },
      "author": "aajtodd",
      "references": [
        "smithy-rs#4074",
        "smithy-rs#3926"
      ],
      "since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
      "age": 1
    },
    {
      "message": "Update MSRV to 1.82.0\n",
      "meta": {
        "bug": false,
        "breaking": true,
        "tada": false
      },
      "author": "ysaito1001",
      "references": [
        "smithy-rs#4120"
      ],
      "since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
      "age": 1
    }
  ],
  "aws-sdk-model": []