Releases: smithy-lang/smithy-rs
v0.27.0-alpha.2 (November 9th, 2021)
Breaking Changes
- Members named
builder
on model structs were renamed tobuilder_value
so that their accessors don't conflict with the existingbuilder()
methods (smithy-rs#842)
New this week
- Fix epoch seconds date-time parsing bug in
aws-smithy-types
(smithy-rs#834) - Omit trailing zeros from fraction when formatting HTTP dates in
aws-smithy-types
(smithy-rs#834) - Generated structs now have accessor methods for their members (smithy-rs#842)
v0.27.0-alpha.1 (November 3rd, 2021)
Breaking Changes
<operation>.make_operation(&config)
is now anasync
function for all operations. Code should be updated to call.await
. This will only impact users using the low-level API. (smithy-rs#797)
New this week
- SDK code generation now includes a version in addition to path parameters when the
version
parameter is included in smithy-build.json moduleDescription
insmithy-build.json
settings is now optional- Upgrade to Smithy 1.13
hyper::Error(IncompleteMessage)
will now be retried (smithy-rs#815)- Fix generated docs on unions. (smithy-rs#826)
v0.27 (October 20th, 2021)
Breaking Changes
⚠️ All Smithy runtime crates have been renamed to have anaws-
prefix. This may require code changes:- Cargo.toml changes:
smithy-async
->aws-smithy-async
smithy-client
->aws-smithy-client
smithy-eventstream
->aws-smithy-eventstream
smithy-http
->aws-smithy-http
smithy-http-tower
->aws-smithy-http-tower
smithy-json
->aws-smithy-json
smithy-protocol-test
->aws-smithy-protocol-test
smithy-query
->aws-smithy-query
smithy-types
->aws-smithy-types
smithy-xml
->aws-smithy-xml
- Rust
use
statement changes:smithy_async
->aws_smithy_async
smithy_client
->aws_smithy_client
smithy_eventstream
->aws_smithy_eventstream
smithy_http
->aws_smithy_http
smithy_http_tower
->aws_smithy_http_tower
smithy_json
->aws_smithy_json
smithy_protocol_test
->aws_smithy_protocol_test
smithy_query
->aws_smithy_query
smithy_types
->aws_smithy_types
smithy_xml
->aws_smithy_xml
- Cargo.toml changes:
New this week
- Filled in missing docs for services in the rustdoc documentation (smithy-rs#779)
v0.26.1-alpha
v0.26.0-alpha (October 15th, 2021)
Breaking Changes
⚠️ Therust-codegen
plugin now requires amoduleDescription
in the smithy-build.json file. This
property goes into the generated Cargo.toml file as the package description. (smithy-rs#766)
New this week
- Add
RustSettings
toCodegenContext
(smithy-rs#616, smithy-rs#752) - Prepare crate manifests for publishing to crates.io (smithy-rs#755)
- Generated Cargo.toml files can now be customized (smithy-rs#766)
- Lots more docs on internal code generators
v0.25.1 (October 11, 2021)
New this week
- 🐛 Re-add missing deserialization operations that were missing because of a typo in
HttpBoundProtocolGenerator.kt
v0.25 (October 7, 2021)
Breaking changes
⚠️ MSRV increased from 1.52.1 to 1.53.0 per our 3-behind MSRV policy.⚠️ Several classes in the codegen module were renamed and/or refactored (smithy-rs#735):ProtocolConfig
becameCodegenContext
and moved tosoftware.amazon.smithy.rust.codegen.smithy
HttpProtocolGenerator
becameProtocolGenerator
and was refactored
to rely on composition instead of inheritanceHttpProtocolTestGenerator
becameProtocolTestGenerator
Protocol
moved intosoftware.amazon.smithy.rust.codegen.smithy.protocols
New this week
- 🐛 Fix an issue where
smithy-xml
may have generated invalid XML (smithy-rs#719) - 🐛 Fix error when receiving empty event stream messages (smithy-rs#736)
- 🐛 Fix bug in event stream receiver that could cause the last events in the response stream to be lost (smithy-rs#736)
New Contributors
- @hyandell made their first contribution in #644
- @davidbarsky made their first contribution in #638
- @JesseWright made their first contribution in #694
- @Velfi made their first contribution in #702
- @obi1kenobi made their first contribution in #719
- @crisidev made their first contribution in #737
- @guyilin-amazon made their first contribution in #750
- @yerke made their first contribution in #753
v0.24 (September 24th, 2021)
New This Week
- Add IMDS credential provider to
aws-config
(smithy-rs#709) - Add IMDS client to
aws-config
(smithy-rs#701) - Add
TimeSource
toaws_types::os_shim_internal
(smithy-rs#701) - User agent construction is now
const fn
(smithy-rs#701) - Add
sts::AssumeRoleProvider
toaws-config
(smithy-rs#703, aws-sdk-rust#3) - Add IMDS region provider to
aws-config
(smithy-rs#715) - Add query param signing to the
aws-sigv4
crate (smithy-rs#707) - 🐛 Update event stream
Receiver
s to beSend
(smithy-rs#702, #aws-sdk-rust#224)
September 14th, 2021
New This Week
- 🐛 Fixes issue where
Content-Length
header could be duplicated leading to signing failure (aws-sdk-rust#220, #697) - 🐛 Fixes naming collision during generation of model shapes that collide with
<operationname>Input
and<operationname>Output
(#699)
v0.22 (September 2nd, 2021)
This release adds support for three commonly requested features:
- More powerful credential chain
- Support for constructing multiple clients from the same configuration
- Support for Transcribe streaming and S3 Select
In addition, this overhauls client configuration which lead to a number of breaking changes. Detailed changes are inline.
Current Credential Provider Support:
- Environment variables
- Web Identity Token Credentials
- Profile file support (partial)
- Credentials
- SSO
- ECS Credential source
- IMDS credential source
- Assume role from source profile
- Static credentials source profile
- WebTokenIdentity provider
- Region
- Credentials
- IMDS
- ECS
Upgrade Guide
If you use <sdk>::Client::from_env
from_env
loaded region & credentials from environment variables only. Default sources have been removed from the generated
SDK clients and moved to the aws-config
package. Note that the aws-config
package default chain adds support for
profile file and web identity token profiles.
- Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
- Update your client creation code:
// `shared_config` can be used to construct multiple different service clients! let shared_config = aws_config::load_from_env().await; // before: <service>::Client::from_env(); let client = <service>::Client::new(&shared_config)
If you used <client>::Config::builder()
Config::build()
has been modified to not fallback to a default provider. Instead, use aws-config
to load and modify
the default chain. Note that when you switch to aws-config
, support for profile files and web identity tokens will be added.
-
Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
-
Update your client creation code:
fn before() { let region = aws_types::region::ChainProvider::first_try(<1 provider>).or_default_provider(); let config = <service>::Config::builder().region(region).build(); let client = <service>::Client::from_conf(&config); } async fn after() { use aws_config::meta::region::RegionProviderChain; let region_provider = RegionProviderChain::first_try(<1 provider>).or_default_provider(); // `shared_config` can be used to construct multiple different service clients! let shared_config = aws_config::from_env().region(region_provider).load().await; let client = <service>::Client::new(&shared_config) }
If you used aws-auth-providers
All credential providers that were in aws-auth-providers
have been moved to aws-config
. Unless you have a specific use case
for a specific credential provider, you should use the default provider chain:
let shared_config = aws_config::load_from_env().await;
let client = <service>::Client::new(&shared_config);
If you maintain your own credential provider
AsyncProvideCredentials
has been renamed to ProvideCredentials
. The trait has been moved from aws-auth
to aws-types
.
The original ProvideCredentials
trait has been removed. The return type has been changed to by a custom future.
For synchronous use cases:
use aws_types::credentials::{ProvideCredentials, future};
#[derive(Debug)]
struct CustomCreds;
impl ProvideCredentials for CustomCreds {
fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>
where
Self: 'a,
{
// if your credentials are synchronous, use `::ready`
// if your credentials are loaded asynchronously, use `::new`
future::ProvideCredentials::ready(todo!()) // your credentials go here
}
}
For asynchronous use cases:
use aws_types::credentials::{ProvideCredentials, future, Result};
#[derive(Debug)]
struct CustomAsyncCreds;
impl CustomAsyncCreds {
async fn load_credentials(&self) -> Result {
Ok(Credentials::from_keys("my creds...", "secret", None))
}
}
impl ProvideCredentials for CustomCreds {
fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>
where
Self: 'a,
{
future::ProvideCredentials::new(self.load_credentials())
}
}
Changes
Breaking Changes
-
Credential providers from
aws-auth-providers
have been moved toaws-config
(#678) -
AsyncProvideCredentials
has been renamed toProvideCredentials
. The original non-async provide credentials has been
removed. See the migration guide above. -
<sevicename>::from_env()
has been removed (#675). A drop-in replacement is available:- Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
- Update your client creation code:
let client = <service>>::Client::new(&aws_config::load_from_env().await)
- Add a dependency on
-
ProvideRegion
has been moved toaws_config::meta::region::ProvideRegion
. (#675) -
aws_types::region::ChainProvider
has been moved toaws_config::meta::region::RegionProviderChain
(#675). -
ProvideRegion
is now asynchronous. Code that calledprovider.region()
must be changed toprovider.region().await
. -
<awsservice>::Config::builder()
will not load a default region. To preserve previous behavior:- Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
-
let shared_config = aws_config::load_from_env().await; let config = <service>::config::Builder::from(&shared_config).<other builder modifications>.build();
- Add a dependency on
-
Request
andResponse
insmithy_http::operation
now useSharedPropertyBag
instead ofArc<Mutex<PropertyBag>>
. Use theacquire
andacquire_mut
methods to get a reference to the underlyingPropertyBag
to access properties. (#667)
New this week
- 🎉 Add profile file provider for region (#594, #682)
- 🎉 Add support for shared configuration between multiple services (#673)
- 🎉 Add support for Transcribe
StartStreamTranscription
and S3SelectObjectContent
operations (#667) - 🎉 Add support for new MemoryDB service (#677)
- Improve documentation on collection-aware builders (#664)
- Update AWS SDK models (#677)
- 🐛 Fix sigv4 signing when request ALPN negotiates to HTTP/2. (#674)
- 🐛 Fix integer size on S3
Size
(#679, aws-sdk-rust#209) - 🐛 Fix JSON parsing issue for modeled empty structs (#683, aws-sdk-rust#212)
- 🐛 Fix acronym case disagreement between FluentClientGenerator and HttpProtocolGenerator type aliasing (#668)
Internal Changes