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

Side by Side Diff: appengine/findit/handlers/flake/check_flake.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: reverted unintended change to an __init__ file Created 4 years, 1 month 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 from google.appengine.api import users 5 from google.appengine.api import users
6 6
7 from common import auth_util 7 from common import auth_util
8 from common import constants 8 from common import constants
9 from common import time_util 9 from common import time_util
10 from common.base_handler import BaseHandler 10 from common.base_handler import BaseHandler
11 from common.base_handler import Permission 11 from common.base_handler import Permission
12 from model import analysis_status 12 from model import analysis_status
13 from model import triage_status 13 from model import triage_status
14 from waterfall.flake import initialize_flake_pipeline 14 from waterfall.flake import initialize_flake_pipeline
15 from waterfall.flake import triggering_sources 15 from waterfall.flake import triggering_sources
16 16
17 17
18 def _GetSuspectedFlakeAnalysisAndTriageResult(analysis): 18 def _GetSuspectedFlakeAnalysisAndTriageResult(analysis):
19 if analysis.suspected_flake_build_number is not None: 19 if analysis.suspected_flake_build_number is not None:
20 return { 20 return {
21 'build_number': analysis.suspected_flake_build_number, 21 'build_number': analysis.suspected_flake_build_number,
22 'triage_result': ( 22 'triage_result': (
23 analysis.triage_history[-1].triage_result if analysis.triage_history 23 analysis.triage_history[-1].triage_result if analysis.triage_history
24 else triage_status.UNTRIAGED) 24 else triage_status.UNTRIAGED)
25 } 25 }
26 26
27 return {} 27 return {}
28 28
29
stgao 2016/10/28 18:20:59 This line should be kept, as we use two empty line
wrengr 2016/10/28 19:24:48 Done.
30 class CheckFlake(BaseHandler): 29 class CheckFlake(BaseHandler):
31 PERMISSION_LEVEL = Permission.ANYONE 30 PERMISSION_LEVEL = Permission.ANYONE
32 31
33 def HandleGet(self): 32 def HandleGet(self):
34 master_name = self.request.get('master_name').strip() 33 master_name = self.request.get('master_name').strip()
35 builder_name = self.request.get('builder_name').strip() 34 builder_name = self.request.get('builder_name').strip()
36 build_number = int(self.request.get('build_number', '0').strip()) 35 build_number = int(self.request.get('build_number', '0').strip())
37 step_name = self.request.get('step_name').strip() 36 step_name = self.request.get('step_name').strip()
38 test_name = self.request.get('test_name').strip() 37 test_name = self.request.get('test_name').strip()
39 38
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 coordinates.append([data_point.build_number, data_point.pass_rate]) 102 coordinates.append([data_point.build_number, data_point.pass_rate])
104 103
105 # Order by build number from earliest to latest. 104 # Order by build number from earliest to latest.
106 coordinates.sort(key=lambda x: x[0]) 105 coordinates.sort(key=lambda x: x[0])
107 106
108 data['pass_rates'] = coordinates 107 data['pass_rates'] = coordinates
109 return { 108 return {
110 'template': 'flake/result.html', 109 'template': 'flake/result.html',
111 'data': data 110 'data': data
112 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698