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

Unified Diff: recipe_engine/recipe_api.py

Issue 2265673002: Add LogDog / annotation protobuf support. (Closed) Base URL: https://github.com/luci/recipes-py@step-formal-struct
Patch Set: Created 4 years, 4 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
Index: recipe_engine/recipe_api.py
diff --git a/recipe_engine/recipe_api.py b/recipe_engine/recipe_api.py
index fef517232a4354792d4b93efbf0850b62dee1280..2a9ad4e04764f2eccb27a76e9df44176a858253e 100644
--- a/recipe_engine/recipe_api.py
+++ b/recipe_engine/recipe_api.py
@@ -20,14 +20,15 @@ from . import field_composer
_StepConfig = collections.namedtuple('StepConfig',
- ('name', 'cmd', 'cwd', 'env', 'allow_subannotations', 'trigger_specs',
- 'timeout', 'infra_step', 'stdout', 'stderr', 'stdin', 'ok_ret',
- 'step_test_data', 'nest_level'))
+ ('name', 'base_name', 'cmd', 'cwd', 'env', 'allow_subannotations',
+ 'trigger_specs', 'timeout', 'infra_step', 'stdout', 'stderr', 'stdin',
+ 'ok_ret', 'step_test_data', 'nest_level'))
class StepConfig(_StepConfig):
"""
StepConfig parameters:
name: name of the step, will appear in buildbots waterfall
+ base_name: the base step name, not including any parent/nesting composition.
cmd: command to run, list of one or more strings
cwd: absolute path to working directory for the command
env: dict with overrides for environment variables
@@ -49,8 +50,10 @@ class StepConfig(_StepConfig):
def _make_step_config(**step):
"""Galvanize a step dictionary into a formal StepConfig."""
+ name = step.pop('name')
step_config = StepConfig(
- name=step.pop('name'),
+ name=name,
+ base_name=step.pop('base_name', name),
cmd=step.pop('cmd', None),
cwd=step.pop('cwd', None),
env=step.pop('env', None),

Powered by Google App Engine
This is Rietveld 408576698