Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1906)

Unified Diff: appengine/findit/waterfall/try_job_util.py

Issue 1924823003: [Findit] Use heuristic analysis result for test try jobs(Findit side). (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Address comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/waterfall/test/try_job_util_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « appengine/findit/waterfall/test/try_job_util_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698