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

Side by Side Diff: appengine/findit/model/flake/flake_analysis_request.py

Issue 2394013002: [Findit] Hacky solution to map a CQ trybot step to a Waterfall buildbot step. (Closed)
Patch Set: Fix nit. Created 4 years, 2 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/flake/test/flake_analysis_request_test.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 from model.flake.master_flake_analysis import MasterFlakeAnalysis 7 from model.flake.master_flake_analysis import MasterFlakeAnalysis
8 from model.versioned_model import VersionedModel 8 from model.versioned_model import VersionedModel
9 9
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 @staticmethod 49 @staticmethod
50 def Create(master_name, builder_name, build_number, step_name, reported_time): 50 def Create(master_name, builder_name, build_number, step_name, reported_time):
51 return BuildStep( 51 return BuildStep(
52 master_name=BuildStep._StripMasterPrefix(master_name), 52 master_name=BuildStep._StripMasterPrefix(master_name),
53 builder_name=builder_name, 53 builder_name=builder_name,
54 build_number=build_number, 54 build_number=build_number,
55 step_name=step_name, 55 step_name=step_name,
56 reported_time=reported_time) 56 reported_time=reported_time)
57 57
58 @property
59 def has_matching_waterfall_step(self):
60 return None not in (self.wf_master_name, self.wf_builder_name,
61 self.wf_build_number, self.wf_step_name)
62
58 63
59 class FlakeAnalysisRequest(VersionedModel): 64 class FlakeAnalysisRequest(VersionedModel):
60 """Represents a request to analyze a flake. 65 """Represents a request to analyze a flake.
61 66
62 The name of the flake will be the key, and the model is versioned. 67 The name of the flake will be the key, and the model is versioned.
63 """ 68 """
64 69
65 # Name of the flake. Could be a step name, or a test name. 70 # Name of the flake. Could be a step name, or a test name.
66 # Assume there are no step and test with the same name. 71 # Assume there are no step and test with the same name.
67 name = ndb.StringProperty(indexed=True) 72 name = ndb.StringProperty(indexed=True)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if s.build_number <= build_number: 112 if s.build_number <= build_number:
108 return False 113 return False
109 s.build_number = build_number 114 s.build_number = build_number
110 s.reported_time = reported_time 115 s.reported_time = reported_time
111 return True 116 return True
112 117
113 self.build_steps.append( 118 self.build_steps.append(
114 BuildStep.Create( 119 BuildStep.Create(
115 master_name, builder_name, build_number, step_name, reported_time)) 120 master_name, builder_name, build_number, step_name, reported_time))
116 return True 121 return True
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/model/flake/test/flake_analysis_request_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698