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

Unified Diff: appengine/findit/model/flake/master_flake_analysis.py

Issue 2608853002: [Findit] Adding suspected CL to master flake analysis in preparation for try jobs (Closed)
Patch Set: 2016 -> 2017 Created 3 years, 11 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/model/flake/master_flake_analysis.py
diff --git a/appengine/findit/model/flake/master_flake_analysis.py b/appengine/findit/model/flake/master_flake_analysis.py
index 32289d3acb5b727fdafef5748cccea64b06e4cea..6f5c0707997238738ab558da63d5fe0634847e92 100644
--- a/appengine/findit/model/flake/master_flake_analysis.py
+++ b/appengine/findit/model/flake/master_flake_analysis.py
@@ -3,15 +3,18 @@
# found in the LICENSE file.
import base64
+import logging
from google.appengine.ext import ndb
+from gae_libs.gitiles.cached_gitiles_repository import CachedGitilesRepository
from gae_libs.model.versioned_model import VersionedModel
from model import result_status
from model import triage_status
from model.base_analysis import BaseAnalysis
from model.base_build_model import BaseBuildModel
from model.base_triaged_model import TriagedModel
+from model.flake.flake_culprit import FlakeCulprit
from model.flake.flake_swarming_task import FlakeSwarmingTaskData
@@ -95,6 +98,15 @@ class MasterFlakeAnalysis(
else:
self.result_status = result_status.FOUND_INCORRECT
+ def GetSuspectedFlakeDataPoint(self):
chanli 2017/01/07 02:56:28 This function needs to be updated after our discus
lijeffrey 2017/01/09 20:53:31 Yes, per discussion we will have 1 group of data p
+ """Gets the corresponding data point to the suspected flake build."""
+ if self.suspected_flake_build_number is not None:
+ for data_point in self.data_points:
+ if data_point.build_number == self.suspected_flake_build_number:
+ return data_point
+
+ return None
+
def Reset(self):
super(MasterFlakeAnalysis, self).Reset()
self.original_master_name = None
@@ -109,6 +121,8 @@ class MasterFlakeAnalysis(
self.correct_culprit = None
self.algorithm_parameters = None
self.suspected_flake_build_number = None
+ self.culprit = None
+ self.try_job_status = None
self.data_points = []
self.result_status = None
@@ -158,6 +172,13 @@ class MasterFlakeAnalysis(
# The suspected build number to have introduced the flakiness.
suspected_flake_build_number = ndb.IntegerProperty()
+ # The culprit CL associated with the try job results, if any.
+ culprit = ndb.LocalStructuredProperty(FlakeCulprit)
+
+ # The status of the try job, if any. None if no suspected flake build number
chanli 2017/01/07 02:56:28 Flake revision instead of flake build number?
lijeffrey 2017/01/09 20:53:31 Renamed "None if try jobs have not been triggered"
+ # yet.
+ try_job_status = ndb.IntegerProperty(indexed=False)
+
# The data points used to plot the flakiness graph build over build.
data_points = ndb.LocalStructuredProperty(
DataPoint, repeated=True, compressed=True)
« no previous file with comments | « appengine/findit/model/flake/flake_culprit.py ('k') | appengine/findit/model/flake/test/flake_culprit_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698