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

Unified Diff: appengine/findit/handlers/triage_analysis.py

Issue 2179283009: [Findit] Compare lists to lists instead of lists to tuples, and change tests (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Nit function rename, update comment wording Created 4 years, 5 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/handlers/triage_analysis.py
diff --git a/appengine/findit/handlers/triage_analysis.py b/appengine/findit/handlers/triage_analysis.py
index bf13e56ef2284e6219206f8ae4a2249f9add5f50..e448dc405815cb9991089df8b8280f37c0c5c754 100644
--- a/appengine/findit/handlers/triage_analysis.py
+++ b/appengine/findit/handlers/triage_analysis.py
@@ -21,7 +21,7 @@ from common.base_handler import Permission
from model import result_status
from model.wf_analysis import WfAnalysis
from waterfall import buildbot
-from waterfall import try_job_util
+from waterfall.try_job_util import GetSuspectedCLsWithFailures
MATCHING_ANALYSIS_HOURS_AGO_START = 24
MATCHING_ANALYSIS_HOURS_AGO_END = 24
@@ -36,23 +36,21 @@ def _DoAnalysesMatch(analysis_1, analysis_2):
analysis_2: The second analysis to compare.
Returns:
- True if the two analyses' sorted potential culprit lists match, otherwise
- False.
+ True if the two analyses' sorted suspected CLs with failures lists match,
+ otherwise False.
"""
- # Get list of potential culprit tuples.
- potential_culprit_tuple_list_1 = (
- try_job_util.GenPotentialCulpritTupleList(analysis_1.result))
- potential_culprit_tuple_list_2 = (
- try_job_util.GenPotentialCulpritTupleList(analysis_2.result))
+ # Get list of suspected CLs with failures.
+ suspected_cls_with_failures_1 = GetSuspectedCLsWithFailures(analysis_1.result)
chanli 2016/08/01 19:43:49 This seems not correct. For try_job_util.GetSuspec
+ suspected_cls_with_failures_2 = GetSuspectedCLsWithFailures(analysis_2.result)
- # Both analyses must have non-empty potential culprit lists.
- if not potential_culprit_tuple_list_1 or not potential_culprit_tuple_list_2:
+ # Both analyses must have non-empty suspected CLs with failures lists.
+ if not suspected_cls_with_failures_1 or not suspected_cls_with_failures_2:
return False
- # Both analyses must have matching potential culprit lists.
- return (sorted(potential_culprit_tuple_list_1) ==
- sorted(potential_culprit_tuple_list_2))
+ # Both analyses must have matching suspected CLs with failures lists.
+ return (sorted(suspected_cls_with_failures_1) ==
+ sorted(suspected_cls_with_failures_2))
def _AppendTriageHistoryRecord(
« no previous file with comments | « no previous file | appengine/findit/waterfall/test/try_job_util_test.py » ('j') | appengine/findit/waterfall/try_job_util.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698