AWS SDK

AWS SDK

rev. 1fb202108840af7ccb1069c5b8afebf43a5e5aec

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/Cargo.toml

@@ -1,1 +67,71 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-http"
    4         -
version = "0.61.1"
           4  +
version = "0.62.0"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "Smithy HTTP logic for smithy-rs."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[features]
   17     17   
event-stream = ["aws-smithy-eventstream"]
   18     18   
rt-tokio = ["aws-smithy-types/rt-tokio"]
   19     19   
   20     20   
[dependencies]
   21         -
bytes = "1"
          21  +
bytes = "1.10.0"
   22     22   
bytes-utils = "0.1"
   23         -
once_cell = "1.10"
   24         -
percent-encoding = "2.1.0"
   25         -
pin-project-lite = "0.2.9"
          23  +
once_cell = "1.20.1"
          24  +
percent-encoding = "2.3.1"
          25  +
pin-project-lite = "0.2.14"
   26     26   
pin-utils = "0.1.0"
   27         -
tracing = "0.1"
   28         -
futures-core = "0.3.29"
          27  +
tracing = "0.1.40"
          28  +
futures-core = "0.3.31"
   29     29   
   30     30   
[dependencies.aws-smithy-eventstream]
   31     31   
path = "../aws-smithy-eventstream"
   32     32   
optional = true
   33     33   
version = "0.60.7"
   34     34   
   35     35   
[dependencies.aws-smithy-runtime-api]
   36     36   
path = "../aws-smithy-runtime-api"
   37     37   
features = ["client", "http-02x"]
   38         -
version = "1.7.3"
          38  +
version = "1.7.4"
   39     39   
   40     40   
[dependencies.aws-smithy-types]
   41     41   
path = "../aws-smithy-types"
   42     42   
features = ["byte-stream-poll-next", "http-body-0-4-x"]
   43         -
version = "1.2.13"
          43  +
version = "1.3.0"
   44     44   
   45     45   
[dependencies.http-02x]
   46     46   
package = "http"
   47         -
version = "0.2.3"
          47  +
version = "0.2.9"
          48  +
          49  +
[dependencies.http-1x]
          50  +
package = "http"
          51  +
version = "1"
   48     52   
   49     53   
[dependencies.http-body-04x]
   50     54   
package = "http-body"
   51         -
version = "0.4.4"
          55  +
version = "0.4.5"
   52     56   
   53     57   
[dev-dependencies]
   54     58   
async-stream = "0.3"
   55     59   
proptest = "1"
   56     60   
   57     61   
[dev-dependencies.futures-util]
   58     62   
version = "0.3.29"
   59     63   
default-features = false
   60     64   
   61     65   
[dev-dependencies.hyper]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/fuzz/Cargo.toml

@@ -1,1 +27,27 @@
   14     14   
   15     15   
[package.metadata]
   16     16   
cargo-fuzz = true
   17     17   
   18     18   
[dependencies]
   19     19   
libfuzzer-sys = "=0.4.7"
   20     20   
http = "0.2.3"
   21     21   
   22     22   
[dependencies.aws-smithy-http]
   23     23   
path = ".."
   24         -
version = "0.61.1"
          24  +
version = "0.62.0"
   25     25   
   26     26   
[workspace]
   27     27   
members = ["."]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/src/endpoint.rs

@@ -1,1 +85,71 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
//! Code for resolving an endpoint (URI) that a request should be sent to
    7      7   
    8         -
#![allow(deprecated)]
    9         -
   10         -
use crate::endpoint::error::InvalidEndpointError;
   11         -
use http_02x::uri::{Authority, Uri};
           8  +
use aws_smithy_runtime_api::client::endpoint::{error::InvalidEndpointError, EndpointPrefix};
   12      9   
use std::borrow::Cow;
   13     10   
use std::result::Result as StdResult;
   14     11   
use std::str::FromStr;
   15     12   
   16     13   
pub mod error;
   17     14   
pub use error::ResolveEndpointError;
   18     15   
   19     16   
/// An endpoint-resolution-specific Result. Contains either an [`Endpoint`](aws_smithy_types::endpoint::Endpoint) or a [`ResolveEndpointError`].
   20     17   
#[deprecated(since = "0.60.1", note = "Was never used.")]
   21     18   
pub type Result = std::result::Result<aws_smithy_types::endpoint::Endpoint, ResolveEndpointError>;
   22     19   
   23         -
/// A special type that adds support for services that have special URL-prefixing rules.
   24         -
#[deprecated(
   25         -
    since = "0.60.1",
   26         -
    note = "Use aws_smithy_runtime_api::client::endpoint::EndpointPrefix instead."
   27         -
)]
   28         -
pub type EndpointPrefix = aws_smithy_runtime_api::client::endpoint::EndpointPrefix;
   29         -
   30     20   
/// Apply `endpoint` to `uri`
   31     21   
///
   32     22   
/// This method mutates `uri` by setting the `endpoint` on it
   33         -
#[deprecated(
   34         -
    since = "0.60.1",
   35         -
    note = "Use aws_smithy_runtime::client::endpoint::apply_endpoint instead."
   36         -
)]
   37     23   
pub fn apply_endpoint(
   38         -
    uri: &mut Uri,
   39         -
    endpoint: &Uri,
          24  +
    uri: &mut http_1x::Uri,
          25  +
    endpoint: &http_1x::Uri,
   40     26   
    prefix: Option<&EndpointPrefix>,
   41     27   
) -> StdResult<(), InvalidEndpointError> {
   42     28   
    let prefix = prefix.map(EndpointPrefix::as_str).unwrap_or("");
   43     29   
    let authority = endpoint
   44     30   
        .authority()
   45     31   
        .as_ref()
   46     32   
        .map(|auth| auth.as_str())
   47     33   
        .unwrap_or("");
   48     34   
    let authority = if !prefix.is_empty() {
   49     35   
        Cow::Owned(format!("{}{}", prefix, authority))
   50     36   
    } else {
   51     37   
        Cow::Borrowed(authority)
   52     38   
    };
   53         -
    let authority = Authority::from_str(&authority).map_err(|err| {
          39  +
    let authority = http_1x::uri::Authority::from_str(&authority).map_err(|err| {
   54     40   
        InvalidEndpointError::failed_to_construct_authority(authority.into_owned(), err)
   55     41   
    })?;
   56     42   
    let scheme = *endpoint
   57     43   
        .scheme()
   58     44   
        .as_ref()
   59     45   
        .ok_or_else(InvalidEndpointError::endpoint_must_have_scheme)?;
   60         -
    let new_uri = Uri::builder()
          46  +
    let new_uri = http_1x::Uri::builder()
   61     47   
        .authority(authority)
   62     48   
        .scheme(scheme.clone())
   63     49   
        .path_and_query(merge_paths(endpoint, uri).as_ref())
   64     50   
        .build()
   65     51   
        .map_err(InvalidEndpointError::failed_to_construct_uri)?;
   66     52   
    *uri = new_uri;
   67     53   
    Ok(())
   68     54   
}
   69     55   
   70         -
fn merge_paths<'a>(endpoint: &'a Uri, uri: &'a Uri) -> Cow<'a, str> {
          56  +
fn merge_paths<'a>(endpoint: &'a http_1x::Uri, uri: &'a http_1x::Uri) -> Cow<'a, str> {
   71     57   
    if let Some(query) = endpoint.path_and_query().and_then(|pq| pq.query()) {
   72     58   
        tracing::warn!(query = %query, "query specified in endpoint will be ignored during endpoint resolution");
   73     59   
    }
   74     60   
    let endpoint_path = endpoint.path();
   75     61   
    let uri_path_and_query = uri.path_and_query().map(|pq| pq.as_str()).unwrap_or("");
   76     62   
    if endpoint_path.is_empty() {
   77     63   
        Cow::Borrowed(uri_path_and_query)
   78     64   
    } else {
   79     65   
        let ep_no_slash = endpoint_path.strip_suffix('/').unwrap_or(endpoint_path);
   80     66   
        let uri_path_no_slash = uri_path_and_query

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/Cargo.toml

@@ -1,1 +21,21 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-json"
    4         -
version = "0.61.2"
           4  +
version = "0.61.3"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "John DiSanti <jdisanti@amazon.com>"]
    6      6   
description = "Token streaming JSON parser for smithy-rs."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
[dependencies.aws-smithy-types]
   16     16   
path = "../aws-smithy-types"
   17         -
version = "1.2.13"
          17  +
version = "1.3.0"
   18     18   
   19     19   
[dev-dependencies]
   20     20   
proptest = "1"
   21     21   
serde_json = "1.0"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/fuzz/Cargo.toml

@@ -1,1 +40,40 @@
   19     19   
edition = "2021"
   20     20   
   21     21   
[package.metadata]
   22     22   
cargo-fuzz = true
   23     23   
   24     24   
[dependencies]
   25     25   
libfuzzer-sys = "=0.4.7"
   26     26   
   27     27   
[dependencies.aws-smithy-json]
   28     28   
path = ".."
   29         -
version = "0.61.2"
          29  +
version = "0.61.3"
   30     30   
   31     31   
[dependencies.aws-smithy-types]
   32     32   
path = "../../aws-smithy-types"
   33         -
version = "1.2.13"
          33  +
version = "1.3.0"
   34     34   
   35     35   
[dependencies.serde_json]
   36     36   
version = "1"
   37     37   
features = ["float_roundtrip"]
   38     38   
   39     39   
[workspace]
   40     40   
members = ["."]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-mocks-experimental/Cargo.toml

@@ -1,1 +29,29 @@
   11     11   
edition = "2021"
   12     12   
license = "Apache-2.0"
   13     13   
repository = "https://github.com/smithy-lang/smithy-rs"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   18     18   
rustdoc-args = ["--cfg", "docsrs"]
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21         -
version = "1.2.13"
          21  +
version = "1.3.0"
   22     22   
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "../aws-smithy-runtime-api"
   25     25   
features = ["client", "http-02x"]
   26         -
version = "1.7.3"
          26  +
version = "1.7.4"
   27     27   
[dev-dependencies.tokio]
   28     28   
version = "1"
   29     29   
features = ["full"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability-otel/Cargo.toml

@@ -1,1 +48,48 @@
   21     21   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   22     22   
rustdoc-args = ["--cfg", "docsrs"]
   23     23   
   24     24   
[dependencies]
   25     25   
value-bag = "1.10.0"
   26     26   
async-global-executor = "2.4.1"
   27     27   
async-task = "=4.7.1"
   28     28   
   29     29   
[dependencies.aws-smithy-observability]
   30     30   
path = "../aws-smithy-observability"
   31         -
version = "0.1.0"
          31  +
version = "0.1.1"
   32     32   
   33     33   
[dependencies.opentelemetry]
   34     34   
version = "0.26.0"
   35     35   
features = ["metrics"]
   36     36   
[target."cfg(not(target_arch = \"powerpc\"))".dependencies.opentelemetry_sdk]
   37     37   
version = "0.26.0"
   38     38   
features = ["metrics", "testing"]
   39     39   
   40     40   
[dev-dependencies]
   41     41   
stats_alloc = "0.1.10"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability/Cargo.toml

@@ -1,1 +24,24 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-observability"
    4         -
version = "0.1.0"
           4  +
version = "0.1.1"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
    6      6   
description = "Smithy observability implementation."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/awslabs/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17         -
once_cell = "1.19.0"
          17  +
once_cell = "1.20.0"
   18     18   
   19     19   
[dependencies.aws-smithy-runtime-api]
   20     20   
path = "../aws-smithy-runtime-api"
   21         -
version = "1.7.3"
          21  +
version = "1.7.4"
   22     22   
   23     23   
[dev-dependencies]
   24     24   
serial_test = "3.1.1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-protocol-test/Cargo.toml

@@ -1,1 +0,31 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-protocol-test"
    4         -
version = "0.63.0"
           4  +
version = "0.63.1"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "A collection of library functions to validate HTTP requests against Smithy protocol tests."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17     17   
assert-json-diff = "1.1"
   18     18   
base64-simd = "0.8"
   19     19   
cbor-diag = "0.1.12"
   20     20   
ciborium = "0.2"
   21         -
http = "0.2.1"
          21  +
http = "0.2.9"
   22     22   
pretty_assertions = "1.3"
   23     23   
regex-lite = "0.1.5"
   24     24   
roxmltree = "0.14.1"
   25         -
serde_json = "1"
          25  +
serde_json = "1.0.128"
   26     26   
thiserror = "1.0.40"
   27     27   
   28     28   
[dependencies.aws-smithy-runtime-api]
   29     29   
path = "../aws-smithy-runtime-api"
   30     30   
features = ["client"]
   31         -
version = "1.7.3"
          31  +
version = "1.7.4"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-query/Cargo.toml

@@ -1,1 +0,21 @@
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17     17   
urlencoding = "2.1"
   18     18   
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21         -
version = "1.2.13"
          21  +
version = "1.3.0"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/Cargo.toml

@@ -1,1 +61,61 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-runtime-api"
    4         -
version = "1.7.3"
           4  +
version = "1.7.4"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
    6      6   
description = "Smithy runtime types."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[package.metadata.smithy-rs-release-tooling]
   17     17   
stable = true
   18     18   
   19     19   
[features]
   20     20   
default = []
   21     21   
client = []
   22     22   
http-auth = ["dep:zeroize"]
   23     23   
test-util = ["aws-smithy-types/test-util", "http-1x"]
   24     24   
http-02x = []
   25     25   
http-1x = []
   26     26   
   27     27   
[dependencies]
   28         -
bytes = "1"
   29         -
pin-project-lite = "0.2"
   30         -
tracing = "0.1"
          28  +
bytes = "1.10.0"
          29  +
pin-project-lite = "0.2.14"
          30  +
tracing = "0.1.40"
   31     31   
   32     32   
[dependencies.aws-smithy-async]
   33     33   
path = "../aws-smithy-async"
   34         -
version = "1.2.4"
          34  +
version = "1.2.5"
   35     35   
   36     36   
[dependencies.aws-smithy-types]
   37     37   
path = "../aws-smithy-types"
   38         -
version = "1.2.13"
          38  +
version = "1.3.0"
   39     39   
   40     40   
[dependencies.http-02x]
   41     41   
package = "http"
   42     42   
version = "0.2.9"
   43     43   
   44     44   
[dependencies.http-1x]
   45     45   
package = "http"
   46     46   
version = "1"
   47     47   
   48     48   
[dependencies.tokio]
   49         -
version = "1.25"
          49  +
version = "1.40.0"
   50     50   
features = ["sync"]
   51     51   
   52     52   
[dependencies.zeroize]
   53         -
version = "1"
          53  +
version = "1.7.0"
   54     54   
optional = true
   55     55   
   56     56   
[dev-dependencies]
   57     57   
proptest = "1"
   58     58   
   59     59   
[dev-dependencies.tokio]
   60     60   
version = "1.25"
   61     61   
features = ["macros", "rt", "rt-multi-thread"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/client/behavior_version.rs

@@ -1,1 +91,116 @@
   13     13   
#[derive(Copy, Clone, PartialEq)]
   14     14   
pub struct BehaviorVersion {
   15     15   
    inner: Inner,
   16     16   
}
   17     17   
   18     18   
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq)]
   19     19   
enum Inner {
   20     20   
    // IMPORTANT: Order matters here for the `Ord` derive. Newer versions go to the bottom.
   21     21   
    V2023_11_09,
   22     22   
    V2024_03_28,
          23  +
    V2025_01_17,
   23     24   
}
   24     25   
   25     26   
impl BehaviorVersion {
   26     27   
    /// This method will always return the latest major version.
   27     28   
    ///
   28     29   
    /// This is the recommend choice for customers who aren't reliant on extremely specific behavior
   29     30   
    /// characteristics. For example, if you are writing a CLI app, the latest behavior major
   30     31   
    /// version is probably the best setting for you.
   31     32   
    ///
   32     33   
    /// If, however, you're writing a service that is very latency sensitive, or that has written
   33     34   
    /// code to tune Rust SDK behaviors, consider pinning to a specific major version.
   34     35   
    ///
   35         -
    /// The latest version is currently [`BehaviorVersion::v2024_03_28`]
          36  +
    /// The latest version is currently [`BehaviorVersion::v2025_01_17`]
   36     37   
    pub fn latest() -> Self {
   37         -
        Self::v2024_03_28()
          38  +
        Self::v2025_01_17()
          39  +
    }
          40  +
          41  +
    /// Behavior version for January 17th, 2025
          42  +
    ///
          43  +
    /// This version updates the default HTTP client and TLS stack. SDKs shipped with
          44  +
    /// a pre 1.x version of hyper and rustls originally. This behavior version updates
          45  +
    /// the HTTP+TLS stack to maintained versions.
          46  +
    ///
          47  +
    /// <div class="warning">
          48  +
    /// NOTE: In a future release behavior versions prior to this will require enabling
          49  +
    /// feature flags manually to keep the legacy Hyper stack as the default. Specifically the
          50  +
    /// `aws-smithy-runtime/tls-rustls` feature flag combined with an older behavior version.
          51  +
    /// </div>
          52  +
    pub fn v2025_01_17() -> Self {
          53  +
        Self {
          54  +
            inner: Inner::V2025_01_17,
          55  +
        }
   38     56   
    }
   39     57   
   40     58   
    /// Behavior version for March 28th, 2024.
   41     59   
    ///
   42     60   
    /// This version enables stalled stream protection for uploads (request bodies) by default.
   43     61   
    ///
   44     62   
    /// When a new behavior major version is released, this method will be deprecated.
          63  +
    #[deprecated(
          64  +
        since = "1.8.0",
          65  +
        note = "Superseded by v2025_01_17, which updates the default HTTPS client stack."
          66  +
    )]
   45     67   
    pub fn v2024_03_28() -> Self {
   46     68   
        Self {
   47     69   
            inner: Inner::V2024_03_28,
   48     70   
        }
   49     71   
    }
   50     72   
   51     73   
    /// Behavior version for November 9th, 2023.
   52     74   
    #[deprecated(
   53     75   
        since = "1.4.0",
   54         -
        note = "Superceded by v2024_03_28, which enabled stalled stream protection for uploads (request bodies) by default."
          76  +
        note = "Superseded by v2024_03_28, which enabled stalled stream protection for uploads (request bodies) by default."
   55     77   
    )]
   56     78   
    pub fn v2023_11_09() -> Self {
   57     79   
        Self {
   58     80   
            inner: Inner::V2023_11_09,
   59     81   
        }
   60     82   
    }
   61     83   
   62     84   
    /// True if this version is newer or equal to the given `other` version.
   63     85   
    pub fn is_at_least(&self, other: BehaviorVersion) -> bool {
   64     86   
        self.inner >= other.inner
   65     87   
    }
   66     88   
}
   67     89   
   68     90   
impl std::fmt::Debug for BehaviorVersion {
   69     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   70     92   
        f.debug_tuple("BehaviorVersion").field(&self.inner).finish()
   71     93   
    }
   72     94   
}
   73     95   
   74     96   
#[cfg(test)]
   75     97   
mod tests {
   76     98   
    use super::*;
   77     99   
   78    100   
    #[test]
   79    101   
    #[allow(deprecated)]
   80    102   
    fn version_comparison() {
   81    103   
        assert!(BehaviorVersion::latest() == BehaviorVersion::latest());
   82    104   
        assert!(BehaviorVersion::v2023_11_09() == BehaviorVersion::v2023_11_09());
   83    105   
        assert!(BehaviorVersion::v2024_03_28() != BehaviorVersion::v2023_11_09());
         106  +
        assert!(BehaviorVersion::v2025_01_17() != BehaviorVersion::v2024_03_28());
   84    107   
        assert!(BehaviorVersion::latest().is_at_least(BehaviorVersion::latest()));
   85    108   
        assert!(BehaviorVersion::latest().is_at_least(BehaviorVersion::v2023_11_09()));
   86    109   
        assert!(BehaviorVersion::latest().is_at_least(BehaviorVersion::v2024_03_28()));
         110  +
        assert!(BehaviorVersion::latest().is_at_least(BehaviorVersion::v2025_01_17()));
   87    111   
        assert!(!BehaviorVersion::v2023_11_09().is_at_least(BehaviorVersion::v2024_03_28()));
   88    112   
        assert!(Inner::V2024_03_28 > Inner::V2023_11_09);
   89    113   
        assert!(Inner::V2023_11_09 < Inner::V2024_03_28);
         114  +
        assert!(Inner::V2024_03_28 < Inner::V2025_01_17);
   90    115   
    }
   91    116   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/client/connection.rs

@@ -1,1 +116,117 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
//! Types related to connection monitoring and management.
    7      7   
    8         -
use std::fmt::{Debug, Formatter};
           8  +
use aws_smithy_types::config_bag::{Storable, StoreReplace};
           9  +
use std::fmt;
    9     10   
use std::net::SocketAddr;
   10         -
use std::sync::Arc;
          11  +
use std::sync::{Arc, Mutex};
   11     12   
   12     13   
/// Metadata that tracks the state of an active connection.
   13     14   
#[derive(Clone)]
   14     15   
pub struct ConnectionMetadata {
   15     16   
    is_proxied: bool,
   16     17   
    remote_addr: Option<SocketAddr>,
   17     18   
    local_addr: Option<SocketAddr>,
   18     19   
    poison_fn: Arc<dyn Fn() + Send + Sync>,
   19     20   
}
   20     21   
   21     22   
impl ConnectionMetadata {
   22     23   
    /// Poison this connection, ensuring that it won't be reused.
   23     24   
    pub fn poison(&self) {
   24     25   
        tracing::info!(
   25     26   
            see_for_more_info = "https://smithy-lang.github.io/smithy-rs/design/client/detailed_error_explanations.html",
   26     27   
            "Connection encountered an issue and should not be re-used. Marking it for closure"
   27     28   
        );
   28     29   
        (self.poison_fn)()
   29     30   
    }
   30     31   
   31     32   
    /// Create a new [`ConnectionMetadata`].
   32     33   
    #[deprecated(
   33     34   
        since = "1.1.0",
   34     35   
        note = "`ConnectionMetadata::new` is deprecated in favour of `ConnectionMetadata::builder`."
   35     36   
    )]
   36     37   
    pub fn new(
   37     38   
        is_proxied: bool,
   38     39   
        remote_addr: Option<SocketAddr>,
   39     40   
        poison: impl Fn() + Send + Sync + 'static,
   40     41   
    ) -> Self {
   41     42   
        Self {
   42     43   
            is_proxied,
   43     44   
            remote_addr,
   44     45   
            // need to use builder to set this field
   45     46   
            local_addr: None,
   46     47   
            poison_fn: Arc::new(poison),
   47     48   
        }
   48     49   
    }
   49     50   
   50     51   
    /// Builder for this connection metadata
   51     52   
    pub fn builder() -> ConnectionMetadataBuilder {
   52     53   
        ConnectionMetadataBuilder::new()
   53     54   
    }
   54     55   
   55     56   
    /// Get the remote address for this connection, if one is set.
   56     57   
    pub fn remote_addr(&self) -> Option<SocketAddr> {
   57     58   
        self.remote_addr
   58     59   
    }
   59     60   
   60     61   
    /// Get the local address for this connection, if one is set.
   61     62   
    pub fn local_addr(&self) -> Option<SocketAddr> {
   62     63   
        self.local_addr
   63     64   
    }
   64     65   
}
   65     66   
   66         -
impl Debug for ConnectionMetadata {
   67         -
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
          67  +
impl fmt::Debug for ConnectionMetadata {
          68  +
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
   68     69   
        f.debug_struct("SmithyConnection")
   69     70   
            .field("is_proxied", &self.is_proxied)
   70     71   
            .field("remote_addr", &self.remote_addr)
   71     72   
            .field("local_addr", &self.local_addr)
   72     73   
            .finish()
   73     74   
    }
   74     75   
}
   75     76   
   76     77   
/// Builder type that is used to construct a [`ConnectionMetadata`] value.
   77     78   
#[derive(Default)]
   78     79   
pub struct ConnectionMetadataBuilder {
   79     80   
    is_proxied: Option<bool>,
   80     81   
    remote_addr: Option<SocketAddr>,
   81     82   
    local_addr: Option<SocketAddr>,
   82     83   
    poison_fn: Option<Arc<dyn Fn() + Send + Sync>>,
   83     84   
}
   84     85   
   85         -
impl Debug for ConnectionMetadataBuilder {
   86         -
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
          86  +
impl fmt::Debug for ConnectionMetadataBuilder {
          87  +
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
   87     88   
        f.debug_struct("ConnectionMetadataBuilder")
   88     89   
            .field("is_proxied", &self.is_proxied)
   89     90   
            .field("remote_addr", &self.remote_addr)
   90     91   
            .field("local_addr", &self.local_addr)
   91     92   
            .finish()
   92     93   
    }
   93     94   
}
   94     95   
   95     96   
impl ConnectionMetadataBuilder {
   96     97   
    /// Creates a new builder.
@@ -146,147 +205,252 @@
  166    167   
                .expect("is_proxied should be set for ConnectionMetadata"),
  167    168   
            remote_addr: self.remote_addr,
  168    169   
            local_addr: self.local_addr,
  169    170   
            poison_fn: self
  170    171   
                .poison_fn
  171    172   
                .expect("poison_fn should be set for ConnectionMetadata"),
  172    173   
        }
  173    174   
    }
  174    175   
}
  175    176   
         177  +
type LoaderFn = dyn Fn() -> Option<ConnectionMetadata> + Send + Sync;
         178  +
         179  +
/// State for a middleware that will monitor and manage connections.
         180  +
#[derive(Clone, Default)]
         181  +
pub struct CaptureSmithyConnection {
         182  +
    loader: Arc<Mutex<Option<Box<LoaderFn>>>>,
         183  +
}
         184  +
         185  +
impl CaptureSmithyConnection {
         186  +
    /// Create a new connection monitor.
         187  +
    pub fn new() -> Self {
         188  +
        Self {
         189  +
            loader: Default::default(),
         190  +
        }
         191  +
    }
         192  +
         193  +
    /// Set the retriever that will capture the `hyper` connection.
         194  +
    pub fn set_connection_retriever<F>(&self, f: F)
         195  +
    where
         196  +
        F: Fn() -> Option<ConnectionMetadata> + Send + Sync + 'static,
         197  +
    {
         198  +
        *self.loader.lock().unwrap() = Some(Box::new(f));
         199  +
    }
         200  +
         201  +
    /// Get the associated connection metadata.
         202  +
    pub fn get(&self) -> Option<ConnectionMetadata> {
         203  +
        match self.loader.lock().unwrap().as_ref() {
         204  +
            Some(loader) => loader(),
         205  +
            None => {
         206  +
                tracing::debug!("no loader was set on the CaptureSmithyConnection");
         207  +
                None
         208  +
            }
         209  +
        }
         210  +
    }
         211  +
}
         212  +
         213  +
impl fmt::Debug for CaptureSmithyConnection {
         214  +
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         215  +
        write!(f, "CaptureSmithyConnection")
         216  +
    }
         217  +
}
         218  +
         219  +
impl Storable for CaptureSmithyConnection {
         220  +
    type Storer = StoreReplace<Self>;
         221  +
}
         222  +
  176    223   
#[cfg(test)]
  177    224   
mod tests {
  178    225   
    use std::{
  179    226   
        net::{IpAddr, Ipv6Addr},
  180    227   
        sync::Mutex,
  181    228   
    };
  182    229   
  183    230   
    use super::*;
  184    231   
  185    232   
    const TEST_SOCKET_ADDR: SocketAddr = SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), 100);
@@ -230,277 +260,326 @@
  250    297   
  251    298   
        let metadata3 = ConnectionMetadataBuilder::new()
  252    299   
            .proxied(true)
  253    300   
            .poison_fn(|| {})
  254    301   
            .remote_addr(TEST_SOCKET_ADDR)
  255    302   
            .build();
  256    303   
  257    304   
        assert_eq!(metadata3.local_addr(), None);
  258    305   
        assert_eq!(metadata3.remote_addr(), Some(TEST_SOCKET_ADDR));
  259    306   
    }
         307  +
         308  +
    #[test]
         309  +
    #[allow(clippy::redundant_clone)]
         310  +
    fn retrieve_connection_metadata() {
         311  +
        let retriever = CaptureSmithyConnection::new();
         312  +
        let retriever_clone = retriever.clone();
         313  +
        assert!(retriever.get().is_none());
         314  +
        retriever.set_connection_retriever(|| {
         315  +
            Some(
         316  +
                ConnectionMetadata::builder()
         317  +
                    .proxied(true)
         318  +
                    .poison_fn(|| {})
         319  +
                    .build(),
         320  +
            )
         321  +
        });
         322  +
         323  +
        assert!(retriever.get().is_some());
         324  +
        assert!(retriever_clone.get().is_some());
         325  +
    }
  260    326   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/http/headers.rs

@@ -294,294 +353,389 @@
  314    314   
            Ok(self.as_ref())
  315    315   
        }
  316    316   
  317    317   
        fn repr_as_http02x_header_name(self) -> Result<http_02x::HeaderName, Self>
  318    318   
        where
  319    319   
            Self: Sized,
  320    320   
        {
  321    321   
            Ok(self)
  322    322   
        }
  323    323   
    }
         324  +
         325  +
    #[cfg(feature = "http-1x")]
         326  +
    impl AsHeaderComponent for http_1x::HeaderName {
         327  +
        fn into_maybe_static(self) -> Result<MaybeStatic, HttpError> {
         328  +
            Ok(self.to_string().into())
         329  +
        }
         330  +
         331  +
        fn as_str(&self) -> Result<&str, HttpError> {
         332  +
            Ok(self.as_ref())
         333  +
        }
         334  +
    }
         335  +
         336  +
    #[cfg(feature = "http-1x")]
         337  +
    impl AsHeaderComponent for http_1x::HeaderValue {
         338  +
        fn into_maybe_static(self) -> Result<MaybeStatic, HttpError> {
         339  +
            Ok(Cow::Owned(
         340  +
                std::str::from_utf8(self.as_bytes())
         341  +
                    .map_err(|err| {
         342  +
                        HttpError::non_utf8_header(NonUtf8Header::new_missing_name(
         343  +
                            self.as_bytes().to_vec(),
         344  +
                            err,
         345  +
                        ))
         346  +
                    })?
         347  +
                    .to_string(),
         348  +
            ))
         349  +
        }
         350  +
         351  +
        fn as_str(&self) -> Result<&str, HttpError> {
         352  +
            std::str::from_utf8(self.as_bytes()).map_err(|err| {
         353  +
                HttpError::non_utf8_header(NonUtf8Header::new_missing_name(
         354  +
                    self.as_bytes().to_vec(),
         355  +
                    err,
         356  +
                ))
         357  +
            })
         358  +
        }
         359  +
    }
  324    360   
}
  325    361   
  326    362   
mod header_value {
  327    363   
    use super::*;
  328    364   
  329    365   
    /// HeaderValue type
  330    366   
    ///
  331    367   
    /// **Note**: Unlike `HeaderValue` in `http`, this only supports UTF-8 header values
  332    368   
    #[derive(Debug, Clone)]
  333    369   
    pub struct HeaderValue {

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/Cargo.toml

@@ -1,1 +154,0 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-runtime"
    4         -
version = "1.7.8"
           4  +
version = "1.8.0"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
    6      6   
description = "The new smithy runtime crate"
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[package.metadata.smithy-rs-release-tooling]
   17     17   
stable = true
   18     18   
[package.metadata.cargo-udeps.ignore]
   19     19   
normal = ["aws-smithy-http"]
   20     20   
   21     21   
[features]
   22     22   
client = ["aws-smithy-runtime-api/client", "aws-smithy-types/http-body-1-x"]
   23     23   
http-auth = ["aws-smithy-runtime-api/http-auth"]
   24         -
connector-hyper-0-14-x = ["dep:hyper-0-14", "hyper-0-14?/client", "hyper-0-14?/http2", "hyper-0-14?/http1", "hyper-0-14?/tcp", "hyper-0-14?/stream", "dep:h2"]
   25         -
tls-rustls = ["dep:hyper-rustls", "dep:rustls", "connector-hyper-0-14-x"]
          24  +
connector-hyper-0-14-x = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/hyper-014"]
          25  +
tls-rustls = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/legacy-rustls-ring", "connector-hyper-0-14-x"]
          26  +
default-https-client = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/rustls-aws-lc"]
   26     27   
rt-tokio = ["tokio/rt"]
   27         -
test-util = ["aws-smithy-runtime-api/test-util", "dep:aws-smithy-protocol-test", "dep:tracing-subscriber", "dep:serde", "dep:serde_json", "dep:indexmap"]
   28         -
wire-mock = ["test-util", "connector-hyper-0-14-x", "hyper-0-14?/server"]
          28  +
test-util = ["aws-smithy-runtime-api/test-util", "dep:tracing-subscriber", "aws-smithy-http-client/test-util", "legacy-test-util"]
          29  +
legacy-test-util = ["aws-smithy-runtime-api/test-util", "dep:tracing-subscriber", "aws-smithy-http-client/test-util", "connector-hyper-0-14-x", "aws-smithy-http-client/legacy-test-util"]
          30  +
wire-mock = ["legacy-test-util", "aws-smithy-http-client/wire-mock"]
   29     31   
   30     32   
[dependencies]
   31         -
bytes = "1"
          33  +
bytes = "1.10.0"
   32     34   
fastrand = "2.3.0"
   33         -
httparse = "1.8.0"
   34         -
once_cell = "1.18.0"
   35         -
pin-project-lite = "0.2.7"
          35  +
once_cell = "1.20.1"
          36  +
pin-project-lite = "0.2.14"
   36     37   
pin-utils = "0.1.0"
   37         -
tracing = "0.1.37"
          38  +
tracing = "0.1.40"
   38     39   
   39     40   
[dependencies.aws-smithy-async]
   40     41   
path = "../aws-smithy-async"
   41         -
version = "1.2.4"
          42  +
version = "1.2.5"
   42     43   
   43     44   
[dependencies.aws-smithy-http]
   44     45   
path = "../aws-smithy-http"
   45         -
version = "0.61.1"
   46         -
   47         -
[dependencies.aws-smithy-protocol-test]
   48         -
path = "../aws-smithy-protocol-test"
   49         -
optional = true
   50         -
version = "0.63.0"
          46  +
version = "0.62.0"
   51     47   
   52     48   
[dependencies.aws-smithy-runtime-api]
   53     49   
path = "../aws-smithy-runtime-api"
   54         -
version = "1.7.3"
          50  +
version = "1.7.4"
   55     51   
   56     52   
[dependencies.aws-smithy-types]
   57     53   
path = "../aws-smithy-types"
   58     54   
features = ["http-body-0-4-x"]
   59         -
version = "1.2.13"
          55  +
version = "1.3.0"
   60     56   
   61         -
[dependencies.h2]
   62         -
version = "0.3"
   63         -
default-features = false
          57  +
[dependencies.aws-smithy-http-client]
          58  +
path = "../aws-smithy-http-client"
   64     59   
optional = true
          60  +
version = "1.0.0"
   65     61   
   66     62   
[dependencies.http-02x]
   67     63   
package = "http"
   68         -
version = "0.2.8"
          64  +
version = "0.2.9"
          65  +
          66  +
[dependencies.http-1x]
          67  +
package = "http"
          68  +
version = "1"
   69     69   
   70     70   
[dependencies.http-body-04x]
   71     71   
package = "http-body"
   72         -
version = "0.4.4"
          72  +
version = "0.4.5"
   73     73   
   74     74   
[dependencies.http-body-1x]
   75     75   
package = "http-body"
   76     76   
version = "1"
   77     77   
   78         -
[dependencies.hyper-0-14]
   79         -
package = "hyper"
   80         -
version = "0.14.26"
   81         -
default-features = false
   82         -
optional = true
   83         -
   84         -
[dependencies.hyper-rustls]
   85         -
version = "0.24"
   86         -
features = ["rustls-native-certs", "http2"]
   87         -
optional = true
   88         -
   89         -
[dependencies.rustls]
   90         -
version = "0.21.8"
   91         -
optional = true
   92         -
   93         -
[dependencies.serde]
   94         -
version = "1"
   95         -
features = ["derive"]
   96         -
optional = true
   97         -
   98         -
[dependencies.serde_json]
   99         -
version = "1"
  100         -
features = ["preserve_order"]
  101         -
optional = true
  102         -
  103         -
[dependencies.indexmap]
  104         -
version = "2"
  105         -
optional = true
  106         -
features = ["serde"]
  107         -
  108     78   
[dependencies.tokio]
  109         -
version = "1.25"
          79  +
version = "1.40.0"
  110     80   
features = []
  111     81   
  112     82   
[dependencies.tracing-subscriber]
  113     83   
version = "0.3.16"
  114     84   
optional = true
  115     85   
features = ["env-filter", "fmt", "json"]
  116     86   
  117     87   
[dev-dependencies]
  118     88   
approx = "0.5.1"
  119     89   
fastrand = "2.3.0"
  120     90   
futures-util = "0.3.29"
  121     91   
pretty_assertions = "1.4.0"
  122     92   
tracing-test = "0.2.1"
  123     93   
  124     94   
[dev-dependencies.aws-smithy-async]
  125     95   
path = "../aws-smithy-async"
  126     96   
features = ["rt-tokio", "test-util"]
  127         -
version = "1.2.4"
          97  +
version = "1.2.5"
  128     98   
  129     99   
[dev-dependencies.aws-smithy-runtime-api]
  130    100   
path = "../aws-smithy-runtime-api"
  131    101   
features = ["test-util"]
  132         -
version = "1.7.3"
         102  +
version = "1.7.4"
  133    103   
  134    104   
[dev-dependencies.aws-smithy-types]
  135    105   
path = "../aws-smithy-types"
  136    106   
features = ["test-util"]
  137         -
version = "1.2.13"
         107  +
version = "1.3.0"
  138    108   
  139    109   
[dev-dependencies.tokio]
  140    110   
version = "1.25"
  141    111   
features = ["macros", "rt", "rt-multi-thread", "test-util", "full"]
  142    112   
  143    113   
[dev-dependencies.tracing-subscriber]
  144    114   
version = "0.3.16"
  145    115   
features = ["env-filter"]
  146    116   
  147    117   
[dev-dependencies.hyper_0_14]
  148    118   
package = "hyper"
  149    119   
version = "0.14.27"
  150    120   
features = ["client", "server", "tcp", "http1", "http2"]
  151         -
  152         -
[dev-dependencies.http1]
  153         -
package = "http"
  154         -
version = "1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/additional-ci

@@ -1,1 +0,13 @@
    2      2   
#
    3      3   
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4      4   
# SPDX-License-Identifier: Apache-2.0
    5      5   
#
    6      6   
    7      7   
# This script contains additional CI checks to run for this specific package
    8      8   
    9      9   
set -e
   10     10   
   11     11   
echo "### Testing every combination of features (excluding --all-features)"
   12         -
cargo hack test --feature-powerset --exclude-all-features
          12  +
# Skip deprecated features that are re-exported from `aws-smithy-http-client` (and tested there already)
          13  +
cargo hack test --feature-powerset --exclude-all-features --exclude-features legacy-test-util,wire-mock,connector-hyper-0-14-x,tls-rustls