|
1 | 1 | <!-- Do not manually edit this file. Use the `changelogger` tool. --> |
| 2 | +March 30th, 2023 |
| 3 | +================ |
| 4 | +**Breaking Changes:** |
| 5 | +- β π ([smithy-rs#2467](https://github.com/awslabs/smithy-rs/issues/2467)) Update MSRV to 1.66.1 |
| 6 | +- β ([smithy-rs#76](https://github.com/awslabs/smithy-rs/issues/76), [smithy-rs#2129](https://github.com/awslabs/smithy-rs/issues/2129)) Request IDs can now be easily retrieved on successful responses. For example, with S3: |
| 7 | + ```rust |
| 8 | + // Import the trait to get the `request_id` method on outputs |
| 9 | + use aws_sdk_s3::types::RequestId; |
| 10 | + let output = client.list_buckets().send().await?; |
| 11 | + println!("Request ID: {:?}", output.request_id()); |
| 12 | + ``` |
| 13 | +- β ([smithy-rs#76](https://github.com/awslabs/smithy-rs/issues/76), [smithy-rs#2129](https://github.com/awslabs/smithy-rs/issues/2129)) Retrieving a request ID from errors now requires importing the `RequestId` trait. For example, with S3: |
| 14 | + ```rust |
| 15 | + use aws_sdk_s3::types::RequestId; |
| 16 | + println!("Request ID: {:?}", error.request_id()); |
| 17 | + ``` |
| 18 | +- β ([smithy-rs#76](https://github.com/awslabs/smithy-rs/issues/76), [smithy-rs#2129](https://github.com/awslabs/smithy-rs/issues/2129)) The `message()` and `code()` methods on errors have been moved into `ProvideErrorMetadata` trait. This trait will need to be imported to continue calling these. |
| 19 | +- β ([smithy-rs#76](https://github.com/awslabs/smithy-rs/issues/76), [smithy-rs#2129](https://github.com/awslabs/smithy-rs/issues/2129), [smithy-rs#2075](https://github.com/awslabs/smithy-rs/issues/2075)) The `*Error` and `*ErrorKind` types have been combined to make error matching simpler. |
| 20 | + <details> |
| 21 | + <summary>Example with S3</summary> |
| 22 | + **Before:** |
| 23 | + ```rust |
| 24 | + let result = client |
| 25 | + .get_object() |
| 26 | + .bucket(BUCKET_NAME) |
| 27 | + .key("some-key") |
| 28 | + .send() |
| 29 | + .await; |
| 30 | + match result { |
| 31 | + Ok(_output) => { /* Do something with the output */ } |
| 32 | + Err(err) => match err.into_service_error() { |
| 33 | + GetObjectError { kind, .. } => match kind { |
| 34 | + GetObjectErrorKind::InvalidObjectState(value) => println!("invalid object state: {:?}", value), |
| 35 | + GetObjectErrorKind::NoSuchKey(_) => println!("object didn't exist"), |
| 36 | + } |
| 37 | + err @ GetObjectError { .. } if err.code() == Some("SomeUnmodeledError") => {} |
| 38 | + err @ _ => return Err(err.into()), |
| 39 | + }, |
| 40 | + } |
| 41 | + ``` |
| 42 | + **After:** |
| 43 | + ```rust |
| 44 | + // Needed to access the `.code()` function on the error type: |
| 45 | + use aws_sdk_s3::types::ProvideErrorMetadata; |
| 46 | + let result = client |
| 47 | + .get_object() |
| 48 | + .bucket(BUCKET_NAME) |
| 49 | + .key("some-key") |
| 50 | + .send() |
| 51 | + .await; |
| 52 | + match result { |
| 53 | + Ok(_output) => { /* Do something with the output */ } |
| 54 | + Err(err) => match err.into_service_error() { |
| 55 | + GetObjectError::InvalidObjectState(value) => { |
| 56 | + println!("invalid object state: {:?}", value); |
| 57 | + } |
| 58 | + GetObjectError::NoSuchKey(_) => { |
| 59 | + println!("object didn't exist"); |
| 60 | + } |
| 61 | + err if err.code() == Some("SomeUnmodeledError") => {} |
| 62 | + err @ _ => return Err(err.into()), |
| 63 | + }, |
| 64 | + } |
| 65 | + ``` |
| 66 | + </details> |
| 67 | +- β ([smithy-rs#76](https://github.com/awslabs/smithy-rs/issues/76), [smithy-rs#2129](https://github.com/awslabs/smithy-rs/issues/2129)) `aws_smithy_types::Error` has been renamed to `aws_smithy_types::error::ErrorMetadata`. |
| 68 | +- β ([smithy-rs#2433](https://github.com/awslabs/smithy-rs/issues/2433)) The modules in the SDK crates have been reorganized. See the [SDK Crate Reorganization Upgrade Guidance](https://github.com/awslabs/aws-sdk-rust/discussions/752) to see how to fix your code after this change. |
| 69 | +- β ([aws-sdk-rust#160](https://github.com/awslabs/aws-sdk-rust/issues/160), [smithy-rs#2445](https://github.com/awslabs/smithy-rs/issues/2445)) Reconnect on transient errors. |
| 70 | + |
| 71 | + If a transient error (timeout, 500, 503, 503) is encountered, the connection will be evicted from the pool and will not |
| 72 | + be reused. This is enabled by default for all AWS services. It can be disabled by setting `RetryConfig::with_reconnect_mode` |
| 73 | + |
| 74 | + Although there is no API breakage from this change, it alters the client behavior in a way that may cause breakage for customers. |
| 75 | +- β ([smithy-rs#2390](https://github.com/awslabs/smithy-rs/issues/2390), [smithy-rs#1784](https://github.com/awslabs/smithy-rs/issues/1784)) Remove deprecated `ResolveAwsEndpoint` interfaces. |
| 76 | + [For details see the longform changelog entry](https://github.com/awslabs/aws-sdk-rust/discussions/755). |
| 77 | + |
| 78 | +**New this release:** |
| 79 | +- ππ ([aws-sdk-rust#740](https://github.com/awslabs/aws-sdk-rust/issues/740)) Fluent builder methods on the client are now marked as deprecated when the related operation is deprecated. |
| 80 | +- π ([smithy-rs#2428](https://github.com/awslabs/smithy-rs/issues/2428), [smithy-rs#2208](https://github.com/awslabs/smithy-rs/issues/2208)) `SdkError` variants can now be constructed for easier unit testing. |
| 81 | +- π ([aws-sdk-rust#753](https://github.com/awslabs/aws-sdk-rust/issues/753), [smithy-rs#2451](https://github.com/awslabs/smithy-rs/issues/2451)) Enable presigning for S3's `HeadObject` operation. |
| 82 | +- ([smithy-rs#2437](https://github.com/awslabs/smithy-rs/issues/2437), [aws-sdk-rust#600](https://github.com/awslabs/aws-sdk-rust/issues/600)) Add more client re-exports. Specifically, it re-exports `aws_smithy_http::body::SdkBody`, `aws_smithy_http::byte_stream::error::Error`, and `aws_smithy_http::operation::{Request, Response}`. |
| 83 | +- π ([smithy-rs#2471](https://github.com/awslabs/smithy-rs/issues/2471), [smithy-rs#2333](https://github.com/awslabs/smithy-rs/issues/2333), [smithy-rs#2151](https://github.com/awslabs/smithy-rs/issues/2151)) Default connector provided by `aws-config` now respects `ConnectorSettings`. |
| 84 | + |
| 85 | + Previously, it used the timeout settings provided by aws-config. A test from @Oliboy50 has been incorporated to verify this behavior. |
| 86 | + |
| 87 | + **Behavior Change**: Prior to this change, the Hyper client would be shared between all service clients. After this change, each service client will use its own Hyper Client. |
| 88 | + To revert to the previous behavior, set `HttpConnector::Prebuilt` on `SdkConfig::http_connector`. |
| 89 | +- ([smithy-rs#2474](https://github.com/awslabs/smithy-rs/issues/2474)) Increase Tokio version to 1.23.1 for all crates. This is to address [RUSTSEC-2023-0001](https://rustsec.org/advisories/RUSTSEC-2023-0001) |
| 90 | + |
| 91 | + |
2 | 92 | January 26th, 2023 |
3 | 93 | ================== |
4 | 94 | **Breaking Changes:** |
|
0 commit comments