-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable hyper1 as default http client (#3939)
## Motivation and Context * #1925 * awslabs/aws-sdk-rust#977 ## Description * Add a new `default-http-connector` feature to `aws-smithy-runtime` that enables hyper 1.x with rustls+aws-lc as the default HTTP client plugin. * If both the legacy `connector-hyper-014-x` feature is enabled the new feature takes precedence such that the default HTTP client plugin favors hyper 1 if both features are enabled. * Update codegen to enable the new `default-http-connector` feature instead of hyper 0.14 * NOTE: we can't break the existing `rustls` feature flag so it has instead been updated to enable the `default-http-connector` feature. * Importantly this still uses rustls as the TLS provider but the crypto provider now defaults to aws-lc (which is coincidentally what rustls now defaults to as well). This is likely to break _someone_ somewhere due to build requirements changing (e.g. CMake now be required on certain platforms or other build tools needed). * Updated `aws-config` to default to hyper1 for the default credentials chain. * We have two features in `aws-config`, `rustls` and `client-hyper`, that seem to be used entirely to enable the `aws-smithy-runtime` features `tls-rustls` and `connector-hyper-0-14-x` features (both are required for the default HTTP client plugin to work prior to this PR). I think the _intent_ behind these features was "the user is not providing an HTTP client explicitly so we need a default one to be available". I've added a new feature to `aws-config` for this, `default-http-connector` and updated the existing features to be synonyms. We don't use `rustls` or `hyper 0.14.x` directly in `aws-config` so I think this is a more clearly defined flag and conveys it's intent better. * Added a new `legacy-test-util` feature flag to `aws-smithy-runtime`. The rationale for this is that the `test-util` feature provides testing utilities for other things from `aws-smithy-runtime` but it also brings in the (now) legacy hyper 0.14 HTTP testing facilities. I've left `test-util` to mean what it does today and be backwards compatibile (for now anyway) and in future we can ship a (breaking) change to disable the legacy test utils by default (and by extension stop compiling the legacy hyper ecosystem in all of our tests) * Fixed an issue in `examples/pokemon-service-common` due to codegen no longer generating clients with the `aws-smithy-runtime/tls-rustls` feature enabled by default (they are using the `HyperClientBuilder::build_https()` method directly but relying on feature unification to enable the method) ## Questions * Bikeshed any feature flag names. e.g. `aws-config/default-http-connector` could be more generic like `default-providers` or something. Today we use it to mean "we need a default HTTP client" but you can imagine a future where we need other default runtime components to exist and be configured. Perhaps that is what we want from this flag? ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
- Loading branch information
Showing
60 changed files
with
990 additions
and
722 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.