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 mongo password authentication #309

Merged
merged 1 commit into from Feb 9, 2018

Conversation

csanquer
Copy link
Contributor

@csanquer csanquer commented Jun 5, 2017

Hi,

With this PR, I fixed the mongo DB user/password authentication and authentication database parameter.

@j-abi
Copy link

j-abi commented Jan 18, 2018

@jaberg Could we include this simple fix in milestone https://github.com/hyperopt/hyperopt/milestone/3 ?

@jaberg jaberg added this to the 2018 release 1 milestone Jan 18, 2018
@jaberg
Copy link
Contributor

jaberg commented Feb 7, 2018

I don't recall this is tested, how should it be tested? Does anyone have an idea how to set up Travis to do this? cc @maxpumperla @michaelmior

@jaberg
Copy link
Contributor

jaberg commented Feb 7, 2018

I imagine this breaks compatibility with some old versions of Mongo, could you provide info on when Mongo started working this new way?

@michaelmior
Copy link
Contributor

AFAICT, it's pymongo which has changed, not MongoDB. If that's the case, I don't think we need to worry about backwards compatibility. People who want to use a new release of hyperopt will just need to install a new pymongo.

@jaberg
Copy link
Contributor

jaberg commented Feb 7, 2018 via email

@michaelmior
Copy link
Contributor

I haven't looked at the tests currently configured, but if we have a test that uses authentication on Travis, this shouldn't be a problem.

@j-abi
Copy link

j-abi commented Feb 8, 2018

I don't think the current tests use any authentication. Actually, I think they do not use the MongoDB service as it is configured in .travis.yml, but (if I understand correctly) rather generate a temporary database locally: https://github.com/hyperopt/hyperopt/blob/master/hyperopt/tests/test_mongoexp.py#L56

As it is now, the Travis build succeeds after rebasing this merge request on the current master, even if we completely remove the MongoDB service in .travis.yml.

Personally, I feel like this is OK for the current release, as it adds authentication support while not breaking anything. Ideally, writing specific tests for MongoDB authentication would require a significant refactoring of test_mongo.exp in order to use the Travis CI service (probably using environment variables) rather than starting a new DB.

@jaberg
Copy link
Contributor

jaberg commented Feb 8, 2018

Thanks for thinking about this @abiteboul I agree with you.

If Travis passes this, let's merge it.

@michaelmior
Copy link
Contributor

This should probably be rebased on top of master. Tests are failing because the Travis config isn't in this branch.

@csanquer
Copy link
Contributor Author

csanquer commented Feb 9, 2018

The branch has been rebased on top of master.

@michaelmior
Copy link
Contributor

Thanks @csanquer! Merging.

@michaelmior michaelmior merged commit 1785e4d into hyperopt:master Feb 9, 2018
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

4 participants