Clone this repo:
  1. a6bade4 Add local server by Paul Hobbs · 7 months ago factory-nami-10715.B firmware-nami-10775.B master release-R67-10575.B release-R68-10718.B release-R69-10895.B stabilize-10569.B stabilize-10575.54.B stabilize-10575.58.B stabilize-10682.B stabilize-10718.71.B stabilize-10866.B stabilize-atlas.10736.B stabilize-atlas.10819.B stabilize-meowth-10574.B stabilize-nocturne.10646.B stabilize-nocturne.10736.B stabilize-nocturne.10819.B stabilize-nocturne.10828.B
  2. b901d2d Add change_source to feature map by Paul Hobbs · 7 months ago
  3. 9c045e9 Fix for nonexistant CLs. by Paul Hobbs · 7 months ago
  4. 899f13f Add more imports required for tests by Paul Hobbs · 7 months ago factory-poppy-10504.B factory-soraka-10323.39.B firmware-kbl-10431.B firmware-poppy-10431.B firmware-scarlet-10388.B release-R65-10323.B release-R66-10452.B stabilize-10323.29.B stabilize-10323.30.B stabilize-10323.31.B stabilize-10323.58.B stabilize-10323.62.B stabilize-10323.67.B stabilize-10443.B stabilize-10452.81.B stabilize-10452.85.B stabilize-10452.90.B stabilize-10452.96.B stabilize-meowth-10444.B
  5. 07f0089 Use absolute imports by Paul Hobbs · 7 months ago

Bad CL Detector

https://chromium.googlesource.com/chromiumos/infra/bad_cl_detector

Purpose:

A system to detect if a given build failure is caused by bad CL.

Getting started

The virtualenv for this project is managed with pipenv. If you don't already have pipenv installed, you can install it with “pip install pipenv”.

Then run:

deactivate  # make sure you are not already in a virtualenv
pipenv --two install
protoc -I=lib/protos --python_out=lib/protos

You can fetch cidb credentials with “cros cidbcreds”. You will need to pass in the db credentials' path to the script.

Training & cross validation

Downloading training data, training a model and cross validating is done by one script:

pipenv run python lib/bad_cl_detector_driver.py --cred-dir=$CRED_DIR

Or, you can enter a virtualenv shell with “pipenv shell”, and then just run python lib/.

Currently this requires word2vec and word2int files to work. Making this self-contained is a work in progress.

Tests

Tests are run with pytest:

pipenv run pytest