-
Notifications
You must be signed in to change notification settings - Fork 1k
Deprecate IS_DISCOVERED_ENDPOINT, add SKIP_ENDPOINT_RESOLUTION attribute #7061
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
base: feature/master/pre-signed-url-getobject
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ private static SdkHttpFullRequest modifyEndpointHostIfNeeded(SdkHttpFullRequest | |
| ClientExecutionParams executionParams) { | ||
| if (executionParams.discoveredEndpoint() != null) { | ||
| URI discoveredEndpoint = executionParams.discoveredEndpoint(); | ||
| executionParams.putExecutionAttribute(SdkInternalExecutionAttribute.IS_DISCOVERED_ENDPOINT, true); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also keep the IS_DISCOVERED_ENDPOINT write for cross-module compatibility? If a customer pins new sdk-core with an older service module, that module's generated endpointIsDiscovered() only checks the old attribute, which would cause unexpected behavior. |
||
| executionParams.putExecutionAttribute(SdkInternalExecutionAttribute.SKIP_ENDPOINT_RESOLUTION, true); | ||
| return originalRequest.toBuilder().host(discoveredEndpoint.getHost()).port(discoveredEndpoint.getPort()).build(); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,13 @@ public void endpointIsDiscovered_attrIsTrue_returnsTrue() { | |
| assertThat(AwsEndpointProviderUtils.endpointIsDiscovered(attrs)).isTrue(); | ||
| } | ||
|
|
||
| @Test | ||
| public void skipEndpointResolution_skipAttrIsTrue_returnsTrue() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a test for missing attributes for this? |
||
| ExecutionAttributes attrs = new ExecutionAttributes(); | ||
| attrs.putAttribute(SdkInternalExecutionAttribute.SKIP_ENDPOINT_RESOLUTION, true); | ||
| assertThat(AwsEndpointProviderUtils.skipEndpointResolution(attrs)).isTrue(); | ||
| } | ||
|
|
||
| @Test | ||
| public void disableHostPrefixInjection_attrIsFalse_returnsFalse() { | ||
| ExecutionAttributes attrs = new ExecutionAttributes(); | ||
|
|
||
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.
nit: this comment reads a bit funny