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

private/model: enable endpoint discovery when region is set to empty string #3349

Merged

Conversation

skotambkar
Copy link
Contributor

  • Allow endpoint discovery when config region is set to an empty string
  • Updates documentation

@skotambkar skotambkar requested a review from jasdel June 2, 2020 08:57
Copy link
Contributor

@jasdel jasdel left a comment

Choose a reason for hiding this comment

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

Looks good, just needs a changelog entry for the bugfix

@skotambkar
Copy link
Contributor Author

updated with changelog

@skotambkar skotambkar force-pushed the fix/endpointDiscoveryForEmptyRegionSet branch from 8b5a793 to 1efaa1f Compare June 3, 2020 18:14
@skotambkar skotambkar merged commit e5f91be into aws:master Jun 3, 2020
@skotambkar skotambkar deleted the fix/endpointDiscoveryForEmptyRegionSet branch June 3, 2020 21:43
aws-sdk-go-automation pushed a commit that referenced this pull request Jun 4, 2020
===

### Service Client Updates
* `service/ec2`: Updates service API
  * New C5a instances, the latest generation of EC2's compute-optimized instances featuring AMD's 2nd Generation EPYC processors. C5a instances offer up to 96 vCPUs, 192 GiB of instance memory, 20 Gbps in Network bandwidth; New G4dn.metal bare metal instance with 8 NVIDIA T4 GPUs.
* `service/lightsail`: Updates service API and documentation
  * This release adds the BurstCapacityPercentage and BurstCapacityTime instance metrics, which allow you to track the burst capacity available to your instance.
* `service/mediapackage-vod`: Updates service API and documentation
* `service/meteringmarketplace`: Updates service documentation
  * Documentation updates for meteringmarketplace
* `service/ssm`: Updates service API and documentation
  * SSM State Manager support for executing an association only at specified CRON schedule after creating/updating an association.

### SDK Bugs
* `private/model`: Fixes SDK not enabling endpoint discovery when endpoint is set to empty string ([#3349](#3349))
aws-sdk-go-automation added a commit that referenced this pull request Jun 4, 2020
Release v1.31.11 (2020-06-04)
===

### Service Client Updates
* `service/ec2`: Updates service API
  * New C5a instances, the latest generation of EC2's compute-optimized instances featuring AMD's 2nd Generation EPYC processors. C5a instances offer up to 96 vCPUs, 192 GiB of instance memory, 20 Gbps in Network bandwidth; New G4dn.metal bare metal instance with 8 NVIDIA T4 GPUs.
* `service/lightsail`: Updates service API and documentation
  * This release adds the BurstCapacityPercentage and BurstCapacityTime instance metrics, which allow you to track the burst capacity available to your instance.
* `service/mediapackage-vod`: Updates service API and documentation
* `service/meteringmarketplace`: Updates service documentation
  * Documentation updates for meteringmarketplace
* `service/ssm`: Updates service API and documentation
  * SSM State Manager support for executing an association only at specified CRON schedule after creating/updating an association.

### SDK Bugs
* `private/model`: Fixes SDK not enabling endpoint discovery when endpoint is set to empty string ([#3349](#3349))
tabboud added a commit to tabboud/aws-sdk-go that referenced this pull request Jul 14, 2020
The following PR changed the Endpoint behavior to include falling back to the default generated endpoint if an empty string is set. 
aws#3349

It's not very clear that this is the intended behavior when reading the docs. Adding this clarification promotes using the following code rather than have to conditionally check if it's set or not.
For example:
```go
// ideal behavior
sess, err := session.NewSession(&aws.Config{
	Endpoint: aws.String(s3Cfg.Endpoint),
	Region:   aws.String(s3Cfg.Region),
})

// required check given docs assumption
var endpoint *string
if s3Cfg.Endpoint != "" {
	endpoint = aws.String(s3Cfg.Endpoint)
}
sess, err := session.NewSession(&aws.Config{
	Endpoint: endpoint,
	Region:   aws.String(s3Cfg.Region),
})
```
jasdel pushed a commit that referenced this pull request Jul 16, 2020
The following PR changed the Endpoint behavior to include falling back to the default generated endpoint if an empty string is set.

#3349

It's not very clear that this is the intended behavior when reading the docs. Adding this clarification promotes using the following code rather than have to conditionally check if it's set or not.

For example:
```go
// ideal behavior
sess, err := session.NewSession(&aws.Config{
	Endpoint: aws.String(s3Cfg.Endpoint),
	Region:   aws.String(s3Cfg.Region),
})

// required check given docs assumption
var endpoint *string
if s3Cfg.Endpoint != "" {
	endpoint = aws.String(s3Cfg.Endpoint)
}
sess, err := session.NewSession(&aws.Config{
	Endpoint: endpoint,
	Region:   aws.String(s3Cfg.Region),
})
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants