commit | 42138f03dc0f7811cd87697dbaa1a6d6defb57cf | [log] [tgz] |
---|---|---|
author | Paul Hobbs <phobbs@google.com> | Sat Feb 24 04:20:11 2018 |
committer | chrome-bot <chrome-bot@chromium.org> | Thu Mar 08 08:37:24 2018 |
tree | fdb77e179fa39dc333c3960901d229062eebad9f | |
parent | 25150e6d436868d2c6c71613a6092825f8ace014 [diff] |
Enable Pre-CQ exonerator's cron request When deployed with "gcloud app deploy cron.yaml", this will enable pre-cq exonerator. BUG=chromium:793042 TEST=None Change-Id: I038d6d2346a1f9f9a1c4e95b4d2a3d5aa2753794 Reviewed-on: https://chromium-review.googlesource.com/936681 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Paul Hobbs <phobbs@google.com> Reviewed-by: Paul Hobbs <phobbs@google.com> Reviewed-by: Aviv Keshet <akeshet@chromium.org>
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”.