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

Unified Diff: pending_manager.py

Issue 6823083: Fixes incremental verification when the commit queue crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Created 9 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pending_manager.py
diff --git a/pending_manager.py b/pending_manager.py
index 5dd586d6f71172242bbf423e325dd349dba30776..7653a9f35ec18f511b29782bb67bc76ee60917a0 100644
--- a/pending_manager.py
+++ b/pending_manager.py
@@ -79,7 +79,10 @@ class PendingCommit(base.Verified):
Returns True if all Verifiers were run.
"""
for verifier in verifiers:
- assert verifier.name not in self.verifications
+ if verifier.name in self.verifications:
+ logging.warning(
+ 'Re-running verififer %s for issue %s' % (
+ verifier.name, self.issue))
verifier.verify(self, revision)
assert verifier.name in self.verifications
if self.get_state() == base.IGNORED:
@@ -161,12 +164,17 @@ class PendingManager(object):
def process_new_pending_commit(self):
"""Starts verification on newly found pending commits."""
+ expected = set(i.name for i in self.all_verifiers)
for pending in self.queue.pending_commits[:]:
try:
- if (len(pending.verifications) == len(self.all_verifiers) or
- pending.get_state() != base.PROCESSING):
+ # Take in account the case where a verifier was removed.
+ done = set(pending.verifications.keys())
+ missing = expected - done
+ if (not missing or pending.get_state() != base.PROCESSING):
continue
- logging.info('Processing issue %s' % pending.issue)
+ logging.info(
+ 'Processing issue %s (%s, %d)' % (
+ pending.issue, missing, pending.get_state()))
revision = self.checkout.prepare()
if pending.verify(revision, self.pre_patch_verifiers):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698