<!-- Do not manually edit this file. Use the `changelogger` tool. -->
August 31st, 2022
=================
**Breaking Changes:**
- ⚠🎉 (client, [smithy-rs#1598](https://github.com/awslabs/smithy-rs/issues/1598)) Previously, the config customizations that added functionality related to retry configs, timeout configs, and the
async sleep impl were defined in the smithy codegen module but were being loaded in the AWS codegen module. They
have now been updated to be loaded during smithy codegen. The affected classes are all defined in the
`software.amazon.smithy.rust.codegen.smithy.customizations` module of smithy codegen.` This change does not affect
the generated code.
These classes have been removed:
- `RetryConfigDecorator`
- `SleepImplDecorator`
- `TimeoutConfigDecorator`
These classes have been renamed:
- `RetryConfigProviderConfig` is now `RetryConfigProviderCustomization`
- `PubUseRetryConfig` is now `PubUseRetryConfigGenerator`
- `SleepImplProviderConfig` is now `SleepImplProviderCustomization`
- `TimeoutConfigProviderConfig` is now `TimeoutConfigProviderCustomization`
- ⚠🎉 (all, [smithy-rs#1635](https://github.com/awslabs/smithy-rs/issues/1635), [smithy-rs#1416](https://github.com/awslabs/smithy-rs/issues/1416), @weihanglo) Support granular control of specifying runtime crate versions.
For code generation, the field `runtimeConfig.version` in smithy-build.json has been removed.
The new field `runtimeConfig.versions` is an object whose keys are runtime crate names (e.g. `aws-smithy-http`),
and values are user-specified versions.
If you previously set `version = "DEFAULT"`, the migration path is simple.
By setting `versions` with an empty object or just not setting it at all,
the version number of the code generator will be used as the version for all runtime crates.
If you specified a certain version such as `version = "0.47.0", you can migrate to a special reserved key `DEFAULT`.
The equivalent JSON config would look like:
```json
{
"runtimeConfig": {
"versions": {
"DEFAULT": "0.47.0"
}
}
}
```
Then all runtime crates are set with version 0.47.0 by default unless overridden by specific crates. For example,
```json
{
"runtimeConfig": {
"versions": {
"DEFAULT": "0.47.0",
"aws-smithy-http": "0.47.1"
}
}
}
```
implies that we're using `aws-smithy-http` 0.47.1 specifically. For the rest of the crates, it will default to 0.47.0.
- ⚠ (all, [smithy-rs#1623](https://github.com/awslabs/smithy-rs/issues/1623), @ogudavid) Remove @sensitive trait tests which applied trait to member. The ability to mark members with @sensitive was removed in Smithy 1.22.
- ⚠ (server, [smithy-rs#1544](https://github.com/awslabs/smithy-rs/issues/1544)) Servers now allow requests' ACCEPT header values to be:
-`*/*`
-`type/*`
-`type/subtype`
- 🐛⚠ (all, [smithy-rs#1274](https://github.com/awslabs/smithy-rs/issues/1274)) Lossy converters into integer types for `aws_smithy_types::Number` have been
removed. Lossy converters into floating point types for
`aws_smithy_types::Number` have been suffixed with `_lossy`. If you were
directly using the integer lossy converters, we recommend you use the safe
converters.
_Before:_
```rust
fnf1(n:aws_smithy_types::Number){
letfoo:f32=n.to_f32();// Lossy conversion!
letbar:u32=n.to_u32();// Lossy conversion!
}
```
_After:_
```rust
fnf1(n:aws_smithy_types::Number){
usestd::convert::TryInto;// Unnecessary import if you're using Rust 2021 edition.
letfoo:f32=n.try_into().expect("lossy conversion detected");// Or handle the error instead of panicking.
// You can still do lossy conversions, but only into floating point types.
letfoo:f32=n.to_f32_lossy();
// To lossily convert into integer types, use an `as` cast directly.
letbar:u32=nasu32;// Lossy conversion!
}
```
- ⚠ (all, [smithy-rs#1699](https://github.com/awslabs/smithy-rs/issues/1699)) Bump [MSRV](https://github.com/awslabs/aws-sdk-rust#supported-rust-versions-msrv) from 1.58.1 to 1.61.0 per our policy.
**New this release:**
- 🎉 (all, [smithy-rs#1623](https://github.com/awslabs/smithy-rs/issues/1623), @ogudavid) Update Smithy dependency to 1.23.1. Models using version 2.0 of the IDL are now supported.
- 🎉 (server, [smithy-rs#1551](https://github.com/awslabs/smithy-rs/issues/1551), @hugobast) There is a canonical and easier way to run smithy-rs on Lambda [see example].
- 🐛 (all, [smithy-rs#1623](https://github.com/awslabs/smithy-rs/issues/1623), @ogudavid) Fix detecting sensitive members through their target shape having the @sensitive trait applied.
- (all, [smithy-rs#1623](https://github.com/awslabs/smithy-rs/issues/1623), @ogudavid) Fix SetShape matching needing to occur before ListShape since it is now a subclass. Sets were deprecated in Smithy 1.22.
- (all, [smithy-rs#1623](https://github.com/awslabs/smithy-rs/issues/1623), @ogudavid) Fix Union shape test data having an invalid empty union. Break fixed from Smithy 1.21 to Smithy 1.22.
- (all, [smithy-rs#1612](https://github.com/awslabs/smithy-rs/issues/1612), @unexge) Add codegen version to generated package metadata
- (client, [aws-sdk-rust#609](https://github.com/awslabs/aws-sdk-rust/issues/609)) It is now possible to exempt specific operations from XML body root checking. To do this, add the `AllowInvalidXmlRoot`
trait to the output struct of the operation you want to exempt.
"message":"Rename EventStreamInput to EventStreamSender",
"message":"Refactor endpoint resolution internals to use `aws_smithy_types::Endpoint` internally. The public internal\nfunctions `aws_endpoint::set_endpoint_resolver` and `aws_endpoint::get_endpoint_resolver were removed.",
"message":"The type of streaming unions that contain errors is generated without those errors.\nErrors in a streaming union `Union` are generated as members of the type `UnionError`.\nTaking Transcribe as an example, the `AudioStream` streaming union generates, in the client, both the `AudioStream` type:\n```rust\npub enum AudioStream {\n AudioEvent(crate::model::AudioEvent),\n Unknown,\n}\n```\nand its error type,\n```rust\npub struct AudioStreamError {\n /// Kind of error that occurred.\n pub kind: AudioStreamErrorKind,\n /// Additional metadata about the error, including error code, message, and request ID.\n pub(crate) meta: aws_smithy_types::Error,\n}\n```\n`AudioStreamErrorKind` contains all error variants for the union.\nBefore, the generated code looked as:\n```rust\npub enum AudioStream {\n AudioEvent(crate::model::AudioEvent),\n ... all error variants,\n Unknown,\n}\n```\n",
"message":"Service configs are now generated with new accessors for:\n- `Config::retry_config()` - Returns a reference to the inner retry configuration.\n- `Config::timeout_config()` - Returns a reference to the inner timeout configuration.\n- `Config::sleep_impl()` - Returns a clone of the inner async sleep implementation.\n\nPreviously, these were only accessible through `SdkConfig`.\n",
"message":"`aws_smithy_http::event_stream::EventStreamSender` and `aws_smithy_http::event_stream::Receiver` are now generic over `<T, E>`,\nwhere `T` is a streaming union and `E` the union's errors.\nThis means that event stream errors are now sent as `Err` of the union's error type.\nWith this example model:\n```smithy\n@streaming union Event {\n throttlingError: ThrottlingError\n}\n@error(\"client\") structure ThrottlingError {}\n```\nBefore:\n```rust\nstream! { yield Ok(Event::ThrottlingError ...) }\n```\nAfter:\n```rust\nstream! { yield Err(EventError::ThrottlingError ...) }\n```\nAn example from the SDK is in [transcribe streaming](https://github.com/awslabs/smithy-rs/blob/4f51dd450ea3234a7faf481c6025597f22f03805/aws/sdk/integration-tests/transcribestreaming/tests/test.rs#L80).\n",
"message":"Lossy converters into integer types for `aws_smithy_types::Number` have been\nremoved. Lossy converters into floating point types for\n`aws_smithy_types::Number` have been suffixed with `_lossy`. If you were\ndirectly using the integer lossy converters, we recommend you use the safe\nconverters.\n_Before:_\n```rust\nfn f1(n: aws_smithy_types::Number) {\n let foo: f32 = n.to_f32(); // Lossy conversion!\n let bar: u32 = n.to_u32(); // Lossy conversion!\n}\n```\n_After:_\n```rust\nfn f1(n: aws_smithy_types::Number) {\n use std::convert::TryInto; // Unnecessary import if you're using Rust 2021 edition.\n let foo: f32 = n.try_into().expect(\"lossy conversion detected\"); // Or handle the error instead of panicking.\n // You can still do lossy conversions, but only into floating point types.\n let foo: f32 = n.to_f32_lossy();\n // To lossily convert into integer types, use an `as` cast directly.\n let bar: u32 = n as u32; // Lossy conversion!\n}\n```\n",
"message":"The AWS SDK for Rust now supports [additional checksum algorithms for Amazon S3](https://aws.amazon.com/blogs/aws/new-additional-checksum-algorithms-for-amazon-s3/).\nWhen getting and putting objects, you may now request that the request body be validated with a checksum. The supported\nalgorithms are SHA-1, SHA-256, CRC-32, and CRC-32C.\n\n```rust\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n let sdk_config = aws_config::load_from_env().await;\n let s3_client = aws_sdk_s3::Client::new(&sdk_config);\n let body = aws_sdk_s3::types::ByteStream::read_from()\n .path(std::path::Path::new(\"./path/to/your/file.txt\"))\n .build()\n .await\n .unwrap();\n\n let _ = s3_client\n .put_object()\n .bucket(\"your-bucket\")\n .key(\"file.txt\")\n .body(body)\n // When using this field, the checksum will be calculated for you\n .checksum_algorithm(aws_sdk_s3::model::ChecksumAlgorithm::Crc32C)\n .send()\n .await?;\n\n let body = aws_sdk_s3::types::ByteStream::read_from()\n .path(std::path::Path::new(\"./path/to/your/other-file.txt\"))\n .build()\n .await\n .unwrap();\n\n let _ = s3_client\n .put_object()\n .bucket(\"your-bucket\")\n .key(\"other-file.txt\")\n .body(body)\n // Alternatively, you can pass a checksum that you've calculated yourself. It must be base64\n // encoded. Also, make sure that you're base64 encoding the bytes of the checksum, not its\n // string representation.\n .checksum_crc32_c(aws_smithy_types::base64::encode(&A_PRECALCULATED_CRC_32_C_CHECKSUM[..]))\n .send()\n .await?;\n}\n```\n",
"message":"Bump [MSRV](https://github.com/awslabs/aws-sdk-rust#supported-rust-versions-msrv) from 1.58.1 to 1.61.0 per our policy.",