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(NODE-3767): don't delete dbName if authSource is provided #3055

Merged
merged 5 commits into from Nov 29, 2021
Merged

fix(NODE-3767): don't delete dbName if authSource is provided #3055

merged 5 commits into from Nov 29, 2021

Conversation

avlan
Copy link
Contributor

@avlan avlan commented Nov 26, 2021

Description

What is changing?

dbName option is not going to be deleted when authSource is present in the connection string.

Is there new documentation needed for these changes?

I don't think there is unless this is intentional behaviour.

What is the motivation for this change?

I have noticed that the dbName option is deleted when authSource is being passed in the connection string since version 4.2.0 (after this commit) but I couldn't find any documentation for this neither the MongoDB documentation nor in the MongoDB driver documentation. I thought that this might be a bug since according to those documentations mentioned above, there's no colliding between dbName and authSource and currently both options are allowed.

@avlan avlan marked this pull request as ready for review November 26, 2021 18:19
@lmachens
Copy link

Good job, I faced this issue too when upgrading to 4.2.0.

@nbbeeken nbbeeken self-requested a review November 29, 2021 18:51
@nbbeeken nbbeeken changed the title fix: don't delete dbName if authSource is provided fix(NODE-3767): don't delete dbName if authSource is provided Nov 29, 2021
nbbeeken
nbbeeken previously approved these changes Nov 29, 2021
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the help, I brought over some additional test cases from a more or less duplicate PR so we can get the best of both merged in together.

@nbbeeken nbbeeken added External Submission PR submitted from outside the team Team Review Needs review from team labels Nov 29, 2021
@dariakp dariakp merged commit 0a830e2 into mongodb:main Nov 29, 2021
@avlan avlan deleted the do-not-delete-dbname-if-authsource-is-present branch November 29, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Submission PR submitted from outside the team Team Review Needs review from team
Projects
None yet
4 participants