diff options
author | 2017-03-24 18:11:15 -0700 | |
---|---|---|
committer | 2017-03-27 13:48:19 +0000 | |
commit | bf3bf86709361ef5ba2055d8aa82b129f19c61ff (patch) | |
tree | 6c251fd9e0b2a709e37040f56e43f520e6c24658 /infra/bots/recipe_modules/swarming | |
parent | 342977ced701d06df2b3d2eedd8b64aeae1eb5c5 (diff) |
Manually roll recipes
build:
crrev.com/232ecb4e8e9a3175db1c14449dca0230ae01b80c Switch to an explicit swarming.summary placeholder instead of json.output.
Bug: skia:
Change-Id: I7c0dd6ce6225d48541c574ff6f38ea70e1823f1f
Reviewed-on: https://skia-review.googlesource.com/10126
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/swarming')
-rw-r--r-- | infra/bots/recipe_modules/swarming/api.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/infra/bots/recipe_modules/swarming/api.py b/infra/bots/recipe_modules/swarming/api.py index 0b370bfd19..c040bc8abc 100644 --- a/infra/bots/recipe_modules/swarming/api.py +++ b/infra/bots/recipe_modules/swarming/api.py @@ -171,7 +171,7 @@ class SkiaSwarmingApi(recipe_api.RecipeApi): swarming_tasks.append(swarming_task) step_results = self.m.swarming.trigger(swarming_tasks) for step_result in step_results: - self._add_log_links(step_result) + self._add_log_links(step_result, step_result.json.output) return swarming_tasks def collect_swarming_task(self, swarming_task): @@ -190,25 +190,26 @@ class SkiaSwarmingApi(recipe_api.RecipeApi): states_infra_failure = ( self.m.swarming.State.EXPIRED, self.m.swarming.State.TIMED_OUT, self.m.swarming.State.BOT_DIED, self.m.swarming.State.CANCELED) - if step_result.json.output['shards'][0]['state'] in states_infra_failure: + summary = step_result.swarming.summary + if summary['shards'][0]['state'] in states_infra_failure: step_result.presentation.status = self.m.step.EXCEPTION raise self.m.step.InfraFailure(e.name, step_result) raise finally: step_result = self.m.step.active_result # Add log link. - self._add_log_links(step_result) + self._add_log_links(step_result, step_result.swarming.summary) return rv - def _add_log_links(self, step_result): + def _add_log_links(self, step_result, summary): """Add Milo log links to all shards in the step.""" ids = [] - shards = step_result.json.output.get('shards') + shards = summary.get('shards') if shards: for shard in shards: ids.append(shard['id']) else: - for _, task in step_result.json.output.get('tasks', {}).iteritems(): + for _, task in summary.get('tasks', {}).iteritems(): ids.append(task['task_id']) for idx, task_id in enumerate(ids): link = MILO_LOG_LINK % task_id |