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

Unified Diff: appengine/findit/model/wf_culprit.py

Issue 2320153003: [Findit] Datamodel change for triaging at CL level. (Closed)
Patch Set: change index.yaml Created 4 years, 3 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/wf_culprit.py
diff --git a/appengine/findit/model/wf_culprit.py b/appengine/findit/model/wf_culprit.py
index 6d8fcd9581dcbc53eb945d1a343a23d9a15c5a89..2322cd16b9175d10100f769a65ca5a7f1f772c39 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_suspected_cl import BaseSuspectedCL
-class WfCulprit(WfSuspectedCL):
+class WfCulprit(BaseSuspectedCL):
"""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)
# 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

Powered by Google App Engine
This is Rietveld 408576698