Changeset 48730 in webkit
- Timestamp:
- Sep 24, 2009 1:40:58 PM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 12 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r48722 r48730 1 2009-09-17 Eric Seidel <eric@webkit.org> 2 3 Reviewed by David Levin. 4 5 commit-queue needs web-based status reporting 6 https://bugs.webkit.org/show_bug.cgi?id=29307 7 8 Add a first-pass web-based status for the commit-queue. 9 The bot is currently reachable at: 10 http://webkit-commit-queue.appspot.com/ 11 12 * CommitQueueStatus/app.yaml: Added. 13 - Application description file required by App Engine. 14 * CommitQueueStatus/filters/__init__.py: Added. 15 - Required by python to treat 'filters' as a module. 16 * CommitQueueStatus/filters/webkit_extras.py: Added. 17 - Support for turning 'bug 123' and 'patch 123' into links. 18 This lets us use plain text strings in our logs yet display nice HTML (help prevent XSS attacks on the page). 19 * CommitQueueStatus/index.html: Added. 20 * CommitQueueStatus/index.yaml: Added. 21 - Some auto-generated file from app engine. 22 * CommitQueueStatus/queue_status.py: Added. 23 - The core logic of this bot. We could eventually split this file out into pieces. 24 * CommitQueueStatus/stylesheets/main.css: Added. 25 - Some basic lame-o CSS to make the page look less awful. 26 * CommitQueueStatus/update_status.html: Added. 27 - The form that the commit-queue (or a human) can use to update the status. 28 * Scripts/bugzilla-tool: 29 - Add some very basic update_status calls. 30 * Scripts/modules/statusbot.py: Added. 31 - Knows how to post to the CommitQueueStatus web application. 32 1 33 2009-09-24 David Kilzer <ddkilzer@apple.com> 2 34 -
trunk/WebKitTools/Scripts/bugzilla-tool
r48700 r48730 38 38 import time 39 39 40 from datetime import datetime 40 from datetime import datetime, timedelta 41 41 from optparse import OptionParser, IndentedHelpFormatter, SUPPRESS_USAGE, make_option 42 42 … … 48 48 from modules.scm import CommitMessage, detect_scm_system, ScriptError 49 49 from modules.buildbot import BuildBot 50 from modules.statusbot import StatusBot 50 51 51 52 def plural(noun): … … 626 627 options = [ 627 628 make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue. Dangerous!"), 629 make_option("--status-host", action="store", type="string", dest="status_host", default=StatusBot.default_host, help="Do not ask the user for confirmation before running the queue. Dangerous!"), 628 630 ] 629 631 Command.__init__(self, 'Run the commit queue.', options=options) … … 634 636 queue_log_path = 'commit_queue.log' 635 637 bug_logs_directory = 'commit_queue_logs' 638 639 log_date_format = "%Y-%m-%d %H:%M:%S" 640 sleep_duration_text = "5 mins" 641 seconds_to_sleep = 300 636 642 637 643 def _tee_outputs_to_files(self, files): … … 646 652 sys.stderr = self._original_stderr 647 653 648 @staticmethod 649 def _sleep(log_message): 650 log("%s Sleeping 5 minutes... %s" % (log_message, datetime.now())) 651 time.sleep(300) # Wait 5 minutes 654 @classmethod 655 def _sleep_message(cls, message): 656 wake_time = datetime.now() + timedelta(seconds=cls.seconds_to_sleep) 657 return "%s Sleeping until %s (%s)." % (message, wake_time.strftime(cls.log_date_format), cls.sleep_duration_text) 658 659 @classmethod 660 def _sleep(cls, message): 661 log(cls._sleep_message(message)) 662 time.sleep(cls.seconds_to_sleep) 663 664 def _update_status_and_sleep(self, message): 665 status_message = self._sleep_message(message) 666 self.status_bot.update_status(status_message) 667 log(status_message) 668 time.sleep(self.seconds_to_sleep) 652 669 653 670 @staticmethod … … 687 704 688 705 queue_log = self._add_log_to_output_tee(self.queue_log_path) 689 log("Running WebKit Commit Queue. %s" % datetime.now()) 706 log("Running WebKit Commit Queue. %s" % datetime.now().strftime(self.log_date_format)) 707 708 self.status_bot = StatusBot(host=options.status_host) 690 709 691 710 while (True): … … 696 715 patches = tool.bugs.fetch_patches_from_commit_queue(reject_invalid_patches=True) 697 716 if not len(patches): 698 self._ sleep("Empty queue.")717 self._update_status_and_sleep("Empty queue.") 699 718 continue 700 719 patch_ids = map(lambda patch: patch['id'], patches) … … 703 722 704 723 if not tool.buildbot.core_builders_are_green(): 705 self._ sleep("Buildersare red.")724 self._update_status_and_sleep("Builders (http://build.webkit.org) are red.") 706 725 continue 726 727 self.status_bot.update_status("Landing patches from bug %s." % first_bug_id, bug_id=first_bug_id) 707 728 except Exception, e: 729 # Don't try tell the status bot, in case telling it causes an exception. 708 730 self._sleep("Exception while checking queue and bots: %s." % e) 709 731 continue … … 716 738 self._remove_log_from_output_tee(bug_log) 717 739 718 log("Finished WebKit Commit Queue. %s" % datetime.now() )740 log("Finished WebKit Commit Queue. %s" % datetime.now().strftime(self.log_date_format)) 719 741 self._remove_log_from_output_tee(queue_log) 720 742
Note: See TracChangeset
for help on using the changeset viewer.