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 SQS JSON protocol support in ASF #8268
Conversation
LocalStack Community integration with Pro 2 files ±0 2 suites ±0 1h 25m 8s ⏱️ + 18m 49s Results for commit 3c5a78f. ± Comparison against base commit 74c336c. This pull request skips 1 test.
♻️ This comment has been updated with latest results. |
… (similar to s3.test.js) This is mostly complete. There are a few XXXs to deal with. The blocker for now is, IIUC, that localstack doesn't currently support SQS using the JSON protocol -- see localstack/localstack#8268
23b9a90
to
51b202c
Compare
4ed60c7
to
fc3c9c4
Compare
2af9e09
to
9f8be23
Compare
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.
Thanks so much @bentsku for finalizing the PR and figuring out the nitty gritty details of the remaining test failures! 🦸🏽
From my perspective, this PR is ready to be merged as it is, but I would like to get another pair of eyes from @dominikschubert or @thrau before merging this.
I'm not happy with some of the changes in here (like the hacky "provider alias"), but I think we can iron these things out in a follow-up.
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.
LGTM, Thanks so much @alexrashed and @bentsku for getting this over the line so quickly!
It's probably not going to be the only case where they'll make the switch to JSON I guess 😞
As @bentsku said, any typos, etc. can be removed in a follow-up. First let's get this merged 🚀
Looks like this change has broke the localstack SQS usage for us due to the service name change from |
Hello @ilia-beliaev-miro, this is an unexpected outcome and we will fix it with #9607. Sorry for the issue, you can declare both service names for now, but it should be fixed by the end of the day! |
This PR aims at providing JSON support for SQS. AWS supports both protocols,
query
andjson
, for SQS for some time.1.27.127
of botocore (the official AWS Python SDK clients) the protocol of the SQS service spec has changed fromquery
tojson
: boto/botocore@23950121.27.129
this change reverted it again: Revert SQS protocol changes boto/botocore#29311.31.81
the switch was reintroduced and the issue effects us again: boto/botocore@84c78472023-11-09
, the JSON protocol is generally available as announced in this AWS blogpostInitially explored solution:
botocore
internally.x-amzn-query-error
, as implemented in Fetch query compatible error from header to support service boto/botocore#2768Implement tests which ensure that both, query-protocol and json-protocol requests and responses can be sent for SQS.Fix all other tests that might break with the upgrade of botocore.Try to make SQS tests protocol agnostic, and the parser tests protocol specific (try not to depend on botocore spec protocol)As it turns out this solution is not feasible, because the JSON specification removed a lot of information from the spec which is used to properly parse and serialize the requests and responses.
This means that there is no other alternative than handling two different specifications.
New solution
botocore
internally.localstack.aws.data
.extra search path
inbotocore
when loading the specifications.sqs-query
.What's left to do:
json
protocol based SDK. Would be nice to implement soon.