Added "MaybeExonerate" for marking CLs with CQ+1

TEST=None
BUG=chromium:756762

Change-Id: I3666cb65b426295935c46fb65d88d5b5bbf74212
3 files changed
tree: af2a573173ac4c20e590c6537d1f731f03376980
  1. .gitignore
  2. PRESUBMIT.cfg
  3. README.md
  4. app.yaml
  5. cron.py
  6. cron.yaml
  7. dev_requirements.txt
  8. exonerator/
  9. gunicorn.conf.py
  10. locked_requirements.txt
  11. main.py
  12. pytest.ini
  13. requirements.txt
README.md

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 run “cros cidbcreds --folder=creds/cidb” to fetch the credentials.

Development

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 link it into the virtualenv. Assuming the google appengine SDK is installed at $GAE, run

ln -s $GAE/* env/lib/python2.7/site-packages

Tests are run with pytest. Start a development server with gunicorn -c gunicorn.conf.py -b :8080 main:app and visit localhost:8080 in your web browser.

Deployment

Run “gcloud app deploy” after copying cidb creds to creds/cidb (see the [Credentials][#Credentials] section)