autotest: Add job_id to suite report.
While the job_id is stored as part of the key, datastore cannot
perform a query based on it without knowing the full ancestor.
Add the job_id so it can be explicitly searched for without knowing
the build and stage ids.
BUG=chromium:641093
TEST=dump_suite_report
Change-Id: Ib8810a0b5b33eb96e4020dbcfd5976710ea338e8
Reviewed-on: https://chromium-review.googlesource.com/464366
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: David Riley <davidriley@chromium.org>
Tested-by: David Riley <davidriley@chromium.org>
diff --git a/server/lib/suite_report.py b/server/lib/suite_report.py
index 00b0f0b..7a1b5f8 100644
--- a/server/lib/suite_report.py
+++ b/server/lib/suite_report.py
@@ -109,6 +109,7 @@
job.name.split('/')[-1], status, start_time,
finish_time=finish_time, parent=parent)
+ entry['job_id'] = int(job.id)
if dut:
entry['dut'] = dut
if job.shard: