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

Unified Diff: commit-queue/commit_queue.py

Issue 23011039: CQ: don't preserve state between runs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 4 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 | commit-queue/tests/commit_queue_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: commit-queue/commit_queue.py
===================================================================
--- commit-queue/commit_queue.py (revision 217622)
+++ commit-queue/commit_queue.py (working copy)
@@ -267,10 +267,9 @@
db_path = os.path.join(work_dir, pc.context.checkout.project_name + '.json')
if os.path.isfile(db_path):
- try:
- pc.load(db_path)
- except ValueError:
- os.remove(db_path)
+ # Do not load state, and in fact remove it when seen. This will hopefully
+ # help avoid issues with CQ committing changes without verification.
+ os.remove(db_path)
sig_handler.installHandlers(
signal.SIGINT,
@@ -299,10 +298,8 @@
pc.scan_results()
if sig_handler.getTriggeredSignals():
raise KeyboardInterrupt()
- # Save the db at each loop. The db can easily be in the 1mb range so
- # it's slowing down the CQ a tad but it in the 100ms range even for that
- # size.
- pc.save(db_path)
+ # We'd save the state here but its suspected to cause CQ to land changes
+ # without verification.
# More than a second to wait and due to sync.
now = time.time()
@@ -337,10 +334,9 @@
sys.stdout.flush()
next_loop = time.time() + options.poll_interval
finally:
- print >> sys.stderr, 'Saving db... '
- pc.save(db_path)
+ # We'd save the state here but its suspected to cause CQ to land changes
+ # without verification.
pc.close()
- print >> sys.stderr, 'Done! '
except KeyboardInterrupt as e:
print 'Bye bye'
# 23 is an arbitrary value to signal loop.sh that it must stop looping.
« no previous file with comments | « no previous file | commit-queue/tests/commit_queue_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698