Pull requests are always welcome, and the MongoDB engineering team appreciates any help the community can give to make the MongoDB tools better.
For any particular improvement you want to make, you can begin a discussion on the MongoDB Developers Forum. This is the best place to discuss your proposed improvement (and its implementation) with the core development team.
If you're interested in contributing, we have a list of some suggested tickets that are easy enough to get started on here
- Create a MongoDB JIRA account.
- Create a Github account.
- Fork the repository on Github at https://github.com/mongodb/mongo-tools.
- For more details see http://www.mongodb.org/about/contributors/.
- Submit a pull request against the project for review. Note: if you are a MongoDB engineer, please use the internal code review tool instead of github.
- File a JIRA ticket in the TOOLS project.
- All commit messages to the MongoDB Tools repository must be prefaced with the relevant JIRA ticket number e.g. "TOOLS-XXX add support for xyz".
In filing JIRA tickets for bugs, please clearly describe the issue you are resolving, including the platforms on which the issue is present and clear steps to reproduce.
For improvements or feature requests, be sure to explain the goal or use case, and the approach your solution will take.
All commits to the MongoDB Tools repository must pass golint:
go run vendor/src/github.com/3rf/mongo-lint/golint/golint.go mongo* bson* common/*
We use a modified version of golint
To run unit and integration tests:
go test -v -test.types=unit,integration
This should be run in all package directories - common, mongorestore, mongoexport, etc.
The test.types
flag indicates what kinds of tests to run. Integration tests require a mongod
(running on port 33333) while unit tests do not.
To run the quality assurance tests, you need to have the latest stable version of the rebuilt tools, mongod
, mongos
, and mongo
in your current working directory.
cd test/qa-tests
python buildscripts/smoke.py bson export files import oplog restore stat top
Some tests require older binaries that are named accordingly (e.g. mongod-2.4
, mongod-2.6
, etc). You can use setup_multiversion_mongodb.py to download those binaries