angler-fishThe Vulnerability History Project

tools/android/loading Improve logging of failures

      Adds a failure database that keeps track of various failures:
- trace generation failure,
- TaskQueue failure,
- worker.py starting up with an dirty state, most likely
  because it crashed and was restarted.

The trace database is uploaded to Cloud Storage.

As part of this CL, some code from _ProcessClovisTask() is
split to a separate function _HandleTraceGenerationResults(),
to make the code cleaner.

The &quotautorestart&quot parameter for supervisor is changed
to &quotunexpected&quot so that the worker script is restarted
only if it crashed, and not if it exits cleanly.
This avoids the worker to be restarted if there are no
tasks to process, which has the side effect of triggering
a &quotstartup_with_dirty_state&quot error.

The &quotdestruct_instance_name&quot config field is split in
&quotinstance_name&quot (string) and &quotself_destruct&quot (bool).
&quottrace_database_filename&quot is removed and is now inferred
from the instance name.

Review-Url: https://codereview.chromium.org/1930223003
Cr-Commit-Position: refs/heads/master@{#391203}
    
commit 8cc5d09a2b6230b88b6e0a747f59e277a22ba145
+6 -6
-39
+5 -5
+35 -106
-9
expand_less