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

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

Issue 2225723005: [Findit] Add WfSuspectedCL model to save triage results for each suspected CL. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « appengine/findit/model/wf_culprit.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « appengine/findit/model/wf_culprit.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698