-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable hyper1 as default http client #3939
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work updating various places extensively. Looks like need to get through some of CI checks but the changes look good structurally.
// takes precedence over legacy connector if enabled | ||
#[cfg(feature = "default-http-connector")] | ||
let _default = aws_smithy_http_client::default_client(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is clever.
A new generated diff is ready to view.
A new doc preview is ready to view. |
…ttp-client directly
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
Description
default-http-connector
feature toaws-smithy-runtime
that enables hyper 1.x with rustls+aws-lc as the default HTTP client plugin.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.default-http-connector
feature instead of hyper 0.14rustls
feature flag so it has instead been updated to enable thedefault-http-connector
feature.aws-config
to default to hyper1 for the default credentials chain.aws-config
,rustls
andclient-hyper
, that seem to be used entirely to enable theaws-smithy-runtime
featurestls-rustls
andconnector-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 toaws-config
for this,default-http-connector
and updated the existing features to be synonyms. We don't userustls
orhyper 0.14.x
directly inaws-config
so I think this is a more clearly defined flag and conveys it's intent better.legacy-test-util
feature flag toaws-smithy-runtime
. The rationale for this is that thetest-util
feature provides testing utilities for other things fromaws-smithy-runtime
but it also brings in the (now) legacy hyper 0.14 HTTP testing facilities. I've lefttest-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)examples/pokemon-service-common
due to codegen no longer generating clients with theaws-smithy-runtime/tls-rustls
feature enabled by default (they are using theHyperClientBuilder::build_https()
method directly but relying on feature unification to enable the method)Questions
aws-config/default-http-connector
could be more generic likedefault-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.