-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Evergreen Aware Git Bisect
bisect
will print the last known passing version and first known failing version of mongo for a --branch
, --variant
and --lookback
period, with respect to a user provided shell --script
.
bisect
can be invoked from within the mongo repo like so:
buildscripts/resmoke.py bisect
--branch ["master", "v5.1", "v5.0", etc.]
--variant ["enterprise-rhel-80-64-bit-dynamic-required", "ubuntu1804-debug-asan", etc.]
--lookback [30, 90, 180, etc]
--script [shell script to indicate presence of bug]
--python-installation [(optional) path to python3.7+]
To use this command, all that is needed is to write the shell --script
which runs against a mongo version and returns 0
upon successful execution. The --script
will be run from within the build/resmoke-bisect
directory described below.
All versions for the given --branch
, --variant
and --lookback
period are fetched from Evergreen.
The repo, binaries, artifacts and virtual environment are downloaded to the build/resmoke-bisect
directory for the middle version. This is what the build/resmoke-bisect
directory may look like — where mongo_repo
is the github repo and bisect_venv
is the virtual environment:
bisect_venv mongo_repo mongobridge mongod mongokerberos
mongoqd mongotmock wt mongo mongoauditdecrypt
mongocryptd mongodecrypt mongoldap mongos mqlrun
The --script
is run from within this build/resmoke-bisect
directory. If it completes successfully, bisect
continues on newer versions. Else, if it fails, bisect
continues on older versions. This is repeated until the algorithm completes.
The last known passing version and first known failing version print to stdout
-
This
bisect
command assumes a perfect partition between passing & failing versions. ie:[Pass, Pass, Pass, Fail, Fail, Fail]
. If there is not a perfect partition, this command will not work as expected. If there is not a perfect partition, try modifying the--lookback
period or shell--script
. -
Bisecting to beyond a year may not be supported since Evergreen artifacts are only stored for a year.
-
Older versions will have different syntax, so you may need to run
resmoke.py
instead ofresmoke.py run
if the latter fails in the shell script.
buildscripts/resmoke.py bisect --help
Getting started
Building
Testing
- Running Tests
- Writing Tests
- Writing Function-level Benchmarks
- Writing JavaScript Integration-level Performance Tests
- Running Bisect
- Running Minimized Jstestfuzz Tests
- Testing with Antithesis
Testing in Evergreen
Code Style
Server Internals