How to checkout code and make change?

Follow the general infra development flow here

How to deploy to appengine?

For testing on the staging app, deploy to infra/appengine/predator/scripts/ deploy-test-staging

For staging test on the product app, deploy to infra/appengine/predator/scripts/ deploy-test-prod

For release, deploy to infra/appengine/predator/scripts/ deploy-prod Please carefully follow the messages by the script for the deployment.


(1) Internal dashboards to monitor all the results: Clusterfuzz (aarya@, mbarbella@): Fracas (jchinlee@): Cracas (ivanpe@): UMA Sampling Profiler (wittman@):

(2) Monitor metrics using vicerory dashboards: go/predator-metrics

Testing and Debug

(1) How to run unittests?

From command line, run: infra/appengine/predator/scripts/ test

If a code path branch is not tested and no line number is shown in the command line output, you could check the code coverage report shown in the output.

(2) How to run Predator service locally?

From command line, run: infra/appengine/predator/scripts/ run

Then open http://localhost:8080 for the home page.

(3) How to run Predator on a real crash testcase?

Given the urlsafe encoding of the key of a CrashAnalysis(The urlsafe encoding can be found in dashboards for client, you can search by signature of this crash in dashboards), we can run local code of Predator on this crash.

For example: For a clusterfuzz crash: The key is ahFzfnByZWRhdG9yLWZvci1tZXJBCxITQ2x1c3RlcmZ1enpBbmFseXNpcyIoZDNhN2RhNDcyYzE2YmQ5ODkwMWM2ZjhjNmUwNWQ1YjIxMzU1ZDA2Mww Given the key, we can run local command: infra/appengine/predator/scripts/run-predator -k ahFzfnByZWRhdG9yLWZvci1tZXJBCxITQ2x1c3RlcmZ1enpBbmFseXNpcyIoZDNhN2RhNDcyYzE2YmQ5ODkwMWM2ZjhjNmUwNWQ1YjIxMzU1ZDA2Mww -v

In this way, we can experiment local changes using real testcases.

Debug: you can set breakpoint anywhere when running Predator using this script by: import pdb; pdb.set_trace()