| Index: appengine/findit/model/wf_suspected_cl.py
|
| diff --git a/appengine/findit/model/wf_culprit.py b/appengine/findit/model/wf_suspected_cl.py
|
| similarity index 55%
|
| copy from appengine/findit/model/wf_culprit.py
|
| copy to appengine/findit/model/wf_suspected_cl.py
|
| index 00457aa686bbfa5932d3cb53ed3fcf62e8ea105a..4c4caac1f1d715c584f5a98b7dec0722bcb02340 100644
|
| --- a/appengine/findit/model/wf_culprit.py
|
| +++ b/appengine/findit/model/wf_suspected_cl.py
|
| @@ -4,45 +4,39 @@
|
|
|
| from google.appengine.ext import ndb
|
|
|
| -from model import analysis_status as status
|
|
|
| -
|
| -class WfCulprit(ndb.Model):
|
| - """Represents a culprit that causes a group of failures on Chromium waterfall.
|
| +class WfSuspectedCL(ndb.Model):
|
| + """Represents suspected cl that causes failures on Chromium waterfall builds.
|
|
|
| 'Wf' is short for waterfall.
|
| """
|
|
|
| - # Repo or project name of the culprit, eg: chromium, etc.
|
| + # Repo or project name of the suspected CL, eg: chromium, etc.
|
| repo_name = ndb.StringProperty(indexed=True)
|
|
|
| - # The Git hash revision of the culprit.
|
| + # The Git hash revision of the suspected CL.
|
| revision = ndb.StringProperty(indexed=False)
|
|
|
| - # The commit position of the culprit. Might not be available for some repo.
|
| + # The commit position of the suspected CL.
|
| + # Might not be available for some repo.
|
| commit_position = ndb.IntegerProperty(indexed=False)
|
|
|
| - # When the code-review of this culprit was notified.
|
| - cr_notification_time = ndb.DateTimeProperty(indexed=True)
|
| + # The list of builds in which the suspected CL caused some breakage.
|
| + builds = ndb.JsonProperty(indexed=False)
|
| +
|
| + # Is the suspected CL the culprit or not.
|
| + is_culprit = ndb.BooleanProperty(indexed=True, default=None)
|
|
|
| - # The status of code-review notification: None, RUNNING, COMPLETED, ERROR.
|
| - cr_notification_status = ndb.IntegerProperty(indexed=True)
|
| + # From which approach do we get this suspected CL: HEURISTIC, TRY_JOB or BOTH.
|
| + approach = ndb.IntegerProperty(indexed=True)
|
|
|
| - # The list of builds in which the culprit caused some breakage.
|
| - builds = ndb.JsonProperty(indexed=False)
|
| + # Failure type: failure_type.COMPILE or failure_type.TEST.
|
| + failure_type = ndb.IntegerProperty(indexed=True)
|
|
|
| @property
|
| def project_name(self):
|
| return self.repo_name
|
|
|
| - @property
|
| - def cr_notification_processed(self):
|
| - return self.cr_notification_status in (status.COMPLETED, status.RUNNING)
|
| -
|
| - @property
|
| - def cr_notified(self):
|
| - return self.cr_notification_status == status.COMPLETED
|
| -
|
| @classmethod
|
| def _CreateKey(cls, repo_name, revision): # pragma: no cover
|
| return ndb.Key(cls.__name__, '%s/%s' % (repo_name, revision))
|
|
|