[legacy_annotation] Raise StepFailure for failed step status
As we moved step exception emission up to `step` module in
https://crrev.com/c/2404563, `legacy_annotation` module has stopped
raising StepFailure for failed step status.
Context: http://g/luci-eng/HwfmJE4ZWM8
R=iannucci
Change-Id: I3434505f3d528cd092a68be64fbc9bddac3700b2
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/2430489
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
diff --git a/recipe_modules/legacy_annotation/api.py b/recipe_modules/legacy_annotation/api.py
index 90f52e1..73c7cf1 100644
--- a/recipe_modules/legacy_annotation/api.py
+++ b/recipe_modules/legacy_annotation/api.py
@@ -34,11 +34,12 @@
with allow_subannotation set to true.
"""
if not self.concurrency_client.supports_concurrency: # pragma: no cover
- # TODO(yiwzhang): Remove after bbagent is fully rolled out.
+ # Code path for kitchen. TODO(yiwzhang): Remove after bbagent is fully
+ # rolled out.
self.m.step._validate_cmd_list(cmd)
with self.m.context(env_prefixes={'PATH': self.m.step._prefix_path}):
env_prefixes = self.m.context.env_prefixes
- return self.step_client.run_step(self.step_client.StepConfig(
+ return self.m.step._run_or_raise_step(self.step_client.StepConfig(
name=name,
cmd=cmd,
cost=self.m.step._normalize_cost(cost),