-
Notifications
You must be signed in to change notification settings - Fork 1.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
Error when creating SQS queues with moto #2930
Comments
Hi @PierreKiwi, thanks for reaching out. SQS did in fact change the wire protocol it uses in today's release. The service itself still supports the old and new format for clients, but going forward new releases of Boto3 will only speak to it over a JSON RPC format. My hunch is that moto has hardcoded their SQS mocking to use the old wire format. That should still work with older copies of Boto3, but will need to be updated going forward. For next steps, this should be raised with moto library so it can be addressed for future releases. |
That makes sense. Wanted to report the problem here first as I was not sure how to interpret the format changes. Will open an issue in their tracker (I expect a lot of unit tests to start failing as moto automatically uses the latest version of boto3/botocore). Thanks a lot for your swift response. |
We are getting the same errors for 127, but 1.29.126 works. We are using localstack and are getting this error:
|
We getting the same error, but we use client. This error can be reproduced with this code:
We expect Versions: Python 3.10.10 |
We're getting the same error when using client, reproduced:
As people have pointed out, expected QueueUrl in response. HTTP headers point to a Versions: |
I can call the queue fine with AWS using the request but |
Yes, this issue doesn't even have to do with moto |
Could you clarify this a bit more @joaomaranhao? Are you saying live calls to SQS (not using moto) are no longer returning QueueUrl? |
@nateprewitt internally AWS url in queues are now request-based and not queue-based. So instead of
|
For everyone else, the issue is recorded for the developers of moto in getmoto/moto#6286 and is currently being looked at. While we wait for a resolution there, the short term solution if you're using moto is going to be to pin both boto3 and botocore. Downgrading boto3 by itself won't work because every minor version release will always use the latest version of botocore. We wouldn't recommend pinning to
|
@Ealameda31 we're aware that what's currently in moto won't function correctly with the new format. A lot of pieces are going to be broken. What I do want to get a conclusive answer on though is are you seeing functional differences with calls to the production Amazon SQS service (no mocking)? If that's the case, I'd be very interested to get more details on reproduction. If you can open a new ticket if that's the case and we can start tracking it there. |
I was just saying that the method is not returning "QueueUrl" as documentation says |
Sorry I keep asking the same question but want to make sure we're being exact with the issue. Is this with or without moto? If it's with moto, that's entirely expected with the current breakage. Edit; I saw your edit, thank you! |
Sorry, I was trying to clarify that the issue is indeed moto, AWS requests to production are fine. |
Please note: changes to the SQS protocol were reverted in botocore 1.29.129 |
This issue was remediated for future releases of Boto3 in getmoto/moto#6331. We'll resolve this now that there's a path forward, thanks everyone for your patience. |
Describe the bug
With latest version of botocore (
1.29.127
), my unit tests started to fail when creating a fake SQS queue with moto.It works fine with
1.29.126
though so I suspect 3e1f77d could be the cause of it.Expected Behavior
The fake queue should be created as expected.
Current Behavior
aws_resource_sqs.create_queue(QueueName="OurFakeQueue")
returns an empty dictionary rather than a Queue object.Reproduction Steps
With
pip install boto3==1.26.126 botocore==1.29.126 moto
, the output issqs.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{}
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.29.127
Environment details (OS name and version, etc.)
Darwin lmi-macbookpro183.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
The text was updated successfully, but these errors were encountered: