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

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

Issue 2312413002: [Findit] Record error if swarming task completes with exit_code as 2. (Closed)
Patch Set: Created 4 years, 3 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/process_flake_swarming_task_result_pipeline_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py
diff --git a/appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py b/appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py
index 8b566bfabf53ad8b421defb07ac564a6682a1fc2..da78195b0eae87516f9eb0fb39691699bafc6d3e 100644
--- a/appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py
+++ b/appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py
@@ -86,12 +86,14 @@ class ProcessBaseSwarmingTaskResultPipeline(BasePipeline):
data = swarming_util.GetSwarmingTaskResultById(
task_id, self.HTTP_CLIENT)
task_state = data['state']
+ exit_code = (None if task_state != swarming_util.STATE_COMPLETED
+ else data['exit_code'])
lijeffrey 2016/09/07 20:41:38 how about the opposite for readability? exit_code
chanli 2016/09/07 22:37:11 Done.
step_name_no_platform = swarming_util.GetTagValue(
data.get('tags', {}), 'ref_name')
if task_state not in swarming_util.STATES_RUNNING:
task_completed = True
task = self._GetSwarmingTask(*call_args)
- if task_state == swarming_util.STATE_COMPLETED:
+ if task_state == swarming_util.STATE_COMPLETED and int(exit_code) < 2:
lijeffrey 2016/09/07 20:41:38 why 2? Is there something special about anything <
chanli 2016/09/07 22:37:11 exit_code == 0 means all tests passed; exit_code =
outputs_ref = data.get('outputs_ref')
output_json = swarming_util.GetSwarmingTaskFailureLog(
outputs_ref, self.HTTP_CLIENT)
@@ -101,8 +103,8 @@ class ProcessBaseSwarmingTaskResultPipeline(BasePipeline):
task.tests_statuses = tests_statuses
else:
task.status = analysis_status.ERROR
- logging.error('Swarming task stopped with status: %s' % (
- task_state))
+ logging.error('Swarming task stopped with status: %s and'
+ ' exit_code: %s' % (task_state, exit_code))
priority_str = swarming_util.GetTagValue(
data.get('tags', {}), 'priority')
if priority_str:
« no previous file with comments | « no previous file | appengine/findit/waterfall/test/process_flake_swarming_task_result_pipeline_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698