-
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
Remove ProviderConfig as the configuration source for AssumeRoleProvider #3014
Conversation
panic!("don't call me — will be overridden"); | ||
#[allow(unreachable_code)] | ||
Ok(Credentials::for_tests()) |
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.
panic!("don't call me — will be overridden"); | |
#[allow(unreachable_code)] | |
Ok(Credentials::for_tests()) | |
panic!("don't call me — will be overridden") |
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.
you need this for inference
@@ -602,4 +602,22 @@ impl SdkConfig { | |||
pub fn builder() -> Builder { | |||
Builder::default() | |||
} | |||
|
|||
/// Convert this [`SdkConfig`] back to a builder to enable modification | |||
pub fn to_builder(self) -> Builder { |
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 awesome!
The to_builder()
on the generated configs takes &self
rather than self
. Should this be consistent?
@@ -51,6 +51,11 @@ impl StaticTimeSource { | |||
pub fn new(time: SystemTime) -> Self { | |||
Self { time } | |||
} | |||
|
|||
/// Creates a new static time source from the provided number of seconds since the UNIX epoch | |||
pub fn new_from_epoch(epoch_secs: u64) -> 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.
This is called from_secs
on our DateTime. Should we use the same name here?
a59412c
to
df9496a
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
b795ee7
to
22f1b4b
Compare
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.
Less mental cost with ProviderConfig
gone. Thanks for adding examples.
Motivation and Context
AssumeRoleProvider
currently usesProviderConfig
as a source of configuration, but that API is hard use and not intended for external consumption.This fixes the Assume Role issue but only for
AssumeRoleProvider
Description
Update the API (see changelog) to be more ergonomic and derive configuration from
SdkConfig
instead.Testing
Existing tests + new unit tests
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.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.