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

Unified Diff: appengine/findit/waterfall/monitor_try_job_pipeline.py

Issue 1948093003: [Findit] Adding more try job error detection (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/monitor_try_job_pipeline.py
diff --git a/appengine/findit/waterfall/monitor_try_job_pipeline.py b/appengine/findit/waterfall/monitor_try_job_pipeline.py
index bd0802ffe674dca505524c17a1aade1c996b9745..2d21013d0086e5947ddcc17da8eb7c03aa2c4e85 100644
--- a/appengine/findit/waterfall/monitor_try_job_pipeline.py
+++ b/appengine/findit/waterfall/monitor_try_job_pipeline.py
@@ -69,12 +69,38 @@ class MonitorTryJobPipeline(BasePipeline):
try_job_error.TIMEOUT)
if buildbucket_response:
- # If there is no explicit timeout or reason specified, check the last
- # build response for errors.
+ # Check buildbucket_response.
+ buildbucket_failure_reason = buildbucket_response.get('failure_reason')
+ if buildbucket_failure_reason == 'BUILD_FAILURE':
+ # Can occurr if an exception is thrown or the disk is full.
+ return (
+ {
+ 'message': 'Compile failed unexpectedly.',
+ 'reason': MonitorTryJobPipeline.UNKNOWN
+ },
+ try_job_error.INFRA_FAILURE
+ )
+ elif buildbucket_failure_reason == 'INFRA_FAILURE':
+ return (
+ {
+ 'message': ('Try job encountered an infra issue during '
+ 'execution.'),
+ 'reason': MonitorTryJobPipeline.UNKNOWN
+ },
+ try_job_error.INFRA_FAILURE
+ )
+ elif buildbucket_failure_reason:
+ return (
+ {
+ 'message': buildbucket_failure_reason,
+ 'reason': MonitorTryJobPipeline.UNKNOWN
+ },
+ try_job_error.UNKNOWN
+ )
+
+ # Check result_details_json for errors.
result_details_json = json.loads(
buildbucket_response.get('result_details_json', '{}')) or {}
-
- # Check result_details_json for any obvious errors.
error = result_details_json.get('error', {})
if error:
return (
@@ -84,19 +110,7 @@ class MonitorTryJobPipeline(BasePipeline):
},
try_job_error.CI_REPORTED_ERROR)
- # Check the report to see if anything went wrong.
- report = result_details_json.get('properties', {}).get('report')
- if report:
- if report.get('metadata', {}).get('infra_failure'):
- # Check for any infra issues caught by the recipe.
- return (
- {
- 'message': ('Try job encountered an infra issue during '
- 'execution.'),
- 'reason': MonitorTryJobPipeline.UNKNOWN
- },
- try_job_error.INFRA_FAILURE)
- else:
+ if not result_details_json.get('properties', {}).get('report'):
# A report should always be included as part of 'properties'. If it is
# missing something else is wrong.
return (
@@ -104,7 +118,8 @@ class MonitorTryJobPipeline(BasePipeline):
'message': 'No result report was found.',
'reason': MonitorTryJobPipeline.UNKNOWN
},
- try_job_error.UNKNOWN)
+ try_job_error.UNKNOWN
+ )
return None, None
« no previous file with comments | « no previous file | 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