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

Side by Side Diff: appengine/findit/handlers/build_failure.py

Issue 1921893004: [Findit] Fix Key error in build_failure handler. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: group try job result in unclassified_failures if no status. Created 4 years, 8 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 | no next file » | 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 collections import defaultdict 5 from collections import defaultdict
6 import copy 6 import copy
7 from datetime import datetime 7 from datetime import datetime
8 import logging 8 import logging
9 import os 9 import os
10 10
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 'try_job': try_job_result, 246 'try_job': try_job_result,
247 'heuristic_analysis': { 247 'heuristic_analysis': {
248 'suspected_cls': heuristic_result['suspected_cls'] 248 'suspected_cls': heuristic_result['suspected_cls']
249 }, 249 },
250 'tests': tests if tests != [NON_SWARMING] else [], 250 'tests': tests if tests != [NON_SWARMING] else [],
251 'first_failure': heuristic_result['first_failure'], 251 'first_failure': heuristic_result['first_failure'],
252 'last_pass': heuristic_result['last_pass'], 252 'last_pass': heuristic_result['last_pass'],
253 'supported': heuristic_result['supported'] 253 'supported': heuristic_result['supported']
254 } 254 }
255 255
256 if try_job_result['status'] == result_status.FLAKY: 256 if ('status' not in try_job_result or
lijeffrey 2016/04/26 21:53:29 Maybe add a test case for this?
stgao 2016/04/26 22:05:46 +1
chanli 2016/04/26 22:29:15 Done.
257 step_updated_results['flaky_failures'].append(final_result) 257 try_job_result['status'] in NO_TRY_JOB_REASON_MAP.values()):
258 elif try_job_result['status'] in NO_TRY_JOB_REASON_MAP.values():
259 # There is no try job info but only heuristic result. 258 # There is no try job info but only heuristic result.
260 step_updated_results['unclassified_failures'].append(final_result) 259 step_updated_results['unclassified_failures'].append(final_result)
260 elif try_job_result['status'] == result_status.FLAKY:
261 step_updated_results['flaky_failures'].append(final_result)
261 else: 262 else:
262 step_updated_results['reliable_failures'].append(final_result) 263 step_updated_results['reliable_failures'].append(final_result)
263 264
264 return updated_results 265 return updated_results
265 266
266 267
267 class BuildFailure(BaseHandler): 268 class BuildFailure(BaseHandler):
268 PERMISSION_LEVEL = Permission.ANYONE 269 PERMISSION_LEVEL = Permission.ANYONE
269 270
270 def _ShowDebugInfo(self): 271 def _ShowDebugInfo(self):
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 'data': self._PrepareDataForCompileFailure(analysis), 397 'data': self._PrepareDataForCompileFailure(analysis),
397 } 398 }
398 else: 399 else:
399 return { 400 return {
400 'template': 'build_failure.html', 401 'template': 'build_failure.html',
401 'data': self._PrepareDataForTestFailures(analysis, build_info), 402 'data': self._PrepareDataForTestFailures(analysis, build_info),
402 } 403 }
403 404
404 def HandlePost(self): # pragma: no cover 405 def HandlePost(self): # pragma: no cover
405 return self.HandleGet() 406 return self.HandleGet()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698