Skip to content

Commit dfb5149

Browse files
authored
Merge branch 'main' into fahadzub/clippy-warn
2 parents ff0b532 + 554cf30 commit dfb5149

File tree

25 files changed

+1242
-473
lines changed

25 files changed

+1242
-473
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,46 @@
11
<!-- Do not manually edit this file. Use the `changelogger` tool. -->
2+
May 19th, 2025
3+
==============
4+
**New this release:**
5+
- :tada: (client, [smithy-rs#4135](https://github.com/smithy-lang/smithy-rs/issues/4135)) Introduce a new `repeatedly()` function to `aws-smithy-mocks` sequence builder to build mock rules that behave as an
6+
infinite sequence.
7+
8+
```rust
9+
let rule = mock!(aws_sdk_s3::Client::get_object)
10+
.sequence()
11+
.http_status(503, None)
12+
.times(2) // repeat the last output twice before moving onto the next response in the sequence
13+
.output(|| GetObjectOutput::builder()
14+
.body(ByteStream::from_static(b"success"))
15+
.build()
16+
)
17+
.repeatedly() // repeat the last output forever
18+
.build();
19+
```
20+
- :bug: (client, [aws-sdk-rust#1291](https://github.com/awslabs/aws-sdk-rust/issues/1291)) Removing the `optimize_crc32_auto` feature flag from the `crc-fast` dependency of the `aws-smithy-checksums` crate since it was causing build issues for some customers.
21+
- :bug: (client, [smithy-rs#4137](https://github.com/smithy-lang/smithy-rs/issues/4137)) Fix bug with enum codegen
22+
23+
When the first enum generated has the `@sensitive` trait the opaque type
24+
underlying the `UnknownVariant` inherits that sensitivity. This means that
25+
it does not derive `Debug`. Since the module is only generated once this
26+
causes a problem for non-sensitive enums that rely on the type deriving
27+
`Debug` so that they can also derive `Debug`. We manually add `Debug` to
28+
the module so it will always be there since the `UnknownVariant` is not
29+
modeled and cannot be `@sensitive`.
30+
- :bug: (client, [smithy-rs#4135](https://github.com/smithy-lang/smithy-rs/issues/4135)) fix simple rules behavior with `RuleMode::MatchAny`
31+
32+
33+
May 15th, 2025
34+
==============
35+
**New this release:**
36+
- :bug: (all, [smithy-rs#4132](https://github.com/smithy-lang/smithy-rs/issues/4132)) Smithy unions that contain members named "unknown" will now codegen correctly
37+
- (all, [smithy-rs#4105](https://github.com/smithy-lang/smithy-rs/issues/4105), @FalkWoldmann) Replace once_cell with std equivalents
38+
39+
**Contributors**
40+
Thank you for your contributions!
41+
- @FalkWoldmann ([smithy-rs#4105](https://github.com/smithy-lang/smithy-rs/issues/4105))
42+
43+
244
May 9th, 2025
345
=============
446
**Breaking Changes:**

aws/SDK_CHANGELOG.next.json

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@
55
{
66
"smithy-rs": [],
77
"aws-sdk-rust": [
8-
{
9-
"message": "Update spans to better align with spec.\n",
10-
"meta": {
11-
"bug": false,
12-
"breaking": false,
13-
"tada": false
14-
},
15-
"author": "landonxjames",
16-
"references": [
17-
"smithy-rs#4052"
18-
],
19-
"since-commit": "7558d31f17b69bce8785ffa833c575d0b172209c",
20-
"age": 5
21-
},
228
{
239
"message": "Replace the `once_cell` crate with the `std` counterpart in AWS runtime crates.\n",
2410
"meta": {
@@ -31,7 +17,7 @@
3117
"smithy-rs#4050"
3218
],
3319
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
34-
"age": 3
20+
"age": 5
3521
},
3622
{
3723
"message": "Fix an issue where a custom `Content-Encoding` header was incorrectly overwritten by the `aws-chunked` header value.\n",
@@ -45,7 +31,7 @@
4531
"aws-sdk-rust#1281"
4632
],
4733
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
48-
"age": 3
34+
"age": 5
4935
},
5036
{
5137
"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",
@@ -59,7 +45,7 @@
5945
"smithy-rs#3776"
6046
],
6147
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
62-
"age": 3
48+
"age": 5
6349
},
6450
{
6551
"message": "Fix service specific endpoint url keys\n",
@@ -73,7 +59,7 @@
7359
"aws-sdk-rust#1252"
7460
],
7561
"since-commit": "f0c92d92b680771787af8ab60995d0e1fae02611",
76-
"age": 3
62+
"age": 5
7763
},
7864
{
7965
"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",
@@ -87,7 +73,7 @@
8773
"smithy-rs#4117"
8874
],
8975
"since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
90-
"age": 1
76+
"age": 3
9177
},
9278
{
9379
"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",
@@ -102,7 +88,7 @@
10288
"smithy-rs#3926"
10389
],
10490
"since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
105-
"age": 1
91+
"age": 3
10692
},
10793
{
10894
"message": "Update MSRV to 1.82.0\n",
@@ -116,6 +102,62 @@
116102
"smithy-rs#4120"
117103
],
118104
"since-commit": "84f5464aacf3544f706d75af0aaddfea42c20e9f",
105+
"age": 3
106+
},
107+
{
108+
"message": "Replace once_cell with std equivalents\n",
109+
"meta": {
110+
"bug": false,
111+
"breaking": false,
112+
"tada": false
113+
},
114+
"author": "FalkWoldmann",
115+
"references": [
116+
"smithy-rs#4105"
117+
],
118+
"since-commit": "f3aebe7b53d7e1be4bd922e13d459f8ef72104fa",
119+
"age": 2
120+
},
121+
{
122+
"message": "Removing the `optimize_crc32_auto` feature flag from the `crc-fast` dependency of the `aws-smithy-checksums` crate since it was causing build issues for some customers.\n",
123+
"meta": {
124+
"bug": true,
125+
"breaking": false,
126+
"tada": false
127+
},
128+
"author": "landonxjames",
129+
"references": [
130+
"aws-sdk-rust#1291"
131+
],
132+
"since-commit": "4e4a0ee2d663a1212927a8a70ca97eac567d54b6",
133+
"age": 1
134+
},
135+
{
136+
"message": "fix simple rules behavior with `RuleMode::MatchAny`\n",
137+
"meta": {
138+
"bug": true,
139+
"breaking": false,
140+
"tada": false
141+
},
142+
"author": "aajtodd",
143+
"references": [
144+
"smithy-rs#4135"
145+
],
146+
"since-commit": "4e4a0ee2d663a1212927a8a70ca97eac567d54b6",
147+
"age": 1
148+
},
149+
{
150+
"message": "Introduce a new `repeatedly()` function to `aws-smithy-mocks` sequence builder to build mock rules that behave as an\ninfinite sequence.\n\n```rust\nlet rule = mock!(aws_sdk_s3::Client::get_object)\n .sequence()\n .http_status(503, None)\n .times(2) // repeat the last output twice before moving onto the next response in the sequence\n .output(|| GetObjectOutput::builder()\n .body(ByteStream::from_static(b\"success\"))\n .build()\n )\n .repeatedly() // repeat the last output forever\n .build();\n```\n",
151+
"meta": {
152+
"bug": false,
153+
"breaking": false,
154+
"tada": true
155+
},
156+
"author": "aajtodd",
157+
"references": [
158+
"smithy-rs#4135"
159+
],
160+
"since-commit": "4e4a0ee2d663a1212927a8a70ca97eac567d54b6",
119161
"age": 1
120162
}
121163
],

aws/rust-runtime/Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)