diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e48fd99a69efa0276bb16ceed55d5ad52df277..2cba72136c14c73f3d772f20072fdac415599d92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ +August 16th, 2024 +================= + August 14th, 2024 ================= diff --git a/aws/SDK_CHANGELOG.next.json b/aws/SDK_CHANGELOG.next.json index c7ebe6fc837378b5b22a0e19c5232510e4bd9af8..768aeebb20908d5855bf9bd06d3a83228253bb1b 100644 --- a/aws/SDK_CHANGELOG.next.json +++ b/aws/SDK_CHANGELOG.next.json @@ -5,20 +5,6 @@ { "smithy-rs": [], "aws-sdk-rust": [ - { - "message": "Add customizations for S3 Expires fields.", - "meta": { - "bug": false, - "breaking": false, - "tada": false - }, - "author": "landonxjames", - "references": [ - "smithy-rs#3730" - ], - "since-commit": "fe1b341e8f1a4ee307554f1a63bf62ec72d8c9a3", - "age": 5 - }, { "message": "Fix bug where stalled stream protection would panic with an underflow if the first event was logged too soon.", "meta": { @@ -31,7 +17,7 @@ "smithy-rs#3744" ], "since-commit": "56f4c8e9479792b8b52cc394d563ed49a01d1dcc", - "age": 4 + "age": 5 }, { "message": "`aws_smithy_runtime_api::client::orchestrator::HttpRequest` and `aws_smithy_runtime_api::client::orchestrator::HttpResponse` are now re-exported in AWS SDK clients so that using these types does not require directly depending on `aws-smithy-runtime-api`.", @@ -45,7 +31,7 @@ "smithy-rs#3591" ], "since-commit": "8d23be1392c46a4d59c2910c3dab00ecaad2cf26", - "age": 3 + "age": 4 }, { "message": "Allow [AwsUserAgent](https://docs.rs/aws-runtime/1.3.1/aws_runtime/user_agent/struct.AwsUserAgent.html) to incorporate business metrics, which now deprecates the existing feature and config metadata.\n", @@ -59,7 +45,7 @@ "smithy-rs#3781" ], "since-commit": "433e1a00e2d3eadfde78b472d78b30a8f9204dbe", - "age": 2 + "age": 3 }, { "message": "Fix incorrect redaction of `@sensitive` types in maps and lists.\n", @@ -74,7 +60,7 @@ "smithy-rs#3757" ], "since-commit": "433e1a00e2d3eadfde78b472d78b30a8f9204dbe", - "age": 2 + "age": 3 } ], "aws-sdk-model": [] diff --git a/rust-runtime/Cargo.lock b/rust-runtime/Cargo.lock index aa7db1e7f15245ef19c005806dfd6b6214960918..64830d9a96dbcb090c6091d48c54f417973608da 100644 --- a/rust-runtime/Cargo.lock +++ b/rust-runtime/Cargo.lock @@ -306,7 +306,7 @@ dependencies = [ name = "aws-smithy-cbor" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "criterion", "minicbor", ] @@ -337,7 +337,7 @@ name = "aws-smithy-checksums" version = "0.60.12" dependencies = [ "aws-smithy-http 0.60.9", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "bytes-utils", "crc32c", @@ -364,7 +364,7 @@ name = "aws-smithy-compression" version = "0.0.1" dependencies = [ "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "bytes-utils", "flate2", @@ -384,7 +384,7 @@ name = "aws-smithy-eventstream" version = "0.60.4" dependencies = [ "arbitrary", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "bytes-utils", "crc32fast", @@ -409,7 +409,7 @@ dependencies = [ "aws-smithy-async 1.2.1", "aws-smithy-runtime 1.6.3", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "h2 0.4.5", "http 1.1.0", "hyper 1.3.1", @@ -451,7 +451,7 @@ dependencies = [ "async-stream", "aws-smithy-eventstream 0.60.4", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "bytes-utils", "futures-core", @@ -480,7 +480,7 @@ dependencies = [ "aws-smithy-http 0.60.9", "aws-smithy-json 0.60.7", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "aws-smithy-xml 0.60.8", "bytes", "futures-util", @@ -510,7 +510,7 @@ dependencies = [ "aws-smithy-http 0.60.9", "aws-smithy-http-server", "aws-smithy-json 0.60.7", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "aws-smithy-xml 0.60.8", "bytes", "futures", @@ -550,7 +550,7 @@ version = "0.60.3" name = "aws-smithy-json" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "proptest", "serde_json", ] @@ -570,7 +570,7 @@ version = "0.2.1" dependencies = [ "aws-sdk-s3", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "tokio", ] @@ -611,7 +611,7 @@ dependencies = [ name = "aws-smithy-query" version = "0.60.7" dependencies = [ - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "urlencoding", ] @@ -655,7 +655,7 @@ dependencies = [ "aws-smithy-http 0.60.9", "aws-smithy-protocol-test 0.62.0", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "fastrand", "futures-util", @@ -703,7 +703,7 @@ name = "aws-smithy-runtime-api" version = "1.7.2" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "http 0.2.12", "http 1.1.0", @@ -742,7 +742,7 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.1" +version = "1.2.2" dependencies = [ "base64 0.13.1", "base64-simd", @@ -779,7 +779,7 @@ name = "aws-smithy-types-convert" version = "0.60.8" dependencies = [ "aws-smithy-async 1.2.1", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "chrono", "futures-core", "time", @@ -791,7 +791,7 @@ version = "0.1.3" dependencies = [ "aws-smithy-http 0.60.9", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "bytes", "http 1.1.0", "tracing", @@ -1980,7 +1980,7 @@ dependencies = [ "aws-smithy-http 0.60.9", "aws-smithy-json 0.60.7", "aws-smithy-runtime-api 1.7.2", - "aws-smithy-types 1.2.1", + "aws-smithy-types 1.2.2", "aws-smithy-xml 0.60.8", "bytes", "fastrand", diff --git a/rust-runtime/aws-smithy-types/Cargo.toml b/rust-runtime/aws-smithy-types/Cargo.toml index fe5c6d8872eefae2604790f07113a4ac4f2beb57..a83fcb4b432876dcd59aa41429622a7b6fb1cb3e 100644 --- a/rust-runtime/aws-smithy-types/Cargo.toml +++ b/rust-runtime/aws-smithy-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-types" -version = "1.2.1" +version = "1.2.2" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", diff --git a/rust-runtime/aws-smithy-types/src/date_time/mod.rs b/rust-runtime/aws-smithy-types/src/date_time/mod.rs index d8b5f7637dc4d04ab8ef204664920c1d3e207807..970c7223c4d786911e1a439f35840bd72805dcd9 100644 --- a/rust-runtime/aws-smithy-types/src/date_time/mod.rs +++ b/rust-runtime/aws-smithy-types/src/date_time/mod.rs @@ -332,7 +332,12 @@ impl Ord for DateTime { impl Display for DateTime { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let date = self.fmt(Format::DateTime).map_err(|_| fmt::Error)?; + // Some dates are out of range to be serialized with `DateTime`. + // In these cases, fallback to using epoch seconds which always works + let date = match self.fmt(Format::DateTime) { + Ok(date) => date, + Err(_err) => format::epoch_seconds::format(self), + }; write!(f, "{}", date) } } @@ -629,6 +634,13 @@ mod test { ); } + #[test] + fn formatting_of_early_dates() { + let date: DateTime = + DateTime::from_str("Mon, 16 Dec -019 23:48:18 GMT", Format::HttpDate).unwrap(); + assert_eq!(format!("{}", date), "-62736509502"); + } + #[test] fn ord() { let first = DateTime::from_secs_and_nanos(-1, 0);