Clone this repo:
  1. 55604ba Add trivial pre-cq e2e test by Paul Hobbs · 4 months ago factory-nami-10715.B firmware-nami-10775.B master release-R68-10718.B release-R69-10895.B stabilize-10682.B stabilize-10718.71.B stabilize-10866.B stabilize-atlas.10736.B stabilize-atlas.10819.B stabilize-nocturne.10646.B stabilize-nocturne.10736.B stabilize-nocturne.10819.B stabilize-nocturne.10828.B
  2. 5b4a952 Remove pytest-mocker by Paul Hobbs · 4 months ago
  3. 910fdb2 innocent_cls_precq: No rate limit during off-peak by Paul Hobbs · 4 months ago
  4. f8c7afb gerrit_cq: Respect Verified-1 by Paul Hobbs · 4 months ago
  5. 3d422a4 innocent_cls_cq: Don't ignore CLs with newer picked_up action by Paul Hobbs · 4 months ago

CL Exonerator

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

Purpose:

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).

Credentials

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_annotator credentials.

Development

Local deployment is done by creating a virtualenv with pipenv:

# pipsi is a nice python utility for installing other python scripts in their
# own virtualenvs, so you don't get version conflicts between the various
# scripts installed on your system.
sudo `which pip` install pipsi
pipsi install pipenv
pipenv install --dev
pipenv shell

Tests are run with pytest:

pipenv run pytest exonerator

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.

Deployment

CL-Exonerator is deployed to the google.com:chromiumos-cl-exonerator project. Before deploying, make sure you have activated it as your default project with gcloud:

gcloud config set project chromiumos-cl-exonerator

Then deploy with the ./deploy_app script:

pipenv shell
./deploy_app
  • 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”.