-
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
Remove obsolete endpoint logic code #3680
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"core": { | ||
"changeLogMessages": [ | ||
"Remove obsolete endpoint logic code", | ||
"Remove obsolete global ClockSkew property" | ||
], | ||
"type": "patch", | ||
"updateMinimum": true | ||
} | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,9 @@ namespace <#=this.Config.Namespace#> | |
ClientConfig = this, | ||
OriginalRequest = parameters.Request, | ||
Request = new DefaultRequest(parameters.Request, ServiceId) | ||
{ | ||
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. Not related to this PR, but what's the use case for 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. It is being used in scenarios like RDS and DocDB where they support copying a database from a different region. This code path is getting triggered by the changes In V3 the URL for the presigned URL was being generated by the old obsolete method that didn't use EP 2.0. |
||
AlternateEndpoint = parameters.AlternateEndpoint | ||
} | ||
}; | ||
|
||
var executionContext = new Amazon.Runtime.Internal.ExecutionContext(requestContext, null); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
using System.Linq; | ||
using System.Text; | ||
using System.Globalization; | ||
using Amazon.Internal; | ||
using Amazon.Util; | ||
using Amazon.Runtime.Internal.Util; | ||
using Amazon.Runtime.Endpoints; | ||
|
@@ -636,12 +635,6 @@ public static string DetermineSigningRegion(IClientConfig clientConfig, | |
// client config properties. | ||
if (alternateEndpoint != null) | ||
{ | ||
#pragma warning disable CS0612,CS0618 | ||
var serviceEndpoint = alternateEndpoint.GetEndpointForService(serviceName, clientConfig.ToGetEndpointForServiceOptions()); | ||
#pragma warning restore CS0612,CS0618 | ||
if (serviceEndpoint.AuthRegion != null) | ||
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. It was safe to remove the |
||
return serviceEndpoint.AuthRegion; | ||
|
||
return alternateEndpoint.SystemName; | ||
} | ||
|
||
|
@@ -667,16 +660,6 @@ public static string DetermineSigningRegion(IClientConfig clientConfig, | |
var endpoint = clientConfig.RegionEndpoint; | ||
if (endpoint != null) | ||
{ | ||
#pragma warning disable CS0612,CS0618 | ||
var serviceEndpoint = endpoint.GetEndpointForService(serviceName, clientConfig.ToGetEndpointForServiceOptions()); | ||
if (!string.IsNullOrEmpty(serviceEndpoint.AuthRegion)) | ||
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. It was safe to remove the |
||
return serviceEndpoint.AuthRegion; | ||
|
||
// Check if the region is overridden in the endpoints.json file | ||
var overrideRegion = RegionEndpoint.GetRegionEndpointOverride(endpoint); | ||
if (overrideRegion != null) | ||
return overrideRegion.SystemName; | ||
#pragma warning restore CS0612,CS0618 | ||
return endpoint.SystemName; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,10 +76,8 @@ public virtual Uri DetermineEndpoint(IRequestContext requestContext) | |
|
||
public static Uri DetermineEndpoint(IClientConfig config, IRequest request) | ||
{ | ||
Uri endpoint = request.AlternateEndpoint != null | ||
? new Uri(ClientConfig.GetUrl(config, request.AlternateEndpoint)) | ||
: new Uri(config.DetermineServiceOperationEndpoint( | ||
new ServiceOperationEndpointParameters(request.OriginalRequest)).URL); | ||
Uri endpoint = new Uri(config.DetermineServiceOperationEndpoint( | ||
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. I was able to get rid of the |
||
new ServiceOperationEndpointParameters(request.OriginalRequest, request.AlternateEndpoint)).URL); | ||
|
||
return InjectHostPrefix(config, request, endpoint); | ||
} | ||
|
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.
There's an extra
;
here, I ran the generator and the resolvers ended up with;;
at the end: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.
Removed the extra
;