Skip to content
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

aws/endpoints: Fix resolve endpoint with empty region #2911

Merged
merged 4 commits into from Oct 25, 2019

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Oct 25, 2019

Fixes the SDK's behavior when attempting to resolve a service's endpoint when no region was provided. Adds legacy support for services that were able to resolve a valid endpoint. No new service will support resolving an endpoint without an region.

Fixes #2909

Fixes the SDK's behavior when attempting to resolve a service's endpoint
when no region was provided. Adds legacy support for services that were
able to resolve a valid endpoint. No new service will support resolving
an endpoint without an region.

Fixes aws#2909
@jasdel jasdel added the needs-review This issue or pull request needs review from a core team member. label Oct 25, 2019
@jasdel jasdel self-assigned this Oct 25, 2019
@@ -5,7 +5,6 @@ var stsLegacyGlobalRegions = map[string]struct{}{
"ap-south-1": {},
"ap-southeast-1": {},
"ap-southeast-2": {},
"aws-global": {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have been removed? We still set the region to "aws-global" in v3model.go#L115

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this was intentional. The aws-global region already exists in the model, and wasn't really a legacy region. If endpoint were resolved with this region it was resolve to aws-global direclty in the endpoints file.

Comment on lines 626 to 628
// s.Handlers.Validate.PushFront(func(r *request.Request) {
// r.Error = err
// })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Commented out code

jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Oct 25, 2019
Fixes the SDK's endpoint resolve incorrectly resolving endpoints for a
service when the region is empty. Also fixes the SDK attempting to
resolve a service when the service value is empty.

Related to: aws/aws-sdk-go#2911
@jasdel jasdel merged commit 506b1fd into aws:master Oct 25, 2019
@jasdel jasdel deleted the stsUnsetEndpoint branch October 25, 2019 21:33
aws-sdk-go-automation pushed a commit that referenced this pull request Oct 28, 2019
===

### Service Client Updates
* `service/ecr`: Updates service API, documentation, and paginators
  * This release of Amazon Elastic Container Registry Service (Amazon ECR) introduces support for image scanning. This identifies the software vulnerabilities in the container image based on the Common Vulnerabilities and Exposures (CVE) database.
* `service/elasticache`: Updates service API and documentation
  * Amazon ElastiCache adds support for migrating Redis workloads hosted on Amazon EC2 into ElastiCache by syncing the data between the source Redis cluster and target ElastiCache for Redis cluster in real time. For more information, see https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/migrate-to-elasticache.html.
* `service/transfer`: Updates service API and documentation
  * This release adds logical directories support to your AWS SFTP server endpoint, so you can now create logical directory structures mapped to Amazon Simple Storage Service (Amazon S3) bucket paths for users created and stored within the service. Amazon S3 bucket names and paths can now be hidden from AWS SFTP users, providing an additional level of privacy to meet security requirements. You can lock down your SFTP users' access to designated folders (commonly referred to as 'chroot'), and simplify complex folder structures for data distribution through SFTP without replicating files across multiple users.

### SDK Enhancements
* `aws/client`: Add PartitionID to Config ([#2902](#2902))
* `aws/client/metadata`: Add PartitionID to ClientInfo ([#2902](#2902))
* `aws/endpoints`: Add PartitionID to ResolvedEndpoint ([#2902](#2902))

### SDK Bugs
* `aws/endpoints`: Fix resolve endpoint with empty region ([#2911](#2911))
  * Fixes the SDK's behavior when attempting to resolve a service's endpoint when no region was provided. Adds legacy support for services that were able to resolve a valid endpoint. No new service will support resolving an endpoint without an region.
  * Fixes [#2909](#2909)
aws-sdk-go-automation added a commit that referenced this pull request Oct 28, 2019
Release v1.25.20 (2019-10-28)
===

### Service Client Updates
* `service/ecr`: Updates service API, documentation, and paginators
  * This release of Amazon Elastic Container Registry Service (Amazon ECR) introduces support for image scanning. This identifies the software vulnerabilities in the container image based on the Common Vulnerabilities and Exposures (CVE) database.
* `service/elasticache`: Updates service API and documentation
  * Amazon ElastiCache adds support for migrating Redis workloads hosted on Amazon EC2 into ElastiCache by syncing the data between the source Redis cluster and target ElastiCache for Redis cluster in real time. For more information, see https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/migrate-to-elasticache.html.
* `service/transfer`: Updates service API and documentation
  * This release adds logical directories support to your AWS SFTP server endpoint, so you can now create logical directory structures mapped to Amazon Simple Storage Service (Amazon S3) bucket paths for users created and stored within the service. Amazon S3 bucket names and paths can now be hidden from AWS SFTP users, providing an additional level of privacy to meet security requirements. You can lock down your SFTP users' access to designated folders (commonly referred to as 'chroot'), and simplify complex folder structures for data distribution through SFTP without replicating files across multiple users.

### SDK Enhancements
* `aws/client`: Add PartitionID to Config ([#2902](#2902))
* `aws/client/metadata`: Add PartitionID to ClientInfo ([#2902](#2902))
* `aws/endpoints`: Add PartitionID to ResolvedEndpoint ([#2902](#2902))

### SDK Bugs
* `aws/endpoints`: Fix resolve endpoint with empty region ([#2911](#2911))
  * Fixes the SDK's behavior when attempting to resolve a service's endpoint when no region was provided. Adds legacy support for services that were able to resolve a valid endpoint. No new service will support resolving an endpoint without an region.
  * Fixes [#2909](#2909)
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Dec 11, 2019
Fixes the SDK's endpoint resolve incorrectly resolving endpoints for a
service when the region is empty. Also fixes the SDK attempting to
resolve a service when the service value is empty.

Related to: aws/aws-sdk-go#2911
jasdel added a commit to aws/aws-sdk-go-v2 that referenced this pull request Dec 12, 2019
Fixes the SDK's endpoint resolve incorrectly resolving endpoints for a
service when the region is empty. Also fixes the SDK attempting to
resolve a service when the service value is empty.

Related to: aws/aws-sdk-go#2911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review This issue or pull request needs review from a core team member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MissingRegion on S3 GetObject in v1.25.18
2 participants