Add more fields to try-results --json for WPT importer
Context: The WPT importer consumes the JSON produced by
git cl try-results is consumed and uses it to determine
when the CQ has passed (whether all non-experimental cq
jobs were successful) and where layout test results are
stored.
Added fields:
created_ts: This could be used to sort builds by time.
tags: Includes user_agent tag and experimental tag, as well as
experimental: whether the job is experimental
Bug: 792652
Change-Id: Ic6099a21b21db668b88b1a8e54aefd84529a2a91
Reviewed-on: https://chromium-review.googlesource.com/819573
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 171e2fd..e7d5c26 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -716,14 +716,18 @@
"""
def convert_build_dict(build):
+ """Extracts some of the information from one build dict."""
+ parameters = json.loads(build.get('parameters_json', '{}')) or {}
return {
'buildbucket_id': build.get('id'),
- 'status': build.get('status'),
- 'result': build.get('result'),
'bucket': build.get('bucket'),
- 'builder_name': json.loads(
- build.get('parameters_json', '{}')).get('builder_name'),
+ 'builder_name': parameters.get('builder_name'),
+ 'created_ts': build.get('created_ts'),
+ 'experimental': build.get('experimental'),
'failure_reason': build.get('failure_reason'),
+ 'result': build.get('result'),
+ 'status': build.get('status'),
+ 'tags': build.get('tags'),
'url': build.get('url'),
}