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

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

Issue 2362733002: [swarming/api] Add text in to indicate whether a shard is failing (Closed)
Patch Set: handle case shards[index] is None 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 | no next file » | 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 de26cf14f11a01db085f0a8f4b7654c3a986b60e..2202c9d1a208c2e15907668b6b565665c31c0cf2 100644
--- a/scripts/slave/recipe_modules/swarming/api.py
+++ b/scripts/slave/recipe_modules/swarming/api.py
@@ -793,8 +793,14 @@ 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] is None:
+ display_text = 'shard #%d (failed - result not received)' % index
M-A Ruel 2016/09/22 21:09:19 We should treat that as an infrastructure failure
nednguyen 2016/09/22 21:46:03 Done.
+ elif summary['shards'][index].get('exit_code', 0) != 0:
M-A Ruel 2016/09/22 21:09:19 , None) since if it's missing this is bad.
nednguyen 2016/09/22 21:46:03 Done.
+ 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698