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

Side by Side Diff: appengine/findit/model/build_analysis.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: Just rebase. 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/findit/model/step.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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 from model.base_build_model import BaseBuildModel 7 from model.base_build_model import BaseBuildModel
8 from model.build_analysis_status import BuildAnalysisStatus 8 from model.build_analysis_status import BuildAnalysisStatus
9 9
10 10
(...skipping 21 matching lines...) Expand all
32 @property 32 @property
33 def completed(self): 33 def completed(self):
34 return self.status in ( 34 return self.status in (
35 BuildAnalysisStatus.ANALYZED, BuildAnalysisStatus.ERROR) 35 BuildAnalysisStatus.ANALYZED, BuildAnalysisStatus.ERROR)
36 36
37 @property 37 @property
38 def failed(self): 38 def failed(self):
39 return self.status == BuildAnalysisStatus.ERROR 39 return self.status == BuildAnalysisStatus.ERROR
40 40
41 def Reset(self): # pragma: no cover 41 def Reset(self): # pragma: no cover
42 """Reset to the state as if no analysis is run.""" 42 """Resets to the state as if no analysis is run."""
43 self.pipeline_url = None 43 self.pipeline_url = None
44 self.status = BuildAnalysisStatus.PENDING 44 self.status = BuildAnalysisStatus.PENDING
45 self.start_time = None 45 self.start_time = None
46 46
47 # Information of the analyzed build. 47 # Information of the analyzed build.
48 build_start_time = ndb.DateTimeProperty(indexed=True) 48 build_start_time = ndb.DateTimeProperty(indexed=True)
49 49
50 # Information of analysis processing. 50 # Information of analysis processing.
51 pipeline_url = ndb.StringProperty(indexed=False) 51 pipeline_url = ndb.StringProperty(indexed=False)
52 status = ndb.IntegerProperty( 52 status = ndb.IntegerProperty(
53 default=BuildAnalysisStatus.PENDING, indexed=False) 53 default=BuildAnalysisStatus.PENDING, indexed=False)
54 start_time = ndb.DateTimeProperty(indexed=False) 54 start_time = ndb.DateTimeProperty(indexed=False)
55 updated_time = ndb.DateTimeProperty(indexed=False, auto_now=True) 55 updated_time = ndb.DateTimeProperty(indexed=False, auto_now=True)
56
57 # Analysis result.
58 result = ndb.JsonProperty(indexed=False, compressed=True)
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/model/step.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698