-
Notifications
You must be signed in to change notification settings - Fork 55
fix: remove InvalidChangeBatch customization #1435
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
Conversation
|
A new generated diff is ready to view. |
This comment has been minimized.
This comment has been minimized.
|
A new generated diff is ready to view. |
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.
Suggestion: Mentioning #242 in the PR description for more context
Suggestion: Adding XML syntax highlighting in the PR description
<?xml version="1.0"?>\n
<ErrorResponse
xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidChangeBatch</Code>
<Message>[Tried to delete resource record set [name='test.blerg.com.', type='CNAME'] but the values provided do not match the current values, Tried to create resource record set [name='test.blerg.com.', type='CNAME'] but it already exists]</Message>
</Error>
<RequestId>ca6b6a9b-f2be-44c9-8d94-f7dfb3448d10</RequestId>
</ErrorResponse>| { | ||
| "id": "a9deee4f-8f15-472c-906f-492066275178", | ||
| "type": "bugfix", | ||
| "description": "Remove Route53 InvalidChangeBatch customization", |
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: It would be more descriptive to mention that the customization deals with error responses, e.g. Remove Route53 InvalidChangeBatch error response customization
This comment has been minimized.
This comment has been minimized.
ianbotsf
left a comment
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.
+1 to Omar's suggestions
Additionally, how easy/hard would it be to create an E2E test which verifies we correctly deserialize this exception from a real service response? Maybe it's hard but it seems to me such a test would've caught this behavior change earlier and could help guard against a future change.
|
A new generated diff is ready to view. |
|
A new generated diff is ready to view. |
This comment has been minimized.
This comment has been minimized.
|
A new generated diff is ready to view. |
This comment has been minimized.
This comment has been minimized.
|
A new generated diff is ready to view. |
This comment has been minimized.
This comment has been minimized.
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.
Suggestion: This test might break if Route53 changes their exception message format. I think we could get rid of the exception message assertion, and we would still be verifying that the exception was deserialized correctly.
| assertNotNull(exception.message) | ||
| assertContains(exception.message, "[Tried to delete resource record set [name='test.blerg.com.', type='CNAME'] but it was not found, RRSet with DNS name test.blerg.com. is not permitted in zone this-is-a-test-hosted-zone-for-aws-sdk-kotlin.com., RRSet of type CNAME with DNS name test.blerg.com. is not permitted as it creates a CNAME loop in the zone.]") |
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: Asserting on specific exception messages which we do not control is brittle and prone to breakage. Simply deserializing the correct exception should be sufficient for our testing. Users should be catching/handling exceptions based on type anyways—not based on message.
|
|
A new generated diff is ready to view. |
Affected ArtifactsChanged in size
|



Route53 no longer returns non-standard InvalidChangeBatch errors, they take the standard form:
Issue #
Description of changes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.