-
Notifications
You must be signed in to change notification settings - Fork 188
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
Sourcing service config from the environment. #3493
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. |
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.
Nice work on this!
let profile_value = match (profiles, self.profile_key.as_ref()) { | ||
(Some(profiles), Some(profile_key)) => { | ||
// Check for a service-specific profile key first | ||
let service_config = get_service_config_from_profile( |
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.
I think for the S3 Express properties, the service config lookup needs to be explicitly turned off. Otherwise, this would end up working:
[default]
services = foo
[services foo]
s3 =
s3_disable_express_session_auth = true
Which is unspecified behavior.
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.
I'll add a test ensuring that this isn't the case.
|
||
/// A single profile file within a [`ProfileFiles`] file set. | ||
#[derive(Clone)] | ||
pub(crate) enum ProfileFile { |
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.
Should really consider renaming these things since they're not profile files, but rather, shared config files.
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.
I did a big rename of these and related types. Let me know what you think.
For ease of review, I kept using the same type names as the old ones in aws-config
by using the deprecated type aliases. I can switch them to use the new names, I just thought this might make it easier to understand what's actually changed and what's basically the same after the move+rename
Co-authored-by: John DiSanti <[email protected]>
Co-authored-by: John DiSanti <[email protected]>
I still have at least one test to fix. Otherwise, this is nearly complete. |
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.
Changes look great, handling moving types, leaving [deprecated]
really well! Leaving minor comments while continuing to review testing
...dk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3ExpressDecorator.kt
Outdated
Show resolved
Hide resolved
...dk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3ExpressDecorator.kt
Outdated
Show resolved
Hide resolved
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.
Looks great, and consider this approval from me. Just want to check the status of this comment?
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
#2863
awslabs/aws-sdk-rust#1060
Description
This PR adds a new feature: the ability to source service-specific config from the environment.
This is only supported when creating a service config from an
SdkConfig
. I've posted a guide to our discussions board.This also adds support for setting an endpoint URL in environment config.
Testing
I have written several tests ensuring config is extracted with the correct precedence.
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.