-
Notifications
You must be signed in to change notification settings - Fork 197
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
create an IdentityCache by default when on latest BehaviorVersion #3578
create an IdentityCache by default when on latest BehaviorVersion #3578
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
0834574
to
83290df
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
@@ -238,14 +239,14 @@ mod loader { | |||
use crate::provider_config::ProviderConfig; | |||
|
|||
#[derive(Default, Debug)] | |||
enum CredentialsProviderOption { | |||
/// No provider was set by the user. We can set up the default credentials provider chain. | |||
enum TriStateOption<T> { |
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.
We used to have a TriState in aws-smithy-types. You could consider resurrecting that if you want to, but doesn't matter to me either way since this is private.
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.
If we have need for another tri-state then we can move it but for now I think I'd keep it private.
/// .await; | ||
/// # } | ||
/// ``` | ||
pub fn no_identity_cache(mut self) -> Self { |
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.
Does this behave differently from loader.identity_cache(IdentityCache::no_cache())
?
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.
Yes. IdentityCache::no_cache()
is still an explicit cache being set whereas no_identity_cache()
leaves it as "explicitly unset" so as to not enable the default cache. Open to bikeshedding on naming and how to best avoid confusion here.
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.
Discussed offline and decided to remove this API for now as it can always be added later and users can still control this by setting a different cache per/client.
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 This PR is the combination of two previously reviewed PRs that both enable new behaviors behind a new Behavior Major Version (BMV): * #3527 * #3578 ## Description * Enables stalled stream protection by default on latest behavior version. * Enables creation of a default identity cache. ## Testing All testing done on prior PRs. See for details. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: John DiSanti <jdisanti@amazon.com> Co-authored-by: ysaito1001 <awsaito@amazon.com>
This PR is the combination of two previously reviewed PRs that both enable new behaviors behind a new Behavior Major Version (BMV): * smithy-lang#3527 * smithy-lang#3578 * Enables stalled stream protection by default on latest behavior version. * Enables creation of a default identity cache. All testing done on prior PRs. See for details. <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: John DiSanti <jdisanti@amazon.com> Co-authored-by: ysaito1001 <awsaito@amazon.com>
## Motivation and Context This PR is the combination of two previously reviewed PRs that both enable new behaviors behind a new Behavior Major Version (BMV): * smithy-lang/smithy-rs#3527 * smithy-lang/smithy-rs#3578 ## Description * Enables stalled stream protection by default on latest behavior version. * Enables creation of a default identity cache. ## Testing All testing done on prior PRs. See for details. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: John DiSanti <jdisanti@amazon.com> Co-authored-by: ysaito1001 <awsaito@amazon.com>
Motivation and Context
Original issue: #3427
RFC: #3544
Description
Make
ConfigLoader
create anIdentityCache
by default when on the latestBehaviorVersion
. This will allow SDK clients created fromSdkConfig
to share a cache by default instead of creating one per/client.Checklist
CHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.