Skip to content

only call SetAttributes() when attrMap not empty #442

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

Merged
merged 1 commit into from
May 15, 2023

Conversation

jaypipes
Copy link
Collaborator

@jaypipes jaypipes commented May 2, 2023

For SQS's CreateQueue API, if you pass an empty map to the CreateQueueInput.SetAttributes() method, everything succeeds however the service will return the following cryptic error message:

MalformedInput: End of list found where not expected

This patch updates the generated code for attribute-based APIs to only call SetAttributes() on the input shape when there are attributes to set.

Issue aws-controllers-k8s/community#1695

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For SQS's `CreateQueue` API, if you pass an empty map to the
`CreateQueueInput.SetAttributes()` method, everything succeeds however
the service will return the following cryptic error message:

`MalformedInput: End of list found where not expected`

This patch updates the generated code for attribute-based APIs to only
call `SetAttributes()` on the input shape when there are attributes to
set.

Issue aws-controllers-k8s/community#1695

Signed-off-by: Jay Pipes <[email protected]>
@ack-prow ack-prow bot requested review from jljaco and vijtrip2 May 2, 2023 18:46
@ack-prow ack-prow bot added the approved label May 2, 2023
@jaypipes jaypipes requested review from RedbackThomson and a-hilaly and removed request for vijtrip2 May 2, 2023 18:46
Copy link
Member

@a-hilaly a-hilaly 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!

@a-hilaly
Copy link
Member

a-hilaly commented May 2, 2023

Looks like s3-controller-test is flaky
/retest

@a-hilaly
Copy link
Member

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2023
@ack-prow
Copy link

ack-prow bot commented May 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: A-Hilaly, jaypipes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot merged commit 440b484 into aws-controllers-k8s:main May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants