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

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

Issue 2320153003: [Findit] Datamodel change for triaging at CL level. (Closed)
Patch Set: Add new modules 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/base_cl.py
diff --git a/appengine/findit/model/wf_suspected_cl.py b/appengine/findit/model/base_cl.py
similarity index 61%
copy from appengine/findit/model/wf_suspected_cl.py
copy to appengine/findit/model/base_cl.py
index 4c4caac1f1d715c584f5a98b7dec0722bcb02340..7f9e29847d4ae150d56c6b127d23e3aeb771c26f 100644
--- a/appengine/findit/model/wf_suspected_cl.py
+++ b/appengine/findit/model/base_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 BaseCL(ndb.Model):
+ """Represents base information about a suspected cl."""
lijeffrey 2016/09/08 22:09:23 nit: it seems this docstring should now be "... in
chanli 2016/09/08 22:32:28 I think it's still a suspected cl. changed the mod
# Repo or project name of the suspected CL, eg: chromium, etc.
repo_name = ndb.StringProperty(indexed=True)
-
# 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()

Powered by Google App Engine
This is Rietveld 408576698