-
-
Notifications
You must be signed in to change notification settings - Fork 928
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 mongodb connection parameters not passed correctly #1549
base: main
Are you sure you want to change the base?
Conversation
@@ -313,6 +313,7 @@ def _parse_uri(self, scheme='mongodb://'): | |||
if self.connect_timeout else None), | |||
} | |||
options.update(parsed['options']) | |||
options.update(client.transport_options) |
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 please add test for the proposed change?
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.
OK, i will add test later.
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 address the tests please?
also integration tests are failing |
@@ -313,6 +313,7 @@ def _parse_uri(self, scheme='mongodb://'): | |||
if self.connect_timeout else None), | |||
} | |||
options.update(parsed['options']) | |||
options.update(client.transport_options) |
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 address the tests please?
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.
Please add test coverage to the proposed fix
@auvipy Hi, Are there any documents about unit tests I can refer to? |
you can found existing tests here https://github.com/celery/kombu/blob/main/t/unit/transport/test_mongodb.py |
In Kombu 3.x versions, the MongoDB transport allows accepting the Celery
transport_options
parameters(BROKER_TRANSPORT_OPTIONS) as connection parameters.In #537 , removed support for parameter passing, maybe we should add it back.