-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
allow auth option #1529
allow auth option #1529
Conversation
@vkarpov15 looks like this breaks all the builds! In my recent commit I did support merging user-provided options with the |
Funny, the tests did pass locally for me. I'll debug in a bit but I'm curious about your recent commit. Is there already a way to pass username and password with options rather than through URI? That's all I want to get out of this PR, there's just no documentation on how to do so. |
@yeah, that commit explicitly resolved this ticket: https://jira.mongodb.org/browse/NODE-1052. We were documenting that we supported There is not currently a way to do what you're asking for here, I think you'd have to |
I took a closer look and haven't been able to figure out why my tests succeed locally but fail on travis. Any hints on how I might be able to repro test failures locally or fix the issue that's causing the tests to fail? |
@vkarpov15 truly bizarre. I have the same experience on my mac, as well as a number of linux VMs.. I put together a variant of your test, just copying and pasting the whole test with a few replacements and it worked that way: https://travis-ci.org/mongodb/node-mongodb-native/builds/252444817 Sorry for the trouble, but we're in the process of heavily grooming the tests for the driver right now. One of our interns is writing a mocha compat layer right now, so we'll be switching away from integra and hopefully catching a lot of small issues in the process. |
@vkarpov15 also, I modified the actual test as follows:
The original way you were testing was with |
@vkarpov15 would you mind refactoring the tests to reflect the changes I suggested? We can merge this as soon as it passes CI |
@mbroadst so I made those changes and a few more, but still have not been able to figure out why auth fails on travis but not locally. I added a print statement and it looks like the Also, I'm gonna be in NYC later this week, we should grab a coffee. Shoot me an email, [email protected]. |
@vkarpov15 sorry for the trouble, I think this is related to some problems with integra. The change I was referring to is generally encapsulated in this commit. Specifically, I think what you haven't tried yet is fully splitting the tests into two separate test cases, rather than using |
Thanks for the suggestion, looks like the tests passed ☝️ what a weird issue 🤕 |
@vkarpov15 hooray 🎉 |
🎉 any ETA on the next release? |
@vkarpov15 I'll be releasing 2.2.31 by EOW, just want to provide a little more time for some potential fixes. |
Based on my reading of
url_parser.js
looks like there's no reason whyauth
isn't a supported option. Having support for this option would be very helpful for issues like Automattic/mongoose#5419, otherwise we'd have to mutate the user-provided URI or ask users to not use those options anymore.