Skip to main content

The `db-contrib-tool` - MongoDB's tool for contributors.

Project description

db-contrib-tool

The db-contrib-tool - MongoDB's tools for contributors.

Table of contents

Description

The command line tool with various subcommands:

  • bisect - performs an evergreen-aware git-bisect to find the 'last passing version' and 'first failing version' of mongo
  • setup-repro-env
    • README.md
    • downloads and installs:
      • particular MongoDB versions
      • debug symbols
      • artifacts (including resmoke, python scripts etc)
      • python venv for resmoke, python scripts etc
  • symbolize
    • README.md
    • Symbolizes stacktraces from recent mongod and mongos binaries compiled in Evergreen, including patch builds, mainline builds, and release/production builds.
    • Requires authenticating to an internal MongoDB symbol mapping service.

Dependencies

Installation

Make sure dependencies are installed. Use pipx to install db-contrib-tool that will be available globally on your machine:

$ python3 -m pip install pipx
$ python3 -m pipx ensurepath

Installing db-contrib-tool:

$ python3 -m pipx install db-contrib-tool

Upgrading db-contrib-tool:

$ python3 -m pipx upgrade db-contrib-tool

Usage

Print out help message:

$ db-contrib-tool -h

More information on the usage of setup-repro-env can be found here.

Contributor's Guide (local development)

Install project dependencies

This project uses poetry for dependency management.

$ poetry install

Run command line tool (local development)

$ ENV=DEV poetry run db-contrib-tool -h

Run linters

$ poetry run isort src tests
$ poetry run black src tests

Run tests

$ poetry run pytest

Pre-commit

This project has pre-commit configured. Pre-commit will run configured checks at git commit time.
To enable pre-commit on your local repository run:

$ poetry run pre-commit install

To run pre-commit manually:

$ poetry run pre-commit run

Testing changes in mongo

This tool is used to help run tests in the mongodb/mongo repository. On occasion, it may be desirable to run a mongodb-mongo-* patch build with in-flight changes to this repository. The following steps can be take to accomplish that.

  • Create a branch with the changes you wish to test.

  • Push the branch to the origin repository: git push -u origin <branch_name>.

  • In the "mongo" repository, edit the evergreen/prelude_db_contrib_tool.sh to install from the git repository instead of from pypi:

    pipx install "git+ssh://git@github.com/<user_name>/db-contrib-tool.git@<branch_name>" || exit 1
    
  • Create a patch build.

The patch build should now pull down the changes from your branch instead of using the published db-contrib-tool.

Note: Since the db-contrib-tool is pulled from your branch, if you need to make additional changes to the tool, you can just push to the branch and then restart the desired tasks. There is no need to create an additional patch build unless you also need to make updates to the mongo repository.

Test pipx package

Pipx installation recommendations can be found in installation section.
The tool can be installed via pipx from your local repo:

$ python3 -m pipx install /path/to/db-contrib-tool

Versioning

This project uses semver for versioning. Please include a description what is added for each new version in CHANGELOG.md.

Code Review

Please open a Github Pull Request for code review. This project uses the Evergreen Commit Queue. Add a PR comment with evergreen merge to trigger a merge.

Deployment

Deployment to pypi is automatically triggered on merges to main.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

db_contrib_tool-0.6.2.tar.gz (50.6 kB view details)

Uploaded Source

Built Distribution

db_contrib_tool-0.6.2-py3-none-any.whl (63.0 kB view details)

Uploaded Python 3

File details

Details for the file db_contrib_tool-0.6.2.tar.gz.

File metadata

  • Download URL: db_contrib_tool-0.6.2.tar.gz
  • Upload date:
  • Size: 50.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.2 Linux/4.15.0-1044-aws

File hashes

Hashes for db_contrib_tool-0.6.2.tar.gz
Algorithm Hash digest
SHA256 c4d2c81f8fa01fe0c4307fc4e8e166f7afbb2ef1d10020e13ef8ec87882683d6
MD5 e4e7b3509b6976021f23aa6b4394d61c
BLAKE2b-256 c4b0850caa627411ba2b59fec212bb468aeb31d9282be6f364732f8f03236622

See more details on using hashes here.

File details

Details for the file db_contrib_tool-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: db_contrib_tool-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 63.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.2 Linux/4.15.0-1044-aws

File hashes

Hashes for db_contrib_tool-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4e1d9ef9ef5dc9ee6933443de379a9ab6f8d7fb11b5c22941ed87611c8fe576
MD5 f0f2e5f1a3fcda50d34528a86c03f8c8
BLAKE2b-256 3500ee3188d26cff2fc0671a824b7de49ad7a7a74785ec42af589b5b90120d76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page