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

Side by Side Diff: scripts/slave/recipe_modules/swarming/api.py

Issue 1733683002: swarming: only use text until first space for name tag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/dynamic_swarmed_gtest_mac_gpu.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import datetime 5 import datetime
6 import functools 6 import functools
7 7
8 from recipe_engine.types import freeze 8 from recipe_engine.types import freeze
9 from recipe_engine import recipe_api 9 from recipe_engine import recipe_api
10 10
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 assert isinstance(value, basestring), value 469 assert isinstance(value, basestring), value
470 args.extend(['--dimension', name, value]) 470 args.extend(['--dimension', name, value])
471 for name, value in sorted(task.env.iteritems()): 471 for name, value in sorted(task.env.iteritems()):
472 assert isinstance(value, basestring), value 472 assert isinstance(value, basestring), value
473 args.extend(['--env', name, value]) 473 args.extend(['--env', name, value])
474 474
475 # Default tags. 475 # Default tags.
476 tags = set(task.tags) 476 tags = set(task.tags)
477 tags.update(self._default_tags) 477 tags.update(self._default_tags)
478 tags.add('data:' + task.isolated_hash) 478 tags.add('data:' + task.isolated_hash)
479 tags.add('name:' + task.title) 479 tags.add('name:' + task.title.split(' ')[0])
480 mastername = self.m.properties.get('mastername') 480 mastername = self.m.properties.get('mastername')
481 if mastername: 481 if mastername:
482 tags.add('master:' + mastername) 482 tags.add('master:' + mastername)
483 if task.buildername: 483 if task.buildername:
484 tags.add('buildername:' + task.buildername) 484 tags.add('buildername:' + task.buildername)
485 if task.buildnumber: 485 if task.buildnumber:
486 tags.add('buildnumber:%d' % task.buildnumber) 486 tags.add('buildnumber:%d' % task.buildnumber)
487 if task.dimensions.get('os'): 487 if task.dimensions.get('os'):
488 tags.add('os:' + task.dimensions['os']) 488 tags.add('os:' + task.dimensions['os'])
489 if self.m.properties.get('slavename'): 489 if self.m.properties.get('slavename'):
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 924
925 def get_shard_view_url(self, index): 925 def get_shard_view_url(self, index):
926 """Returns URL of HTML page with shard details or None if not available. 926 """Returns URL of HTML page with shard details or None if not available.
927 927
928 Works only after the task has been successfully triggered. 928 Works only after the task has been successfully triggered.
929 """ 929 """
930 if self._trigger_output and self._trigger_output.get('tasks'): 930 if self._trigger_output and self._trigger_output.get('tasks'):
931 for shard_dict in self._trigger_output['tasks'].itervalues(): 931 for shard_dict in self._trigger_output['tasks'].itervalues():
932 if shard_dict['shard_index'] == index: 932 if shard_dict['shard_index'] == index:
933 return shard_dict['view_url'] 933 return shard_dict['view_url']
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/dynamic_swarmed_gtest_mac_gpu.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698