Unverified Commit 1aa59693 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Prefix Smithy runtime crates with `aws-` (#788)

* Prefix Smithy runtime crates with `aws-`

* Update changelogs
parent c3478cea
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
vNext (Month Day, Year)
=======================

**Breaking Changes**

- :warning: All Smithy runtime crates have been renamed to have an `aws-` 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`

v0.26 (October 15th, 2021)
=======================

+23 −0
Original line number Diff line number Diff line
@@ -3,6 +3,29 @@ vNext (Month Day, Year)
**Breaking Changes**
- `CredentialsError` variants became non-exhaustive. This makes them impossible to construct directly outside of the `aws_types` crate. In order to construct credentials errors, new methods have been added for each variant. Instead of `CredentialsError::Unhandled(...)`, you should instead use `CredentialsError::unhandled`. Matching methods exist for all variants. (#781)
- The default credentials chain now returns `CredentialsError::CredentialsNotLoaded` instead of `ProviderError` when no credentials providers are configured.
- :warning: All Smithy runtime crates have been renamed to have an `aws-` 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`

**New this week**

+14 −14
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ repository = "https://github.com/awslabs/smithy-rs"
default-provider = ["profile", "imds", "meta", "sts", "environment", "http-provider"]
profile = ["sts", "web-identity-token", "meta", "environment", "imds"]
meta = ["tokio/sync"]
imds = ["profile", "smithy-http", "smithy-http-tower", "smithy-json", "tower", "aws-http", "meta"]
imds = ["profile", "aws-smithy-http", "aws-smithy-http-tower", "aws-smithy-json", "tower", "aws-http", "meta"]
environment = ["meta"]
sts = ["aws-sdk-sts", "aws-hyper"]
web-identity-token = ["sts", "profile"]
@@ -21,9 +21,9 @@ http-provider = []
# SSO is not supported
sso = []

rustls = ["smithy-client/rustls"]
native-tls = ["smithy-client/native-tls"]
rt-tokio = ["smithy-async/rt-tokio"]
rustls = ["aws-smithy-client/rustls"]
native-tls = ["aws-smithy-client/native-tls"]
rt-tokio = ["aws-smithy-async/rt-tokio"]

# Tokio based DNS-resolver for ECS validation
dns = ["tokio/rt"]
@@ -31,25 +31,25 @@ dns = ["tokio/rt"]
default = ["default-provider", "rustls", "rt-tokio", "dns"]

[dependencies]
aws-sdk-sts = { path = "../../sdk/build/aws-sdk/sts", optional = true }
aws-smithy-async = { path = "../../sdk/build/aws-sdk/aws-smithy-async" }
aws-smithy-client = { path = "../../sdk/build/aws-sdk/aws-smithy-client" }
aws-smithy-types = { path = "../../sdk/build/aws-sdk/aws-smithy-types" }
aws-types = { path = "../../sdk/build/aws-sdk/aws-types" }
smithy-async = { path = "../../sdk/build/aws-sdk/smithy-async" }
smithy-client = { path = "../../sdk/build/aws-sdk/smithy-client" }
smithy-types = { path = "../../sdk/build/aws-sdk/smithy-types" }
tracing = { version = "0.1" }
tokio = { version = "1", features = ["sync"], optional = true }
aws-sdk-sts = { path = "../../sdk/build/aws-sdk/sts", optional = true }
tracing = { version = "0.1" }

# TODO: remove when middleware stacks are moved inside of clients directly
aws-hyper = { path = "../../sdk/build/aws-sdk/aws-hyper", optional = true }

# imds
smithy-http = { path = "../../sdk/build/aws-sdk/smithy-http", optional = true }
smithy-http-tower = { path = "../../sdk/build/aws-sdk/smithy-http-tower", optional = true }
tower = { version = "0.4.8", optional = true }
aws-http = { path = "../../sdk/build/aws-sdk/aws-http", optional = true }
aws-smithy-http = { path = "../../sdk/build/aws-sdk/aws-smithy-http", optional = true }
aws-smithy-http-tower = { path = "../../sdk/build/aws-sdk/aws-smithy-http-tower", optional = true }
aws-smithy-json = { path = "../../sdk/build/aws-sdk/aws-smithy-json", optional = true }
bytes = "1.1.0"
http = "0.2.4"
smithy-json = { path = "../../sdk/build/aws-sdk/smithy-json", optional = true }
tower = { version = "0.4.8", optional = true }

[dev-dependencies]
futures-util = "0.3.16"
@@ -67,4 +67,4 @@ arbitrary = "1.0.2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

smithy-client = { path = "../../sdk/build/aws-sdk/smithy-client", features = ["test-util"] }
aws-smithy-client = { path = "../../sdk/build/aws-sdk/aws-smithy-client", features = ["test-util"] }
+7 −7
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ pub mod region {

/// Default retry behavior configuration provider chain
pub mod retry_config {
    use smithy_types::retry::RetryConfig;
    use aws_smithy_types::retry::RetryConfig;

    use crate::environment::retry_config::EnvironmentVariableRetryConfigProvider;
    use crate::profile;
@@ -148,10 +148,10 @@ pub mod retry_config {
            self
        }

        /// Attempt to create a [RetryConfig](smithy_types::retry::RetryConfig) from following sources in order:
        /// Attempt to create a [RetryConfig](aws_smithy_types::retry::RetryConfig) from following sources in order:
        /// 1. [Environment variables](crate::environment::retry_config::EnvironmentVariableRetryConfigProvider)
        /// 2. [Profile file](crate::profile::retry_config::ProfileFileRetryConfigProvider)
        /// 3. [RetryConfig::default()](smithy_types::retry::RetryConfig::default)
        /// 3. [RetryConfig::default()](aws_smithy_types::retry::RetryConfig::default)
        ///
        /// Precedence is considered on a per-field basis
        ///
@@ -353,18 +353,18 @@ pub mod credentials {
    mod test {
        use tracing_test::traced_test;

        use aws_smithy_types::retry::{RetryConfig, RetryMode};
        use aws_types::credentials::{CredentialsError, ProvideCredentials};
        use aws_types::os_shim_internal::{Env, Fs, TimeSource};
        use smithy_types::retry::{RetryConfig, RetryMode};

        use crate::default_provider::credentials::DefaultCredentialsChain;
        use crate::default_provider::retry_config;
        use crate::provider_config::ProviderConfig;
        use crate::test_case::TestEnvironment;

        use smithy_async::rt::sleep::TokioSleep;
        use smithy_client::erase::boxclone::BoxCloneService;
        use smithy_client::never::NeverConnected;
        use aws_smithy_async::rt::sleep::TokioSleep;
        use aws_smithy_client::erase::boxclone::BoxCloneService;
        use aws_smithy_client::never::NeverConnected;

        /// Test generation macro
        ///
+6 −6
Original line number Diff line number Diff line
@@ -51,12 +51,12 @@ use std::io::ErrorKind;
use std::net::{IpAddr, ToSocketAddrs};
use std::task::{Context, Poll};

use aws_smithy_client::erase::boxclone::{BoxCloneService, BoxFuture};
use aws_smithy_http::endpoint::Endpoint;
use aws_types::credentials;
use aws_types::credentials::{future, CredentialsError, ProvideCredentials};
use http::uri::{InvalidUri, Scheme};
use http::{HeaderValue, Uri};
use smithy_client::erase::boxclone::{BoxCloneService, BoxFuture};
use smithy_http::endpoint::Endpoint;
use tower::{Service, ServiceExt};

use crate::http_provider::HttpCredentialProvider;
@@ -428,11 +428,11 @@ fn tokio_dns() -> Option<DnsService> {

#[cfg(test)]
mod test {
    use aws_smithy_client::erase::boxclone::BoxCloneService;
    use aws_smithy_client::never::NeverService;
    use futures_util::FutureExt;
    use http::Uri;
    use serde::Deserialize;
    use smithy_client::erase::boxclone::BoxCloneService;
    use smithy_client::never::NeverService;
    use tracing_test::traced_test;

    use crate::ecs::{
@@ -447,9 +447,9 @@ mod test {
    use aws_types::os_shim_internal::Env;
    use aws_types::Credentials;

    use aws_smithy_client::test_connection::TestConnection;
    use aws_smithy_http::body::SdkBody;
    use http::header::AUTHORIZATION;
    use smithy_client::test_connection::TestConnection;
    use smithy_http::body::SdkBody;
    use std::collections::HashMap;
    use std::error::Error;
    use std::future::Ready;
Loading