Revert "0928-test-2"
This reverts commit e4e02e838bee04d83d0695b15366731f76cd864b.
Reason for revert:
test revert 691177
Original change's description:
> 0928-test-2
>
> Change-Id: I7ea9986fb121e3922a0fbdc77c142645f47ea482
> Reviewed-on: https://chromium-review.googlesource.com/691177
> Reviewed-by: Chan Li <chanli@chromium.org>
Change-Id: I60db489bd031ad10e3f13b2fa85975de90409180
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/691105
Reviewed-by: Chan Li <chanli@chromium.org>
diff --git a/wf_culprit.py b/wf_culprit.py
new file mode 100644
index 0000000..2322cd1
--- /dev/null
+++ b/wf_culprit.py
@@ -0,0 +1,40 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from google.appengine.ext import ndb
+
+from model import analysis_status as status
+from model.base_suspected_cl import BaseSuspectedCL
+
+
+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)
+
+ # The status of code-review notification: None, RUNNING, COMPLETED, ERROR.
+ cr_notification_status = ndb.IntegerProperty(indexed=True)
+
+ @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 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
\ No newline at end of file