-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 or non-zero
upon failure. The --script
will be run from within the build/resmoke-bisect/{version_id}
directory described below.
set -e
python buildscripts/resmoke.py run --suites=sharding ./jstests/sharding/shard_aware_init.js
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 {version_id}
is the github repo and bisect_venv
is the virtual environment:
bisect_venv {version_id}
This is what the build/resmoke-bisect/{version_id}
directory may look like - where the binaries are downloaded.
all_feature_flags.txt compile_expansions.yml etc jstests mongoauditdecrypt mongocryptd mongodecrypt mongoldap mongos mqlrun wt
buildscripts dist-test evergreen mongo mongobridge mongod mongokerberos mongoqd mongotmock src
The --script
is run from within this build/resmoke-bisect/{version_id}
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 are 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