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

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

Issue 2480483002: [Findit] fix bug when display confidence score on SoM. (Closed)
Patch Set: remove print statements. Created 4 years, 1 month 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/test/findit_api_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/suspected_cl_util.py
diff --git a/appengine/findit/waterfall/suspected_cl_util.py b/appengine/findit/waterfall/suspected_cl_util.py
index c84b01eec256405c0e7a58211458238d5aa55d56..3432279763ebd13032d8b0d0688b58a50f42f4d2 100644
--- a/appengine/findit/waterfall/suspected_cl_util.py
+++ b/appengine/findit/waterfall/suspected_cl_util.py
@@ -120,12 +120,14 @@ def _HasNewFailures(current_failures, new_failures):
def GetSuspectedCLConfidenceScoreAndApproach(
confidences, cl_from_analyzed_build, cl_from_first_failed_build):
- if not confidences or not cl_from_analyzed_build:
+ if not confidences or (
+ not cl_from_analyzed_build and not cl_from_first_failed_build):
return None, None
- if (cl_from_first_failed_build and not _HasNewFailures(
- cl_from_analyzed_build.get('failures'),
- cl_from_first_failed_build.get('failures'))):
+ if (cl_from_first_failed_build and (
+ not cl_from_analyzed_build or
+ not _HasNewFailures(cl_from_analyzed_build.get('failures'),
+ cl_from_first_failed_build.get('failures')))):
# For non-first-time failures, the try job result is not recorded.
# If there is no new failures in current build, use first failed build to
# make sure the confidence score is correct.
« no previous file with comments | « appengine/findit/test/findit_api_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698