-
-
Notifications
You must be signed in to change notification settings - Fork 973
fix: default value for SQS's receive message #2405
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
base: main
Are you sure you want to change the base?
Conversation
After celery#2300, `MessageAttributeNames` and `MessageSystemAttributeNames` had `None` as default values, but `None` is not a valid value for those fields. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs/client/receive_message.html This commit suggests adding `['All']` as the new default value for those fields following the error message below and the docs above. Closes celery#2403
auvipy
left a comment
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.
can you also add additional tests to verify the change?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2405 +/- ##
=======================================
Coverage 81.16% 81.16%
=======================================
Files 77 77
Lines 9719 9719
Branches 1095 1095
=======================================
Hits 7888 7888
Misses 1625 1625
Partials 206 206 ☔ View full report in Codecov by Sentry. |
It is tricky because the test uses a mock class for the queue object (the one receiving these attributes in a |
|
the tests seems to be failing as assertion error |
|
still some failing test t/unit/transport/test_SQS.py::test_Channel::test_messages_to_python FAILED [ 47%] =================================== FAILURES =================================== self = <t.unit.transport.test_SQS.test_Channel object at 0x7fcb024e7ec0>
t/unit/transport/test_SQS.py:532: self = <t.unit.transport.test_SQS.SQSClientMock object at 0x7fcadaf81b50>
E AssertionError: assert False t/unit/transport/test_SQS.py:131: AssertionError -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html |
After #2300,
MessageAttributeNamesandMessageSystemAttributeNameshadNoneas default values, butNoneis not a valid value for those fields. See:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs/client/receive_message.html
This commit suggests adding
['All']as the new default value for those fields following the error message below and the docs above.Closes #2403