report_stages: do not abort hwtest suites from wrong branch
It's rude to go around aborting hwtest suites from other branches. Don't
do that.
BUG=chromium:639211
TEST=None
Change-Id: I2c0eb739388240e0e57b9c2a63beb876d71140ec
Previous-Reviewed-on: https://chromium-review.googlesource.com/374721
(cherry picked from commit 4277fb7b2348187ab27192209210ce8ce115ffcb)
Reviewed-on: https://chromium-review.googlesource.com/375039
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
diff --git a/cbuildbot/stages/report_stages.py b/cbuildbot/stages/report_stages.py
index 3fb8ebe..3a78f4c 100644
--- a/cbuildbot/stages/report_stages.py
+++ b/cbuildbot/stages/report_stages.py
@@ -275,7 +275,7 @@
written at this time rather than in ReportStage.
"""
- def _AbortPreviousHWTestSuites(self):
+ def _AbortPreviousHWTestSuites(self, milestone):
"""Abort any outstanding synchronous hwtest suites from this builder."""
# Only try to clean up previous HWTests if this is really running on one of
# our builders in a non-trybot build.
@@ -285,6 +285,7 @@
build_id, db = self._run.GetCIDBHandle()
if db:
builds = db.GetBuildHistory(self._run.config.name, 2,
+ milestone_version=milestone,
ignore_build_id=build_id)
for build in builds:
old_version = build['full_version']
@@ -396,7 +397,7 @@
# Abort previous hw test suites. This happens after reexecution as it
# requires chromite/third_party/swarming.client, which is not available
# untill after reexecution.
- self._AbortPreviousHWTestSuites()
+ self._AbortPreviousHWTestSuites(version['milestone'])
class ConfigDumpStage(generic_stages.BuilderStage):