Skip to content

Commit 855a457

Browse files
Merge smithy-rs-release-1.x.y into main (#4123)
2 parents 84f5464 + 2918b16 commit 855a457

File tree

5 files changed

+106
-111
lines changed

5 files changed

+106
-111
lines changed

.changelog/1745330307.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

.changelog/1746737221.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changelog/1746741193.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,62 @@
11
<!-- Do not manually edit this file. Use the `changelogger` tool. -->
2+
May 9th, 2025
3+
=============
4+
**Breaking Changes:**
5+
- :warning: (all, [smithy-rs#4120](https://github.com/smithy-lang/smithy-rs/issues/4120)) Update MSRV to 1.82.0
6+
7+
**New this release:**
8+
- :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
9+
generated SDK clients. This release includes several fixes as well as a new sequence builder API that can be
10+
used to test more complex scenarios such as retries.
11+
12+
```rust
13+
use aws_sdk_s3::operation::get_object::GetObjectOutput;
14+
use aws_sdk_s3::config::retry::RetryConfig;
15+
use aws_smithy_types::byte_stream::ByteStream;
16+
use aws_smithy_mocks::{mock, mock_client, RuleMode};
17+
18+
#[tokio::test]
19+
async fn test_retry_behavior() {
20+
// Create a rule that returns 503 twice, then succeeds
21+
let retry_rule = mock!(aws_sdk_s3::Client::get_object)
22+
.sequence()
23+
.http_status(503, None)
24+
.times(2) // Return 503 HTTP status twice
25+
.output(|| GetObjectOutput::builder() // Finally return a successful output
26+
.body(ByteStream::from_static(b"success"))
27+
.build())
28+
.build();
29+
30+
// Create a mocked client with the rule
31+
let s3 = mock_client!(
32+
aws_sdk_s3,
33+
RuleMode::Sequential,
34+
[&retry_rule],
35+
|client_builder| {
36+
client_builder.retry_config(RetryConfig::standard().with_max_attempts(3))
37+
}
38+
);
39+
40+
// This should succeed after two retries
41+
let result = s3
42+
.get_object()
43+
.bucket("test-bucket")
44+
.key("test-key")
45+
.send()
46+
.await
47+
.expect("success after retries");
48+
49+
// Verify the response
50+
let data = result.body.collect().await.expect("successful read").to_vec();
51+
assert_eq!(data, b"success");
52+
53+
// Verify all responses were used
54+
assert_eq!(retry_rule.num_calls(), 3);
55+
}
56+
```
57+
- :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.
58+
59+
260
May 2nd, 2025
361
=============
462

aws/SDK_CHANGELOG.next.json

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,6 @@
55
{
66
"smithy-rs": [],
77
"aws-sdk-rust": [
8-
{
9-
"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",
10-
"meta": {
11-
"bug": false,
12-
"breaking": false,
13-
"tada": false
14-
},
15-
"author": "aajtodd",
16-
"references": [
17-
"aws-sdk-rust#977",
18-
"smithy-rs#1925",
19-
"smithy-rs#3710"
20-
],
21-
"since-commit": "bdec1a232a5dfdba16bafd1f637c99a920a30734",
22-
"age": 5
23-
},
248
{
259
"message": "Update spans to better align with spec.\n",
2610
"meta": {
@@ -33,7 +17,7 @@
3317
"smithy-rs#4052"
3418
],
3519
"since-commit": "7558d31f17b69bce8785ffa833c575d0b172209c",
36-
"age": 4
20+
"age": 5
3721
},
3822
{
3923
"message": "Replace the `once_cell` crate with the `std` counterpart in AWS runtime crates.\n",
@@ -47,7 +31,7 @@
4731
"smithy-rs#4050"
4832
],
4933
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
50-
"age": 2
34+
"age": 3
5135
},
5236
{
5337
"message": "Fix an issue where a custom `Content-Encoding` header was incorrectly overwritten by the `aws-chunked` header value.\n",
@@ -61,7 +45,7 @@
6145
"aws-sdk-rust#1281"
6246
],
6347
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
64-
"age": 2
48+
"age": 3
6549
},
6650
{
6751
"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 @@
7559
"smithy-rs#3776"
7660
],
7761
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
78-
"age": 2
62+
"age": 3
7963
},
8064
{
8165
"message": "Fix service specific endpoint url keys\n",
@@ -89,7 +73,50 @@
8973
"aws-sdk-rust#1252"
9074
],
9175
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
92-
"age": 2
76+
"age": 3
77+
},
78+
{
79+
"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",
80+
"meta": {
81+
"bug": true,
82+
"breaking": false,
83+
"tada": false
84+
},
85+
"author": "ysaito1001",
86+
"references": [
87+
"smithy-rs#4117"
88+
],
89+
"since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
90+
"age": 1
91+
},
92+
{
93+
"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",
94+
"meta": {
95+
"bug": true,
96+
"breaking": false,
97+
"tada": true
98+
},
99+
"author": "aajtodd",
100+
"references": [
101+
"smithy-rs#4074",
102+
"smithy-rs#3926"
103+
],
104+
"since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
105+
"age": 1
106+
},
107+
{
108+
"message": "Update MSRV to 1.82.0\n",
109+
"meta": {
110+
"bug": false,
111+
"breaking": true,
112+
"tada": false
113+
},
114+
"author": "ysaito1001",
115+
"references": [
116+
"smithy-rs#4120"
117+
],
118+
"since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
119+
"age": 1
93120
}
94121
],
95122
"aws-sdk-model": []

0 commit comments

Comments
 (0)