Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zdyxry
Copy link

@zdyxry zdyxry commented May 9, 2022

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.

@@ -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)
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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?

@auvipy auvipy added this to the 5.3 milestone May 15, 2022
@auvipy
Copy link
Member

auvipy commented May 15, 2022

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)
Copy link
Member

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?

Copy link
Member

@thedrow thedrow left a 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

@zdyxry
Copy link
Author

zdyxry commented Apr 14, 2023

@auvipy Hi, Are there any documents about unit tests I can refer to?

@auvipy
Copy link
Member

auvipy commented Apr 15, 2023

@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

@auvipy auvipy modified the milestones: 5.3, 5.3.x Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants