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

Unified Diff: scripts/slave/recipe_modules/swarming/api.py

Issue 2362133003: [swarming/api] Add text in to indicate whether a shard is failing (RELAND) (Closed)
Patch Set: Rebase [retrain] 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 | scripts/slave/recipe_modules/test_utils/test_api.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/swarming/api.py
diff --git a/scripts/slave/recipe_modules/swarming/api.py b/scripts/slave/recipe_modules/swarming/api.py
index 8bc0bb3a696c2e0ac960e197f8dc0b9cd2cd2b7d..da5afa4fa99aee6f42037ffb3c88659aba0d93e0 100644
--- a/scripts/slave/recipe_modules/swarming/api.py
+++ b/scripts/slave/recipe_modules/swarming/api.py
@@ -838,7 +838,8 @@ class SwarmingApi(recipe_api.RecipeApi):
# Check if it's an internal failure.
summary = self.m.json.loads(
step_result.raw_io.output_dir['summary.json'])
- if any(shard['internal_failure'] for shard in summary['shards']):
+ if any(not shard or shard['internal_failure']
+ for shard in summary['shards']):
raise recipe_api.InfraFailure('Internal swarming failure.')
# Always show the shards' links in the collect step. (It looks
@@ -847,8 +848,12 @@ class SwarmingApi(recipe_api.RecipeApi):
links = step_result.presentation.links
for index in xrange(task.shards):
url = task.get_shard_view_url(index)
+ if summary['shards'][index].get('exit_code', None) != '0':
+ display_text = 'shard #%d (failed)' % index
+ else:
+ display_text = 'shard #%d' % index
if url:
- links['shard #%d' % index] = url
+ links[display_text] = url
step_result.isolated_script_results = \
self._merge_isolated_script_shards(task, step_result)
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/test_utils/test_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698