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

Side by Side Diff: appengine/findit/model/wf_try_job_data.py

Issue 1667383002: [Findit] Adding master_name, builder_name, and try_job_type to try_job_data (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments and rebase Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/findit/waterfall/monitor_try_job_pipeline.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from google.appengine.ext import ndb 5 from google.appengine.ext import ndb
6 6
7 7
8 class WfTryJobData(ndb.Model): 8 class WfTryJobData(ndb.Model):
9 """Represents a tryjob's data for a completed try job.""" 9 """Represents a tryjob's data for a completed try job."""
10 # The original master on which the build was detected to have failed.
11 master_name = ndb.StringProperty(indexed=True)
12 # The original buildername on which the build was detected to have failed.
13 builder_name = ndb.StringProperty(indexed=True)
14 # The type of try job, such as 'compile' or 'test'.
15 try_job_type = ndb.StringProperty(indexed=True)
10 # When the try job was created. 16 # When the try job was created.
11 request_time = ndb.DateTimeProperty(indexed=False) 17 request_time = ndb.DateTimeProperty(indexed=True)
12 # When the try job began executing. 18 # When the try job began executing.
13 start_time = ndb.DateTimeProperty(indexed=False) 19 start_time = ndb.DateTimeProperty(indexed=True)
14 # When the try job completed. 20 # When the try job completed.
15 end_time = ndb.DateTimeProperty(indexed=False) 21 end_time = ndb.DateTimeProperty(indexed=True)
16 # Number of commits in the revision range. 22 # Number of commits in the revision range.
17 regression_range_size = ndb.IntegerProperty(indexed=False) 23 regression_range_size = ndb.IntegerProperty(indexed=False)
18 # Number of commits analyzed to determine a culprit if any. 24 # Number of commits analyzed to determine a culprit if any.
19 number_of_commits_analyzed = ndb.IntegerProperty(indexed=False) 25 number_of_commits_analyzed = ndb.IntegerProperty(indexed=False)
20 # Culprit(s) determined to have caused the failure, if any. 26 # Culprit(s) determined to have caused the failure, if any.
21 culprits = ndb.JsonProperty(indexed=False) 27 culprits = ndb.JsonProperty(indexed=False)
22 # The url to the try job build page. 28 # The url to the try job build page.
23 try_job_url = ndb.StringProperty(indexed=False) 29 try_job_url = ndb.StringProperty(indexed=False)
24 # Error message and reason, if any. 30 # Error message and reason, if any.
25 error = ndb.JsonProperty(indexed=False) 31 error = ndb.JsonProperty(indexed=False)
26 32
27 # TODO(lijeffrey): We may want to determine whether or not a try job 33 # TODO(lijeffrey): We may want to determine whether or not a try job
28 # was triggered as a redo of another if the first failed to find a culprit. 34 # was triggered as a redo of another if the first failed to find a culprit.
29 # For example, if passing compile targets yields no results, a redo without 35 # For example, if passing compile targets yields no results, a redo without
30 # compile targets may be attempted to find the culprit CL and the occurrence 36 # compile targets may be attempted to find the culprit CL and the occurrence
31 # documented in a queryable manner. 37 # documented in a queryable manner.
32 38
33 @staticmethod 39 @staticmethod
34 def _CreateKey(build_id): # pragma: no cover 40 def _CreateKey(build_id): # pragma: no cover
35 return ndb.Key('WfTryJobData', build_id) 41 return ndb.Key('WfTryJobData', build_id)
36 42
37 @staticmethod 43 @staticmethod
38 def Create(build_id): # pragma: no cover 44 def Create(build_id): # pragma: no cover
39 return WfTryJobData(key=WfTryJobData._CreateKey(build_id)) 45 return WfTryJobData(key=WfTryJobData._CreateKey(build_id))
40 46
41 @staticmethod 47 @staticmethod
42 def Get(build_id): # pragma: no cover 48 def Get(build_id): # pragma: no cover
43 return WfTryJobData._CreateKey(build_id).get() 49 return WfTryJobData._CreateKey(build_id).get()
44 50
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/waterfall/monitor_try_job_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698