Releases: smithy-lang/smithy-rs
v0.42.0 (May 13th, 2022)
Breaking Changes:
-
⚠🎉 (aws-sdk-rust#494, aws-sdk-rust#519) The
aws_smithy_http::byte_stream::bytestream_util::FsBuilder
has been updated to allow for easier creation of
multi-part requests.FsBuilder::offset
is a new method allowing users to specify an offset to start reading a file from.FsBuilder::file_size
has been reworked intoFsBuilder::length
and is now used to specify the amount of data to read.
With these two methods, it's now simple to create a
ByteStream
that will read a single "chunk" of a file. The example
below demonstrates how you could divide a singleFile
into consecutive chunks to create multipleByteStream
s.let example_file_path = Path::new("/example.txt"); let example_file_size = tokio::fs::metadata(&example_file_path).await.unwrap().len(); let chunks = 6; let chunk_size = file_size / chunks; let mut byte_streams = Vec::new(); for i in 0..chunks { let length = if i == chunks - 1 { // If we're on the last chunk, the length to read might be less than a whole chunk. // We substract the size of all previous chunks from the total file size to get the // size of the final chunk. file_size - (i * chunk_size) } else { chunk_size }; let byte_stream = ByteStream::read_from() .path(&file_path) .offset(i * chunk_size) .length(length) .build() .await?; byte_streams.push(byte_stream); } for chunk in byte_streams { // Make requests to a service }
New this release:
- (smithy-rs#1352) Log a debug event when a retry is going to be peformed
- (smithy-rs#1332, @82marbag) Update generated crates to Rust 2021
Contributors
Thank you for your contributions! ❤
v0.41.0 (April 28th 2022)
Breaking Changes:
- ⚠ (smithy-rs#1318) Bump MSRV from 1.56.1 to 1.58.1 per our "two versions behind" policy.
New this release:
- (smithy-rs#1307) Add new trait for HTTP body callbacks. This is the first step to enabling us to implement optional checksum verification of requests and responses.
- (smithy-rs#1330) Upgrade to Smithy 1.21.0
0.40.2 (April 14th, 2022)
Breaking Changes:
- ⚠ (aws-sdk-rust#490) Update all runtime crates to edition 2021
New this release:
- (smithy-rs#1262, @liubin) Fix link to Developer Guide in crate's README.md
- (smithy-rs#1301, @benesch) Update urlencoding crate to v2.1.0
Contributors
Thank you for your contributions! ❤
0.39.0 (March 17, 2022)
Breaking Changes:
-
⚠ (aws-sdk-rust#406)
aws_types::config::Config
has been renamed toaws_types:sdk_config::SdkConfig
. This is to better differentiate it
from service-specific configs likeaws_s3_sdk::Config
. If you were creating shared configs with
aws_config::load_from_env()
, then you don't have to do anything. If you were directly referring to a shared config,
update youruse
statements andstruct
names.Before:
use aws_types::config::Config; fn main() { let config = Config::builder() // config builder methods... .build() .await; }
After:
use aws_types::SdkConfig; fn main() { let config = SdkConfig::builder() // config builder methods... .build() .await; }
-
⚠ (smithy-rs#724) Timeout configuration has been refactored a bit. If you were setting timeouts through environment variables or an AWS
profile, then you shouldn't need to change anything. Take note, however, that we don't currently support HTTP connect,
read, write, or TLS negotiation timeouts. If you try to set any of those timeouts in your profile or environment, we'll
log a warning explaining that those timeouts don't currently do anything.If you were using timeouts programmatically,
you'll need to update your code. In previous versions, timeout configuration was stored in a singleTimeoutConfig
struct. In this new version, timeouts have been broken up into several different config structs that are then collected
in atimeout::Config
struct. As an example, to get the API per-attempt timeout in previous versions you would access
it with<your TimeoutConfig>.api_call_attempt_timeout()
and in this new version you would access it with
<your timeout::Config>.api.call_attempt_timeout()
. We also made some unimplemented timeouts inaccessible in order to
avoid giving users the impression that setting them had an effect. We plan to re-introduce them once they're made
functional in a future update.
New this release:
- (smithy-rs#1225)
DynMiddleware
is nowclone
able - (smithy-rs#1257) HTTP request property bag now contains list of desired HTTP versions to use when making requests. This list is not currently used but will be in an upcoming update.
0.38.0 (Februrary 24, 2022)
Breaking Changes:
- ⚠ (smithy-rs#1197)
aws_smithy_types::retry::RetryKind
had itsNotRetryable
variant split intoUnretryableFailure
andUnnecessary
. If you implement theClassifyResponse
, then successful responses need to returnUnnecessary
, and failures that shouldn't be retried need to returnUnretryableFailure
. - ⚠ (smithy-rs#1209)
aws_smithy_types::primitive::Encoder
is now a struct rather than an enum, but its usage remains the same. - ⚠ (smithy-rs#1217)
ClientBuilder
helpersrustls()
andnative_tls()
now returnDynConnector
and use dynamic dispatch rather than returning their concrete connector type that would allow static dispatch. If static dispatch is desired, then manually construct a connector to give to the builder. For example, for rustls:builder.connector(Adapter::builder().build(aws_smithy_client::conns::https()))
(whereAdapter
is inaws_smithy_client::hyper_ext
).
New this release:
- 🐛 (smithy-rs#1197) Fixed a bug that caused clients to eventually stop retrying. The cross-request retry allowance wasn't being reimbursed upon receiving a successful response, so once this allowance reached zero, no further retries would ever be attempted.
v0.37.0 (February 18th, 2022)
0.37.0 (February 18th, 2022)
Breaking Changes:
-
⚠ (smithy-rs#1144) Some APIs required that timeout configuration be specified with an
aws_smithy_client::timeout::Settings
struct while
others required anaws_smithy_types::timeout::TimeoutConfig
struct. Both were equivalent. Nowaws_smithy_types::timeout::TimeoutConfig
is used everywhere andaws_smithy_client::timeout::Settings
has been removed. Here's how to migrate code your code that
depended ontimeout::Settings
:The old way:
let timeout = timeout::Settings::new() .with_connect_timeout(Duration::from_secs(1)) .with_read_timeout(Duration::from_secs(2));
The new way:
// This example is passing values, so they're wrapped in `Option::Some`. You can disable a timeout by passing `None`. let timeout = TimeoutConfig::new() .with_connect_timeout(Some(Duration::from_secs(1))) .with_read_timeout(Some(Duration::from_secs(2)));
-
⚠ (smithy-rs#1085) Moved the following re-exports into a
types
module for all services:<service>::AggregatedBytes
-><service>::types::AggregatedBytes
<service>::Blob
-><service>::types::Blob
<service>::ByteStream
-><service>::types::ByteStream
<service>::DateTime
-><service>::types::DateTime
<service>::SdkError
-><service>::types::SdkError
-
⚠ (smithy-rs#1085)
AggregatedBytes
andByteStream
are now only re-exported if the service has streaming operations,
andBlob
/DateTime
are only re-exported if the service uses them. -
⚠ (smithy-rs#1130) MSRV increased from
1.54
to1.56.1
per our 2-behind MSRV policy.
New this release:
- (smithy-rs#1144)
MakeConnectorFn
,HttpConnector
, andHttpSettings
have been moved fromaws_config::provider_config
to
aws_smithy_client::http_connector
. This is in preparation for a later update that will change how connectors are
created and configured. - (smithy-rs#1123) Refactor
Document
shape parser generation - (smithy-rs#1085) The
Client
andConfig
re-exports now have their documentation inlined in the service docs
0.36.0 (January 26, 2022)
New this release:
- (smithy-rs#1087) Improve docs on
Endpoint::{mutable, immutable}
- (smithy-rs#1118) SDK examples now come from
awsdocs/aws-doc-sdk-examples
rather than fromsmithy-rs
- (smithy-rs#1114, @mchoicpe-amazon) Provide SigningService creation via owned String
Contributors
Thank you for your contributions! ❤
0.35.2 (January 20th, 2022)
Changes only impact generated AWS SDK
v0.35.1 (January 19th, 2022)
Changes only impact generated AWS SDK
v0.35.0 (January 19th, 2022)
New this release:
- (smithy-rs#1053) Upgraded Smithy to 1.16.1
- 🐛 (smithy-rs#1069) Fix broken link to
RetryMode
in client docs - 🐛 (smithy-rs#1069) Fix several doc links to raw identifiers (identifiers excaped with
r#
) - 🐛 (smithy-rs#1069) Reduce dependency recompilation in local dev
- 🐛 (aws-sdk-rust#405, smithy-rs#1083) Fixed paginator bug impacting EC2 describe VPCs (and others)