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

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

Issue 838003004: [Findit] Add three sub-pipelines to analyze build failure. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Address comments. Created 5 years, 11 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/step.py
diff --git a/appengine/findit/model/step.py b/appengine/findit/model/step.py
new file mode 100644
index 0000000000000000000000000000000000000000..b31cede990afd07b2f23020bf00d706a0c0e13fe
--- /dev/null
+++ b/appengine/findit/model/step.py
@@ -0,0 +1,32 @@
+# Copyright 2014 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.base_build_model import BaseBuildModel
+
+
+class Step(BaseBuildModel):
+ """Represents a step in a build cycle of a builder in a waterfall."""
+
+ @staticmethod
+ def CreateKey(
+ master_name, builder_name, build_number, step_name): # pragma: no cover
+ build_id = BaseBuildModel.CreateBuildId(
+ master_name, builder_name, build_number)
+ return ndb.Key('Build', build_id, 'Step', step_name)
+
+ @staticmethod
+ def CreateStep(
+ master_name, builder_name, build_number, step_name): # pragma: no cover
+ return Step(
+ key=Step.CreateKey(master_name, builder_name, build_number, step_name))
+
+ @staticmethod
+ def GetStep(
+ master_name, builder_name, build_number, step_name): # pragma: no cover
+ return Step.CreateKey(
+ master_name, builder_name, build_number, step_name).get()
+
+ log_data = ndb.JsonProperty(indexed=False, compressed=True)

Powered by Google App Engine
This is Rietveld 408576698