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

Side by Side Diff: appengine/findit/waterfall/monitor_try_job_pipeline.py

Issue 2259513003: [Findit] Display last build bucket response to try job dashboard (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 datetime import datetime 5 from datetime import datetime
6 import json 6 import json
7 import time 7 import time
8 8
9 from google.appengine.ext import ndb 9 from google.appengine.ext import ndb
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 'message': 'Try job monitoring was abandoned.', 55 'message': 'Try job monitoring was abandoned.',
56 'reason': 'Timeout after %s hours' % ( 56 'reason': 'Timeout after %s hours' % (
57 waterfall_config.GetTryJobSettings().get('job_timeout_hours')) 57 waterfall_config.GetTryJobSettings().get('job_timeout_hours'))
58 }, 58 },
59 try_job_error.TIMEOUT) 59 try_job_error.TIMEOUT)
60 60
61 if buildbucket_response: 61 if buildbucket_response:
62 # Check buildbucket_response. 62 # Check buildbucket_response.
63 buildbucket_failure_reason = buildbucket_response.get('failure_reason') 63 buildbucket_failure_reason = buildbucket_response.get('failure_reason')
64 if buildbucket_failure_reason == 'BUILD_FAILURE': 64 if buildbucket_failure_reason == 'BUILD_FAILURE':
65 # Can occurr if an exception is thrown or the disk is full. 65 # Generic buildbucket-reported error which can occurr if an exception is
66 # thrown, disk is full, compile fails during a test try job, etc.
66 return ( 67 return (
67 { 68 {
68 'message': 'Compile failed unexpectedly.', 69 'message': 'Buildbucket reported a general error.',
69 'reason': MonitorTryJobPipeline.UNKNOWN 70 'reason': MonitorTryJobPipeline.UNKNOWN
70 }, 71 },
71 try_job_error.INFRA_FAILURE 72 try_job_error.INFRA_FAILURE
72 ) 73 )
73 elif buildbucket_failure_reason == 'INFRA_FAILURE': 74 elif buildbucket_failure_reason == 'INFRA_FAILURE':
74 return ( 75 return (
75 { 76 {
76 'message': ('Try job encountered an infra issue during ' 77 'message': ('Try job encountered an infra issue during '
77 'execution.'), 78 'execution.'),
78 'reason': MonitorTryJobPipeline.UNKNOWN 79 'reason': MonitorTryJobPipeline.UNKNOWN
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 already_set_started = True 247 already_set_started = True
247 248
248 if time.time() > deadline: # pragma: no cover 249 if time.time() > deadline: # pragma: no cover
249 _UpdateTryJobMetadata(try_job_data, start_time, build, error, True) 250 _UpdateTryJobMetadata(try_job_data, start_time, build, error, True)
250 # Explicitly abort the whole pipeline. 251 # Explicitly abort the whole pipeline.
251 raise pipeline.Abort( 252 raise pipeline.Abort(
252 'Try job %s timed out after %d hours.' % ( 253 'Try job %s timed out after %d hours.' % (
253 try_job_id, timeout_hours)) 254 try_job_id, timeout_hours))
254 255
255 time.sleep(pipeline_wait_seconds) # pragma: no cover 256 time.sleep(pipeline_wait_seconds) # pragma: no cover
OLDNEW
« no previous file with comments | « appengine/findit/templates/try_job_dashboard.html ('k') | appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698