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

Fix generated errors for some JSON APIs not including message #3089

Merged
merged 7 commits into from
Jan 21, 2020

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jan 20, 2020

Fixes the SDK's generated errors to all include the Message member regardless if it was modeled on the error shape. This fixes the bug identified in #3088 where some JSON errors were not modeled with the Message member. This caused the errors message to be dropped, and not retrievable.

This change also updates the SDK's generated smoke test to expect the Message member of an error unmarshaled not to be empty.

Fixes #3088

Fixes the SDK's generated errors to all include the `Message` member
regardless if it was modeled on the error shape. This fixes the bug
identified in aws#3088 where some JSON errors were not modeled with the
Message member. This caused the errors message to be dropped, and not
retrievable.

This change also updates the SDK's generated smoke test to expect the
Message member of an error unmarshalled not to be empty.
@jasdel jasdel added the needs-review This issue or pull request needs review from a core team member. label Jan 20, 2020
@jasdel jasdel self-assigned this Jan 20, 2020
@bflad
Copy link
Contributor

bflad commented Jan 21, 2020

Thanks so much for this quick fix, @jasdel. I can confirm that using this branch downstream works as expected.

@jasdel jasdel merged commit 6ca8a54 into aws:master Jan 21, 2020
@jasdel jasdel deleted the fixup/GenErrors branch January 21, 2020 23:42
bflad added a commit to hashicorp/terraform-provider-aws that referenced this pull request Jan 23, 2020
Reference: #11682
Reference: aws/aws-sdk-go#3089

The fix for widespread error handling regression was merged upstream into the AWS Go SDK, however there was not a release today on the normal daily release cadence. This pulls in the commit after AWS Go SDK v1.28.7 containing the fix for the missing error messages that was merged yesterday so we can allow the full acceptance test suite to run overnight.

Updated via:

```
go get github.com/aws/aws-sdk-go@6ca8a5496cb4723ad4ef1e6709ed593ea81ce000
go mod tidy
go mod vendor
```

Output from acceptance testing (as a smoke test of the fixed behavior):

```
--- PASS: TestAccAWSCodeBuildProject_basic (37.35s)
```
bflad added a commit to hashicorp/terraform-provider-aws that referenced this pull request Jan 23, 2020
Reference: #11682
Reference: aws/aws-sdk-go#3089

The fix for widespread error handling regression was merged upstream into the AWS Go SDK, however there was not a release today on the normal daily release cadence. This pulls in the commit after AWS Go SDK v1.28.7 containing the fix for the missing error messages that was merged yesterday so we can allow the full acceptance test suite to run overnight.

Updated via:

```
go get github.com/aws/aws-sdk-go@6ca8a5496cb4723ad4ef1e6709ed593ea81ce000
go mod tidy
go mod vendor
```

Output from acceptance testing (as a smoke test of the fixed behavior):

```
--- PASS: TestAccAWSCodeBuildProject_basic (37.35s)
```
aws-sdk-go-automation pushed a commit that referenced this pull request Jan 23, 2020
===

### Service Client Updates
* `service/iam`: Updates service API and documentation
  * This release enables the Identity and Access Management policy simulator to simulate permissions boundary policies.
* `service/rds`: Updates service API, documentation, and paginators
  * This SDK release introduces APIs that automate the export of Amazon RDS snapshot data to Amazon S3. The new APIs include: StartExportTask, CancelExportTask, DescribeExportTasks. These APIs automate the extraction of data from an RDS snapshot and export it to an Amazon S3 bucket. The data is stored in a compressed, consistent, and query-able format. After the data is exported, you can query it directly using tools such as Amazon Athena or Redshift Spectrum. You can also consume the data as part of a data lake solution. If you archive the data in S3 Infrequent Access or Glacier, you can reduce long term data storage costs by applying data lifecycle policies.

### SDK Bugs
* Fix generated errors for some JSON APIs not including a message ([#3089](#3089))
  * Fixes the SDK's generated errors to all include the `Message` member regardless if it was modeled on the error shape. This fixes the bug identified in #3088 where some JSON errors were not modeled with the Message member.
aws-sdk-go-automation added a commit that referenced this pull request Jan 23, 2020
Release v1.28.8 (2020-01-23)
===

### Service Client Updates
* `service/iam`: Updates service API and documentation
  * This release enables the Identity and Access Management policy simulator to simulate permissions boundary policies.
* `service/rds`: Updates service API, documentation, and paginators
  * This SDK release introduces APIs that automate the export of Amazon RDS snapshot data to Amazon S3. The new APIs include: StartExportTask, CancelExportTask, DescribeExportTasks. These APIs automate the extraction of data from an RDS snapshot and export it to an Amazon S3 bucket. The data is stored in a compressed, consistent, and query-able format. After the data is exported, you can query it directly using tools such as Amazon Athena or Redshift Spectrum. You can also consume the data as part of a data lake solution. If you archive the data in S3 Infrequent Access or Glacier, you can reduce long term data storage costs by applying data lifecycle policies.

### SDK Bugs
* Fix generated errors for some JSON APIs not including a message ([#3089](#3089))
  * Fixes the SDK's generated errors to all include the `Message` member regardless if it was modeled on the error shape. This fixes the bug identified in #3088 where some JSON errors were not modeled with the Message member.
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.

AWS Go SDK v1.28.0 Code Generated Error Types Missing Error Message
3 participants