diff options
author | Don Garrett <dgarrett@google.com> | 2015-11-04 12:47:03 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-11 14:56:25 -0800 |
commit | 07de65e812bab2951d96399fb3fb8660c10f31d1 (patch) | |
tree | 9295d57825e6042c5dfc9a3ca064315da1c67b78 /cbuildbot/stages | |
parent | 320b536d244f5414f654fbbd4ae2f3f46277f5a3 (diff) | |
download | chromite-07de65e812bab2951d96399fb3fb8660c10f31d1.tar.gz |
CommitQueueSyncStage: Fix --debug run case.
When run with --debug and no CIDB credentials, the master-paladin config
would fail by using a db connection of None.
Work around that.
BUG=None
TEST=bin/cbuildbot --buildroot ~/tmp/build_master --debug --buildbot
--branch master --buildnumber 37 master-paladin
Change-Id: I9f4e1ef2157124c268252b1c8e5fc59f85049826
Reviewed-on: https://chromium-review.googlesource.com/310874
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Paul Hobbs <phobbs@google.com>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Diffstat (limited to 'cbuildbot/stages')
-rw-r--r-- | cbuildbot/stages/sync_stages.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cbuildbot/stages/sync_stages.py b/cbuildbot/stages/sync_stages.py index dc2df54d3..0f9015e51 100644 --- a/cbuildbot/stages/sync_stages.py +++ b/cbuildbot/stages/sync_stages.py @@ -917,11 +917,14 @@ class CommitQueueSyncStage(MasterSlaveLKGMSyncStage): changes_to_test = [] _, db = self._run.GetCIDBHandle() - actions_for_changes = db.GetActionsForChanges(changes) - for change in changes: - status = clactions.GetCLPreCQStatus(change, actions_for_changes) - if status == constants.CL_STATUS_PASSED: - changes_to_test.append(change) + if db: + actions_for_changes = db.GetActionsForChanges(changes) + for change in changes: + status = clactions.GetCLPreCQStatus(change, actions_for_changes) + if status == constants.CL_STATUS_PASSED: + changes_to_test.append(change) + else: + logging.warning("DB not available, unable to filter for PreCQ passed.") # Allow Commit-Ready=+2 changes to bypass the Pre-CQ, if there are no other # changes. |