commit | 5936ef9e3d57b3cf8835502a3cc138396618e70c | [log] [tgz] |
---|---|---|
author | Paul Hobbs <phobbs@google.com> | Wed Apr 11 03:35:12 2018 |
committer | Paul Hobbs <phobbs@google.com> | Fri Apr 13 18:07:17 2018 |
tree | a02227e873a71baa738a54773d3b975356ab1f84 | |
parent | 7f4dd591c6f45f8ffc670346fb156a9985c582f5 [diff] |
checkpointlib: Move checkpoint helper function This will be used by innocent_cls_cq.py as well, so move it into its own module. TEST=innocent_cls_precq_test BUG=chromium:828590 Change-Id: I33372eb4f80ce8d6e92f82c5a119e58fd74c43e1
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 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
Then, install the Google App Engine SDK and either symlink it or copy it into the virtualenv.
Tests are run with pytest. Some tests require a chroot (the tests inheriting from cidb_integration_test.CIDBIntegrationTest). Enter the chroot with “cros chroot.” The virtualenv will need to be created inside the chroot for the tests 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.
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
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”.