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

Unified Diff: recipe_engine/run.py

Issue 2885333003: [engine] make Uncaught Exception steps purple. (Closed)
Patch Set: add some more Created 3 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 | recipe_engine/step_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/run.py
diff --git a/recipe_engine/run.py b/recipe_engine/run.py
index 3f69eda163b94b0a85f5113cc36fe70551cce2ff..074c90a8c36b10544492730ef1adb9cc7d2f0173 100644
--- a/recipe_engine/run.py
+++ b/recipe_engine/run.py
@@ -539,12 +539,14 @@ def handle_recipe_return(recipe_result, result_filename, stream_engine,
if 'traceback' in recipe_result.result:
with stream_engine.make_step_stream('Uncaught Exception') as s:
+ s.set_step_status('EXCEPTION')
with s.new_log_stream('exception') as l:
for line in recipe_result.result['traceback']:
l.write_line(line)
if 'reason' in recipe_result.result:
with stream_engine.make_step_stream('Failure reason') as s:
+ s.set_step_status('FAILURE')
with s.new_log_stream('reason') as l:
for line in recipe_result.result['reason'].splitlines():
l.write_line(line)
@@ -570,6 +572,7 @@ def new_handle_recipe_return(result, result_filename, stream_engine):
f = result.failure
if f.HasField('exception'):
with stream_engine.make_step_stream('Uncaught Exception') as s:
+ s.set_step_status('EXCEPTION')
s.add_step_text(f.human_reason)
with s.new_log_stream('exception') as l:
for line in f.exception.traceback:
@@ -577,14 +580,17 @@ def new_handle_recipe_return(result, result_filename, stream_engine):
# TODO(martiniss): Remove this code once calling code handles these states
elif f.HasField('timeout'):
with stream_engine.make_step_stream('Step Timed Out') as s:
+ s.set_step_status('FAILURE')
with s.new_log_stream('timeout_s') as l:
l.write_line(f.timeout.timeout_s)
elif f.HasField('step_data'):
with stream_engine.make_step_stream('Invalid Step Data Access') as s:
+ s.set_step_status('FAILURE')
with s.new_log_stream('step') as l:
l.write_line(f.step_data.step)
with stream_engine.make_step_stream('Failure reason') as s:
+ s.set_step_status('FAILURE')
with s.new_log_stream('reason') as l:
l.write_split(f.human_reason)
« no previous file with comments | « no previous file | recipe_engine/step_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698