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

[Lock] MongoDbStore deprecated extracting database/collection from MongoDB connection URI #37188

Closed
wants to merge 1 commit into from

Conversation

kralos
Copy link

@kralos kralos commented Jun 10, 2020

Q A
Branch? master
Bug fix? no
New feature? no
Deprecations? yes
Tickets Fix #37180
License MIT
Doc PR

We should not overload the MongoDB connection URI with a non-standard querysting like collection.

The /path component should only be used for the authentication database, never the default database.

see https://docs.mongodb.com/manual/reference/connection-string/

see #37140 (comment)

@kralos kralos requested a review from jderusse as a code owner June 10, 2020 12:07
@kralos kralos force-pushed the 37180-lock-mongodb-uri branch 2 times, most recently from 4aebca6 to 845adfb Compare June 10, 2020 13:04
@kralos kralos marked this pull request as draft June 10, 2020 13:36
@kralos kralos force-pushed the 37180-lock-mongodb-uri branch 2 times, most recently from 9d4f332 to 6fa11e6 Compare June 10, 2020 14:01
@kralos kralos marked this pull request as ready for review June 10, 2020 14:10
@kralos kralos changed the title #37180 deprecated extracting database/collection from MongoDB connection URI [Lock] MongoDbStore deprecated extracting database/collection from MongoDB connection URI Jun 11, 2020
@nicolas-grekas nicolas-grekas added this to the next milestone Jun 11, 2020
@nicolas-grekas
Copy link
Member

Being able to take full control over the connection setting with a DSN is desired to me. But this doesn't mean this DSN string should be passed as is to the underlying mongo connection object. Instead, we should extract these extra settings and filter them from the uri passed to mongo. Does this make sense?

@kralos kralos marked this pull request as draft June 11, 2020 11:50
@kralos
Copy link
Author

kralos commented Jun 11, 2020

Instead, we should extract these extra settings and filter them from the uri passed to mongo

could do

@fabpot
Copy link
Member

fabpot commented Aug 16, 2020

@kralos Is it still a draft? /cc @jderusse

@kralos
Copy link
Author

kralos commented Aug 16, 2020

@kralos Is it still a draft? /cc @jderusse

No, I think we should close this / don't merge. This was based on jmikola's concerns around non-standard options being part of the mongodb connection string (database and collection). However #37180 provides a middle ground allowing uri only to control down to the collection level without passing custom parameters down to the driver.

Since that is now merged, I'm now closing this ticket.

@kralos kralos closed this Aug 16, 2020
@kralos kralos deleted the 37180-lock-mongodb-uri branch August 17, 2020 23:40
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lock] remove non-standard MongoDbStore URI parameters before passing to driver
4 participants