-
Notifications
You must be signed in to change notification settings - Fork 863
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
[Default Configuration Part 6]: apply default s3 us-east-1 regional setting #2825
[Default Configuration Part 6]: apply default s3 us-east-1 regional setting #2825
Conversation
@@ -40,6 +43,7 @@ | |||
private Region region; | |||
private ProfileFile profileFile; | |||
private String profileName; | |||
private final Map<ServiceMetadataAdvancedOption<?>, Object> advancedOptions = new HashMap<>(); |
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 AttributeMap.Builder work for this?
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.
It does, but the public API ServiceMetadataConfiguration
would need to take AttributeMap or AttributeMap.Builder instead, which is not consistent with ClientOverrideConfiguration#advancedOptions
Line 116 in 040b7fd
public Builder advancedOptions(Map<ServiceMetadataAdvancedOption<?>, ?> advancedOptions) { |
Line 350 in 040b7fd
Builder advancedOptions(Map<SdkAdvancedClientOption<?>, ?> advancedOptions); |
return config.advancedOption(ServiceMetadataAdvancedOption.S3_US_EAST_1_REGIONAL_ENDPOINT) | ||
.filter(REGIONAL_SETTING::equalsIgnoreCase).isPresent(); |
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.
Usually directly-configured options are higher priority than environment variables and system properties. I know in this case it's actually a default instead of a directly configured option (the customer can't configure this directly, right?), but should we name it accordingly to clarify it's the default, not the actual setting?
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.
Yeah, good point. Customers can't configure this if they are using the SDK client. I'll rename it to reflect that it's the default.
Kudos, SonarCloud Quality Gate passed! |
* Add support to generate DefaultsMode and implement configuration resolution (#2781) * [Default Configuration Part 2]:Implement auto mode discovery (#2786) * Implement auto mode discovery * Fix tests on CodeBuild * Address feedback * Add comment and rename misnamed constant * [Default Configuration Part 3]: add defaults from defaults mode to the configuration resolution chain (#2803) * Wiring up configuration * Address comments * Add test * Update debug statement and add singleton for AttributeMap * Add tlsNegotiationTimeout (#2814) * [Default Configuration Part 5]: Move default configuration related classes to aws-core (#2816) * Move default configuration related classes to aws-core * Remove extra space and fix build * [Default Configuration Part 6]: apply default s3 us-east-1 regional setting (#2825) * Add s3 regional setting * Rename option name * Fix checkstyle * Update sdk-default-configuraiton.json * Add changelog entry
…e97599d25 Pull request: release <- staging/2800174d-5f20-472f-8765-cd6e97599d25
ServiceMetadataAdvancedOption
to support configuring s3 use us-east-1 regional setting