-
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
re-add support for sourcing endpoint URLs from service-specific env config #3568
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. |
/// | ||
/// This is used internally to understand how to merge config structs while | ||
/// respecting precedence of origins. | ||
pub fn insert_origin(&mut self, setting: &'static str, origin: Origin) { |
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.
correctness: Do we want this to be mutable after it is built into SdkConfig
?
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.
Good question. I think so, but I'm not sure. For now, I'll make it so that:
- SdkConfig's Builder exposes an
insert_origin
method. - SdkConfig itself only exposes a way to check origins.
We can add other stuff later if/when we need it.
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.
The changes look great. I'll probably go through one more round to be sure.
A new generated diff is ready to view.
A new doc preview is ready to view. |
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt
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. |
Lastly, we probably need to have a changelog entry that revises or corrects release notes that we put out in https:/awslabs/aws-sdk-rust/releases/tag/release-2024-04-08 and the discussion topic, since the support is currently for endpoint url. |
I updated the discussion. I think the Changelog entry is fine:
|
The service env config work I did was flawed in that it didn't respect the precedence of programmatic config. This PR
adds a way of tracking the precedence up to the point of converting the SdkConfig into a service config. Now, env config will only be resolved when config was not set programmatically. I added tests to
aws-config
for the origin tracking to ensure it works.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.