Chromium Code Reviews| Index: appengine/findit/model/wf_culprit.py |
| diff --git a/appengine/findit/model/wf_culprit.py b/appengine/findit/model/wf_culprit.py |
| index 6d8fcd9581dcbc53eb945d1a343a23d9a15c5a89..a4e0508fb96fb9dfa44b629f01deafa1b15cdc9d 100644 |
| --- a/appengine/findit/model/wf_culprit.py |
| +++ b/appengine/findit/model/wf_culprit.py |
| @@ -5,14 +5,16 @@ |
| from google.appengine.ext import ndb |
| from model import analysis_status as status |
| -from model.wf_suspected_cl import WfSuspectedCL |
| +from model.base_cl import BaseCL |
| -class WfCulprit(WfSuspectedCL): |
| +class WfCulprit(BaseCL): |
| """Represents a culprit that causes a group of failures on Chromium waterfall. |
| 'Wf' is short for waterfall. |
| """ |
| + # The list of builds in which the culprit caused some breakage. |
| + builds = ndb.JsonProperty(indexed=False) |
|
lijeffrey
2016/09/08 22:09:24
so we indeed want this in both WfSuspectedCL and i
chanli
2016/09/08 22:32:29
For culprit a list of builds is enough, but we nee
|
| # When the code-review of this culprit was notified. |
| cr_notification_time = ndb.DateTimeProperty(indexed=True) |
| @@ -27,3 +29,12 @@ class WfCulprit(WfSuspectedCL): |
| @property |
| def cr_notified(self): |
| return self.cr_notification_status == status.COMPLETED |
| + |
| + @classmethod |
| + def Create(cls, repo_name, revision, commit_position): # pragma: no cover |
| + instance = cls(key=cls._CreateKey(repo_name, revision)) |
| + instance.repo_name = repo_name |
| + instance.revision = revision |
| + instance.commit_position = commit_position |
| + instance.builds = [] |
| + return instance |