-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Creating of SQS queues with latest botorecore (1.29.127) is broken #6286
Comments
Just wanted to clarify on this point. AWS has only changed the wire format for SQS. Changing the wire protocol for a service is a somewhat large undertaking and we don't do it often. The SQS service itself supports both the old and new API formats so that old SDK clients will continue to work, but new versions of boto* will only ever talk to SQS in the new format. |
We were just bit by this as well and I used an almost identical test script haha. My testing seemed to to indicate that boto3 >= 1.26.0 does not work with any versions of moto, while boto3 1.25.X did work, although maybe the issue was in botocore -- I didn't check the version of that. This is pretty easy to replicate by spinning up a python:3.11 docker container, installing moto and boto3, running the test script, and then switching between different versions of boto3. |
@JayThomason it's botocore - what you're seeing is that boto3 1.26.x will use any available version of botocore that is > 1.29.x and < 1.30.0, whereas boto3 1.15.x will use any available version of botocore that is > 1.28.x and < 1.29.0. So any install of boto3 1.26.x will pick up botocore==1.29.127 (or later) which has the breaking change, whereas any install of boto3 1.25.x will pick up botocore==1.18.5 and work. This was gnarly for me, because all of my requirements.txt specification are on fixed versions, so I was surprised to see builds suddenly failing with no changes made. |
It looks like |
@SamStephens Yes, it turns out that the issue with my project in particular is that it was pinning the version of boto3 but not the version of botocore. |
Which versions supports JSON responses? If we were to swap out all the XML for JSON in moto, what impact will this have on older versions of botocore? We really don't want to push a dependency management mess on everyone. More of a question for @kellertk |
@mikegrima The other SDK's presumably still only support XML, so I feel like we should be supporting both formats. The question in my mind is more - how do we choose which format to return? Can we simply use the ContentType header? I should be able to look into this next week. |
The latest botocore (1.29.127) breaks the way moto creates SQS queues and we need to limit it temporarily so that it will not fail our tests. Related: getmoto/moto#6286 Related: i#31087
I ran an experiment, and I see that It probably doesn't matter, but there's also now an added |
The latest botocore (1.29.127) breaks the way moto creates SQS queues and we need to limit it temporarily so that it will not fail our tests. Related: getmoto/moto#6286 Related: i#31087
@mikegrima We'v reverted changes to SQS in botocore 1.29.129. I think @nateprewitt would have more recommendations on how to manage the different version problem. |
The PR that contains the revert has more information: boto/botocore#2931 Seeing that this format-change in SQS will be re-introduced in the feature, Moto will still need to support it. Marking it as an (lower-priority) enhancement to do so. |
Yes, the Content-Type header would be a reasonable way to determine which response format is valid. Older SDKs will continue to send Edit: botocore==1.29.127 will continue to operate against production SQS in the new format if you need a reference client. Requests should be "round-trippable" at this time. |
I wonder if what we could do in the very short term is just override the header value for all SQS requests (moto side)? Not ideal, but it should buy us some time. |
As part of addressing this, would it be worth adding an general assertion/set of assertions as to the response format returned by botocode? If there had been an assertion that the Content-Type header was |
@mikegrima, the problem is that |
Moto >= 4.1.11.dev7 now also supports both JSON and XML responses. It will return the appropriate format based on the ContentType-header. So when AWS re-enables this feature, we should be ready. |
Thank you for the quick turnaround, @bblommers! Really appreciate it. |
The latest botocore (1.29.127) breaks the way moto creates SQS queues and we need to limit it temporarily so that it will not fail our tests. Related: getmoto/moto#6286 Related: i#31087 GitOrigin-RevId: a6be96d92828a86e982b53646a9e2eeca00a5463
The latest botocore (1.29.127) breaks the way moto creates SQS queues and we need to limit it temporarily so that it will not fail our tests. Related: getmoto/moto#6286 Related: i#31087 GitOrigin-RevId: a6be96d92828a86e982b53646a9e2eeca00a5463
The latest botocore (1.29.127) breaks the way moto creates SQS queues and we need to limit it temporarily so that it will not fail our tests. Related: getmoto/moto#6286 Related: i#31087 GitOrigin-RevId: a6be96d92828a86e982b53646a9e2eeca00a5463
The latest botocore (1.29.127) breaks the way moto creates SQS queues and we need to limit it temporarily so that it will not fail our tests. Related: getmoto/moto#6286 Related: i#31087 GitOrigin-RevId: a6be96d92828a86e982b53646a9e2eeca00a5463
Hello moto team,
Looks like moto is broken with the latest botocore (1.29.127) as AWS has changed the format for interacting with some services (includig SQS). When creating a SQS queue, it returns {} rather than a Queue object (I use a SQS resource).
I have opened an issue in their tracker (see boto/botocore#2930) but it looks like moto might need to make some changes too.
You can reproduce the issue with:
With pip install boto3==1.26.126 botocore==1.29.126 moto, the output is
sqs.Queue(url='https://sqs.us-east-1.amazonaws.com/123456789012/a94c6c')
.With pip install boto3==1.26.127 botocore==1.29.127 moto, the output is
{}
.The text was updated successfully, but these errors were encountered: