fix(11576): fixing bug in standardqueue put message
Motivation
Raising a fix for an open issue in SQS flow of Localstack. Fixes #11576
Changes
There was a bug in Localstack SQS put message in Standard SQS flow. Principally, standard SQS put calls do not support messagegroupid parameter to be passed. Current implementation of localstack allows "" ie empty string to be passed as messagegroupid while publishing to localstack, whereas same api request to actual AWS sqs throws an exception. Added an additional check in code which checks messagegroupid should not be any string ( having values or empty ) in case of standard sqs put message. If the parameter is an instance of the string, throw exception
All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.
I have read the CLA Document and I hereby sign the CLA
Hi @thrau , @baermat , @gregfurman Could you please add the semver: patch label to this PR? It contains a small, backward-compatible bug fix. I don't see the access to be able to add the labels. Thank you!
@thrau Pushed the snapshot tests
Hey @kshitijkohli 😄
When you ran your parity test, did you remember to point your client to snapshot against AWS? The relevant snippet of the contributing docs that Thomas linked is the How to write Parity tests:
Run the test against AWS: use the parameter
--snapshot-update(or the environment variableSNAPSHOT_UPDATE=1) and set the environment variable asTEST_TARGET=AWS_CLOUD.
In addition, this section on Integration Testing (against AWS) is definitely also relevant!
Once you've setup your testing suite to be able to snapshot against AWS, you can run the test again with those flags enabled:
make TEST_TARGET=AWS_CLOUD SNAPSHOT_UPDATE=1 TEST_PATH="tests/aws/services/sqs/test_sqs.py::TestSqsProvider::test_send_message_to_standard_queue_with_empty_message_group_id"
Otherwise, I'd also be happy to generate the snapshot for you and push to your feature branch if that's something you'd prefer 🙂