Clone this repo:
  1. 29ec8f7 local_server: Add --port option. by Paul Hobbs · 3 months ago factory-scarlet-10211.B firmware-scarlet-10388.B master release-R65-10323.B
  2. d028360 Make _ShouldBeMarkedReady more robust. by Paul Hobbs · 3 months ago
  3. 4e05886 Replace requirements.txt with Pipfile by Paul Hobbs · 3 months ago release-R64-10176.B stabilize-10176.13.B stabilize-10176.47.B stabilize-10176.54.B stabilize-10176.58.B stabilize-10176.65.B
  4. 4708332 exonerator.gerrit: Add FailedToApply check. by Paul Hobbs · 3 months ago
  5. 7f11914 exonerator.gerrit: Add more safety checks by Paul Hobbs · 3 months ago

CL Exonerator


This app finds CLs which were incorrectly blamed for a CQ failure, and re-marks them as CQ-ready. It does this by polling cidb‘s buildMessageTable for finalize messages, then finds CLs which were blamed in the build’s annotatations and marks them as CQ+1 in Gerrit (if they haven't already been).


Create a “creds” folder, then:

  • For local development, run “cros cidbcreds --folder=creds/cidb” to fetch the readonly credentials.

  • For deploying to production, see go/cros-cidb-admin and get the prod_cidb_gen2_bot credentials.


Local deployment is done by creating a virtualenv from requirements.txt:

virtualenv --python=`which python2` en
source env/bin/activate
pip install -r dev_requirements.txt

Then, install the Google App Engine SDK and either symlink it or copy it into the virtualenv. Assuming the google appengine SDK is installed at $GAE, run

cp -r $GAE/* env/lib/python2.7/site-packages

Tests are run with pytest. Some tests require a chroot; enter with “cros chroot.” The virtualenv will need to be created inside the chroot, or with “virtualenv --relocateable” for this to work.

Start a development server with bin/local_server and run curl -u admin http://localhost:8080/cls?type=pending to see a list of pending CLs.


  • Debug environment:

Run ./deploy_app --debug=True after copying or symlinking debug_cidbi_gen2_bot creds into ./creds/cidb.dbg (see the [Credentials][#Credentials] section)

  • Production:

Run “./deploy_app” after copying or symlinking prod_cidb_gen2_bot creds into “./creds/cidb”.