-
Notifications
You must be signed in to change notification settings - Fork 653
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
Bad request when describe key pairs with empty filters slice #2624
Comments
This is normal request response:
for go.mod:
|
I can see that newest version added param filter, which is empty:
while for old version request looks like:
|
Okay, I've found a root cause and potential fix for this: old code:
new code:
|
Example programm to test it
|
So, this is how this function looked like in 1.22.2
and this is how it looks like in 1.26.1
|
now I get it, this error starts from ec2 version:
where this correct handling of nil slice was introduced. |
Maybe it makes sense to serialize empy, but not nil slices to empty array like |
Hi @stgleb , Thanks for the details. I'm looking into this with priority. Ran |
Hi @stgleb , Thanks for your patience. After inspecting this issue, we have determined that is likely related to this issue. The SDK for Go recently updated its serialization strategy to more closely follow the EC2 wire protocol specifications. This update changed how empty lists are serialized within API requests. Previously, empty lists were not serialized at all, effectively omitting them from requests. The new updated causes the SDK to now explicitly serializes empty lists, ensuring that they are included in the request body even when they contain no elements. Issue with
|
The change we previously made to serialize empty lists should have only applied to awsQuery services, not ec2Query. Will be resolved by addressing #2627. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
We should keep this open for visibility/searchability until the upstream issue is resolved. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
After upgrading
github.com/aws/aws-sdk-go-v2
to the latest version start getting 400 Bad Request on describe key pairs.Expected Behavior
Describe keys pairs gives successfull response.
Current Behavior
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
1.22
Operating System and version
23.1.0 Darwin Kernel Version 23.1.0
The text was updated successfully, but these errors were encountered: