build_stages: Add logging to CancelObsoleteSlaveBuilds.
CancelObsoleteSlaveBuilds isn't always working in production, so add
logging to help with debugging.
BUG=chromium:855801
TEST=run_tests
Change-Id: I7d7a4db8d49f79610b46fcc8b62be64d4f543dc3
Reviewed-on: https://chromium-review.googlesource.com/1112855
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mike Nichols <mikenichols@chromium.org>
diff --git a/cbuildbot/stages/build_stages.py b/cbuildbot/stages/build_stages.py
index cb5e268..0bf3fc0 100644
--- a/cbuildbot/stages/build_stages.py
+++ b/cbuildbot/stages/build_stages.py
@@ -188,6 +188,7 @@
buildbucket_client = self.GetBuildbucketClient()
if not buildbucket_client:
+ logging.info('No buildbucket_client, not cancelling slaves.')
return
# Find the 3 most recent master buildbucket ids.
@@ -202,7 +203,9 @@
slave_ids = []
# Find the scheduled or started slaves for those master builds.
- for master_id in buildbucket_lib.ExtractBuildIds(master_builds):
+ master_ids = buildbucket_lib.ExtractBuildIds(master_builds)
+ logging.info('Found Previous Master builds: %s', ', '.join(master_ids))
+ for master_id in master_ids:
for status in [constants.BUILDBUCKET_BUILDER_STATUS_SCHEDULED,
constants.BUILDBUCKET_BUILDER_STATUS_STARTED]:
builds = buildbucket_client.SearchAllBuilds(