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

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

Issue 2416303002: [Findit] Adding support for triaging suspected builds from flake analysis (Closed)
Patch Set: Rebase 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
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 import base64 5 import base64
6 6
7 from google.appengine.ext import ndb 7 from google.appengine.ext import ndb
8 8
9 from model.base_analysis import BaseAnalysis 9 from model.base_analysis import BaseAnalysis
10 from model.base_build_model import BaseBuildModel 10 from model.base_build_model import BaseBuildModel
11 from model.flake.flake_swarming_task import FlakeSwarmingTaskData 11 from model.flake.flake_swarming_task import FlakeSwarmingTaskData
12 from model.versioned_model import VersionedModel 12 from model.versioned_model import VersionedModel
13 from model.base_triaged_model import TriagedModel
13 14
14 15
15 class DataPoint(ndb.Model): 16 class DataPoint(ndb.Model):
16 build_number = ndb.IntegerProperty(indexed=False) 17 build_number = ndb.IntegerProperty(indexed=False)
17 pass_rate = ndb.FloatProperty(indexed=False) 18 pass_rate = ndb.FloatProperty(indexed=False)
18 19
19 20
20 class MasterFlakeAnalysis(BaseAnalysis, BaseBuildModel, VersionedModel): 21 class MasterFlakeAnalysis(
22 BaseAnalysis, BaseBuildModel, VersionedModel, TriagedModel):
21 """Represents an analysis of a flaky test on a Waterfall test cycle.""" 23 """Represents an analysis of a flaky test on a Waterfall test cycle."""
22 24
23 @ndb.ComputedProperty 25 @ndb.ComputedProperty
24 def step_name(self): 26 def step_name(self):
25 return self.key.pairs()[0][1].split('/')[3] 27 return self.key.pairs()[0][1].split('/')[3]
26 28
27 @ndb.ComputedProperty 29 @ndb.ComputedProperty
28 def test_name(self): 30 def test_name(self):
29 return base64.urlsafe_b64decode(self.key.pairs()[0][1].split('/')[4]) 31 return base64.urlsafe_b64decode(self.key.pairs()[0][1].split('/')[4])
30 32
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 data_points = ndb.LocalStructuredProperty( 114 data_points = ndb.LocalStructuredProperty(
113 DataPoint, repeated=True, compressed=True) 115 DataPoint, repeated=True, compressed=True)
114 116
115 # Whether the analysis was triggered by a manual request through check flake, 117 # Whether the analysis was triggered by a manual request through check flake,
116 # Findit's automatic analysis upon detection, or Findit API. 118 # Findit's automatic analysis upon detection, or Findit API.
117 triggering_source = ndb.IntegerProperty(default=None, indexed=True) 119 triggering_source = ndb.IntegerProperty(default=None, indexed=True)
118 120
119 # Who triggered the analysis. Used for differentiating between manual and 121 # Who triggered the analysis. Used for differentiating between manual and
120 # automatic runs, and determining the most active users to gather feedback. 122 # automatic runs, and determining the most active users to gather feedback.
121 triggering_user_email = ndb.StringProperty(default=None, indexed=False) 123 triggering_user_email = ndb.StringProperty(default=None, indexed=False)
OLDNEW
« no previous file with comments | « appengine/findit/model/base_triaged_model.py ('k') | appengine/findit/model/test/base_triaged_model_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698