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 serialization for sqs http calls #10732
Conversation
LocalStack Community integration with Pro 2 files ±0 2 suites ±0 1h 36m 56s ⏱️ - 1m 52s Results for commit 38a9aad. ± Comparison against base commit 0f7d49f. This pull request removes 5 and adds 7 tests. Note that renamed tests count towards both.
This pull request skips 1 test.
♻️ This comment has been updated with latest results. |
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.
Whoof, that must have been terrible to pin down! Really great catch! Thanks a lot for tackling this! 🦸🏽
The implementation looks good (as good as it can be on my initial hacky solution), the AWS validated test is great to avoid a regression in the future, and to have a kick-start when tackling the other issue you detected. 🚀
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.
Tested and works great, also via the dev endpoint. Thanks @baermat, nice job tracking this down! 💯
Motivation
When performing API calls for sqs like "ReceiveMessage" directly via HTTP outside the CLI, the response was malformed. It was malformed in general, and had an additional error for json messages. This PR addresses these issues.
Changes
TODO
What's left to do:
{Messages:[{<msg_1>}, {<msg_2>}, ...]}
but we return{Message:{<msg_1>}}
if there is one message, and{Message:[{<msg_1>}, {<msg_2>}, ...]}
if there are more than one (note the missing plural s of Message). AWS' response is also different with a "direct" http call, but it is only the case that is different ("Messages" vs "messages"). How to proceed here? It seems to be an error in the automatic response creation of LS