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

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

Issue 1720873002: swarming: always append task's OS dimension to step name (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/swarming/example.expected/basic_0.4.json » ('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 46fbf244f5bcc97a1bdcd65cfe06af18eeeae26a..a87f09f43532f6a0e0c811981dbb1989069d723c 100644
--- a/scripts/slave/recipe_modules/swarming/api.py
+++ b/scripts/slave/recipe_modules/swarming/api.py
@@ -750,26 +750,22 @@ class SwarmingApi(recipe_api.RecipeApi):
def _get_step_name(self, prefix, task):
"""SwarmingTask -> name of a step of a waterfall.
- Will take a task title (+ step name prefix) and optionally append
- OS dimension to it in case the task is triggered on OS that is different
- from OS this recipe is running on. It shortens step names for the most
- common case of triggering a task on the same OS as one that recipe
- is running on.
+ Will take a task title (+ step name prefix) and append OS dimension to it.
Args:
prefix: prefix to append to task title, like 'trigger'.
task: SwarmingTask instance.
Returns:
- '[<prefix>] <task title> (on <OS>)' where <OS> is optional.
+ '[<prefix>] <task title> on <OS>'
"""
prefix = '[%s] ' % prefix if prefix else ''
-
task_os = task.dimensions['os']
- bot_os = self.prefered_os_dimension(self.m.platform.name)
- suffix = '' if task_os == bot_os else ' on %s' % task_os
-
- return ''.join((prefix, task.title, suffix))
+ # Note: properly detecting dimensions of the bot the recipe is running
+ # on is somewhat non-trivial. It is not safe to assume it uses default
+ # or preferred dimensions for its OS. For example, the version of the OS
+ # can differ.
+ return ''.join((prefix, task.title, ' on %s' % task_os))
def get_collect_cmd_args(self, task):
"""SwarmingTask -> argument list for 'swarming.py' command."""
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/swarming/example.expected/basic_0.4.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698