Chromium Code Reviews| Index: appengine/findit/model/base_suspected_cl.py |
| diff --git a/appengine/findit/model/wf_suspected_cl.py b/appengine/findit/model/base_suspected_cl.py |
| similarity index 61% |
| copy from appengine/findit/model/wf_suspected_cl.py |
| copy to appengine/findit/model/base_suspected_cl.py |
| index 4c4caac1f1d715c584f5a98b7dec0722bcb02340..1eaddbb7474fab58bab225335ec0abd7130b27b5 100644 |
| --- a/appengine/findit/model/wf_suspected_cl.py |
| +++ b/appengine/findit/model/base_suspected_cl.py |
| @@ -5,33 +5,21 @@ |
| from google.appengine.ext import ndb |
| -class WfSuspectedCL(ndb.Model): |
| - """Represents suspected cl that causes failures on Chromium waterfall builds. |
| - |
| - 'Wf' is short for waterfall. |
| - """ |
| +class BaseSuspectedCL(ndb.Model): |
| + """Represents base information about a suspected cl.""" |
| # Repo or project name of the suspected CL, eg: chromium, etc. |
| repo_name = ndb.StringProperty(indexed=True) |
|
stgao
2016/09/13 17:23:27
add empty lines in between.
Could have separators
chanli
2016/09/13 18:06:30
Done.
|
| - |
| # The Git hash revision of the suspected CL. |
| revision = ndb.StringProperty(indexed=False) |
| - |
| # The commit position of the suspected CL. |
| # Might not be available for some repo. |
| commit_position = ndb.IntegerProperty(indexed=False) |
| - # 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) |
| - |
| - # From which approach do we get this suspected CL: HEURISTIC, TRY_JOB or BOTH. |
| - approach = ndb.IntegerProperty(indexed=True) |
| - |
| - # Failure type: failure_type.COMPILE or failure_type.TEST. |
| - failure_type = ndb.IntegerProperty(indexed=True) |
| + # Time when the CL was identified as a suspect for the first time. |
| + identified_time = ndb.DateTimeProperty(indexed=False) |
| + # Time when the CL was updated. |
| + updated_time = ndb.DateTimeProperty(indexed=True) |
| @property |
| def project_name(self): |
| @@ -47,9 +35,8 @@ class WfSuspectedCL(ndb.Model): |
| instance.repo_name = repo_name |
| instance.revision = revision |
| instance.commit_position = commit_position |
| - instance.builds = [] |
| return instance |
| @classmethod |
| def Get(cls, repo_name, revision): # pragma: no cover |
| - return cls._CreateKey(repo_name, revision).get() |
| + return cls._CreateKey(repo_name, revision).get() |