Metadata-Version: 2.4
Name: db-contrib-tool
Version: 2.2.8
Summary: The `db-contrib-tool` - MongoDB's tool for contributors.
Author: DevProd Correctness
Author-email: devprod-correctness-team@mongodb.com
Requires-Python: >=3.9,<3.14
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: Inject (>=4.3.1,<5.0.0)
Requires-Dist: PyGithub (==1.58.0)
Requires-Dist: PyYAML (>=6.0.1,<7.0.0)
Requires-Dist: boto3 (>=1.34.156,<2.0.0)
Requires-Dist: botocore (>=1.34.156,<2.0.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: distro (>=1.6.0,<2.0.0)
Requires-Dist: evergreen-py (>=3.15.0,<4.0.0)
Requires-Dist: gitpython (>=3.1.44,<4.0.0)
Requires-Dist: oauthlib (>=3.1.1,<4.0.0)
Requires-Dist: opentelemetry-api
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc ; platform_machine != "s390x" and platform_machine != "ppc64le"
Requires-Dist: opentelemetry-sdk
Requires-Dist: packaging (>=25.0,<26.0)
Requires-Dist: pkce (>=1.0.3,<2.0.0)
Requires-Dist: pydantic (>=1.10.26,<2.0.0)
Requires-Dist: pyinstaller (>=6.10,<7.0)
Requires-Dist: requests (>=2.26.0,<3.0.0)
Requires-Dist: requests-oauthlib (>=2.0.0,<3.0.0)
Requires-Dist: retry (>=0.9.2,<0.10.0)
Requires-Dist: structlog (>=23.0.0,<24.0.0)
Requires-Dist: tenacity (>=8.0.1,<9.0.0)
Requires-Dist: urllib3 (>=1.26.0,<2.0.0)
Project-URL: Repository, https://github.com/10gen/db-contrib-tool
Description-Content-Type: text/markdown

# db-contrib-tool

The `db-contrib-tool` - a collection of tooling to support repro environments.

## Description

The command line tool with various subcommands:
- `setup-repro-env`
  - [README.md](src/db_contrib_tool/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
- `setup-mongot-repro-env`
  - [README.md](src/db_contrib_tool/setup_mongot_repro_env/README.md)
  - Downloads and installs particular Mongot versions into install directory.
- `symbolize`
  - [README.md](src/db_contrib_tool/symbolizer/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

- Python 3.9 or later (python3 from the [MongoDB Toolchain](https://github.com/10gen/toolchain-builder/blob/master/INSTALL.md) is highly recommended)

## Installation

Make sure [dependencies](#dependencies) are installed.
Use [pipx](https://pypa.github.io/pipx/) to install db-contrib-tool that will be available globally on your machine:

```bash
python3 -m pip install pipx
python3 -m pipx ensurepath
```

Installing db-contrib-tool:

```bash
python3 -m pipx install db-contrib-tool
```

Upgrading db-contrib-tool:

```bash
python3 -m pipx upgrade db-contrib-tool
```

In case of installation errors, some of them may be related to pipx and could be fixed by re-installing pipx.

Removing pipx completely (WARNING! This will delete everything that is installed and managed by pipx):

```bash
python3 -m pip uninstall pipx
rm -rf ~/.local/pipx  # in case you're using the default pipx home directory
```

Now you can try to install again from scratch.

## Usage

Print out help message:

```bash
db-contrib-tool --help
```

Download and install the v8.0 mongo binary:
```sh
db-contrib-tool setup-repro-env 8.0
```

Download other accompanying artifacts with flags:
```sh
db-contrib-tool setup-repro-env 8.0 \
  --downloadSymbols \
  --downloadArtifacts \
  --downloadPythonVenv
```

Download latest binary from the 10gen/mongo master branch:
```sh
db-contrib-tool setup-repro-env master
```

There are more ways to specify binary versions - see [setup_repro_env/README.md](src/db_contrib_tool/setup_repro_env/README.md).

# Contributing

See [./CONTRIBUTING.md](./CONTRIBUTING.md) on details for development on this project.

