Chromium Code Reviews| Index: appengine/findit/waterfall/try_job_util.py |
| diff --git a/appengine/findit/waterfall/try_job_util.py b/appengine/findit/waterfall/try_job_util.py |
| index 7273548b062a647cf0164c986d2f3ef8abcd2f86..ea73b0af394e49ab69f0e6bcdc1f11fb62c9ebc0 100644 |
| --- a/appengine/findit/waterfall/try_job_util.py |
| +++ b/appengine/findit/waterfall/try_job_util.py |
| @@ -132,14 +132,14 @@ def _GetFailedTargetsFromSignals(signals, master_name, builder_name): |
| return compile_targets |
| -def _GetSuspectsForCompileFailureFromHeuristicResult(heuristic_result): |
| - suspected_revisions = [] |
| +def _GetSuspectsFromHeuristicResult(heuristic_result): |
| + suspected_revisions = set() |
| if not heuristic_result: |
| - return suspected_revisions |
| + return list(suspected_revisions) |
| for failure in heuristic_result.get('failures', []): |
| - if failure['step_name'] == constants.COMPILE_STEP_NAME: |
| - suspected_revisions = [c['revision'] for c in failure['suspected_cls']] |
| - return suspected_revisions |
| + for cl in failure['suspected_cls']: |
| + suspected_revisions.add(cl['revision']) |
|
stgao
2016/04/28 22:25:49
Have you considered organizing suspected CLs by st
chanli
2016/04/28 22:43:18
I have thought about it. But I think the accuracy
|
| + return list(suspected_revisions) |
| def ScheduleTryJobIfNeeded(failure_info, signals, heuristic_result): |
| @@ -170,9 +170,7 @@ def ScheduleTryJobIfNeeded(failure_info, signals, heuristic_result): |
| compile_targets = (_GetFailedTargetsFromSignals( |
| signals, master_name, builder_name) |
| if try_job_type == TryJobType.COMPILE else None) |
| - suspected_revisions = ( |
| - _GetSuspectsForCompileFailureFromHeuristicResult(heuristic_result) |
| - if try_job_type == TryJobType.COMPILE else None) |
| + suspected_revisions = _GetSuspectsFromHeuristicResult(heuristic_result) |
| pipeline = ( |
| swarming_tasks_to_try_job_pipeline.SwarmingTasksToTryJobPipeline( |