commit | 7d4792cb0002c9bd24c1ee654217850dcb06d482 | [log] [tgz] |
---|---|---|
author | Paul Hobbs <phobbs@google.com> | Sat Mar 10 20:38:50 2018 |
committer | Paul Hobbs <phobbs@google.com> | Wed Apr 11 19:42:12 2018 |
tree | 5dec3cdc0e419fb7ca9a037d1d3d6507df4c9a88 | |
parent | cffe145f9877e427fb030b9f0b0dcf484dc87549 [diff] |
precq_flake: Forgive only builds that failed alone. If a patchset failed more than one pre-cq build config, it probably wasn't failing due to flake. BUG=chromium:820230 TEST=None Change-Id: I784d3fc23644b0ed41dd25f9cf74f0e6580f1781
https://chromium.googlesource.com/chromiumos/infra/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.
Run ./deploy_app --debug=True after copying or symlinking debug_cidbi_gen2_bot creds into ./creds/cidb.dbg (see the [Credentials][#Credentials] section)
Run “./deploy_app” after copying or symlinking prod_cidb_gen2_bot creds into “./creds/cidb”.