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

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: . 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
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..cfb0ee12564dc566c0e168c774533775acd25b8c 100644
--- a/appengine/findit/waterfall/try_job_util.py
+++ b/appengine/findit/waterfall/try_job_util.py
@@ -132,14 +132,13 @@ def _GetFailedTargetsFromSignals(signals, master_name, builder_name):
return compile_targets
-def _GetSuspectsForCompileFailureFromHeuristicResult(heuristic_result):
+def _GetSuspectsFromHeuristicResult(heuristic_result):
suspected_revisions = []
if not heuristic_result:
return 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
+ suspected_revisions = [c['revision'] for c in failure['suspected_cls']]
+ return list(set(suspected_revisions))
def ScheduleTryJobIfNeeded(failure_info, signals, heuristic_result):
@@ -170,9 +169,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(

Powered by Google App Engine
This is Rietveld 408576698