| Index: appengine/findit/waterfall/schedule_try_job_pipeline.py
|
| diff --git a/appengine/findit/waterfall/schedule_try_job_pipeline.py b/appengine/findit/waterfall/schedule_try_job_pipeline.py
|
| index c57a85fbdd1f1dfe52a3c2618848ae9f4399f185..a29ca3d4f6c3086a46f3ca90320dec0864b2c727 100644
|
| --- a/appengine/findit/waterfall/schedule_try_job_pipeline.py
|
| +++ b/appengine/findit/waterfall/schedule_try_job_pipeline.py
|
| @@ -6,6 +6,7 @@ from common.pipeline_wrapper import BasePipeline
|
| from common.pipeline_wrapper import pipeline
|
| from common.waterfall import buildbucket_client
|
| from model.wf_try_job import WfTryJob
|
| +from model.wf_try_job_data import WfTryJobData
|
| from waterfall import buildbot
|
| from waterfall import waterfall_config
|
| from waterfall.try_job_type import TryJobType
|
| @@ -62,11 +63,24 @@ class ScheduleTryJobPipeline(BasePipeline):
|
| 'Error "%s" occurred. Reason: "%s"' % (error.message, error.reason))
|
|
|
| try_job_result = WfTryJob.Get(master_name, builder_name, build_number)
|
| + build_id = build.id
|
| +
|
| if try_job_type == TryJobType.COMPILE:
|
| - try_job_result.compile_results.append({'try_job_id': build.id})
|
| + try_job_result.compile_results.append({'try_job_id': build_id})
|
| else:
|
| - try_job_result.test_results.append({'try_job_id': build.id})
|
| - try_job_result.try_job_ids.append(build.id)
|
| + try_job_result.test_results.append({'try_job_id': build_id})
|
| + try_job_result.try_job_ids.append(build_id)
|
| try_job_result.put()
|
|
|
| - return build.id
|
| + # Create a corresponding WfTryJobData entity to capture as much metadata as
|
| + # early as possible.
|
| + try_job_data = WfTryJobData.Create(build_id)
|
| + try_job_data.master_name = master_name
|
| + try_job_data.builder_name = builder_name
|
| + try_job_data.build_number = build_number
|
| + try_job_data.try_job_type = try_job_type
|
| + try_job_data.has_compile_targets = bool(compile_targets)
|
| + try_job_data.has_heuristic_results = bool(suspected_revisions)
|
| + try_job_data.put()
|
| +
|
| + return build_id
|
|
|