Changeset 50362 in webkit


Ignore:
Timestamp:
Oct 30, 2009 3:41:04 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-10-30 Eric Seidel <eric@webkit.org>

No review, rolling out r50105.
http://trac.webkit.org/changeset/50105

This commit was causing:
https://bugs.webkit.org/show_bug.cgi?id=30869
We'll re-implement the feature a different way.

  • Scripts/bugzilla-tool:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r50356 r50362  
     12009-10-30  Eric Seidel  <eric@webkit.org>
     2
     3        No review, rolling out r50105.
     4        http://trac.webkit.org/changeset/50105
     5
     6        This commit was causing:
     7        https://bugs.webkit.org/show_bug.cgi?id=30869
     8        We'll re-implement the feature a different way.
     9
     10        * Scripts/bugzilla-tool:
     11
    1122009-10-29  Jon Honeycutt  <jhoneycutt@apple.com>
    213
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r50346 r50362  
    652652    def __init__(self):
    653653        options = [
    654             make_option("--is-relaunch", action="store_true", dest="is_relaunch", default=False, help="Internal: Used by the queue to indicate that it's relaunching itself."),
    655654            make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue.  Dangerous!"),
    656655            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!"),
     
    684683        return "%s Sleeping until %s (%s)." % (message, wake_time.strftime(cls.log_date_format), cls.sleep_duration_text)
    685684
    686     def _sleep(self, message):
    687         log(self._sleep_message(message))
    688         time.sleep(self.seconds_to_sleep)
    689         self._next_patch()
     685    @classmethod
     686    def _sleep(cls, message):
     687        log(cls._sleep_message(message))
     688        time.sleep(cls.seconds_to_sleep)
    690689
    691690    def _update_status_and_sleep(self, message):
     
    694693        log(status_message)
    695694        time.sleep(self.seconds_to_sleep)
    696         self._next_patch()
    697 
    698     def _next_patch(self):
    699         # Re-exec this script to catch any updates to the script.
    700         # Make sure that the re-execed commit-queue does not wait for the user.
    701         args = sys.argv[:]
    702         if args.count("--is-relaunch") == 0:
    703             args.append("--is-relaunch")
    704         os.execvp(sys.argv[0], args)
    705695
    706696    @staticmethod
     
    723713
    724714    def execute(self, options, args, tool):
    725         if not options.is_relaunch:
    726             log("CAUTION: commit-queue will discard all local changes in %s" % tool.scm().checkout_root)
    727             if options.confirm:
    728                 response = raw_input("Are you sure?  Type 'yes' to continue: ")
    729                 if (response != 'yes'):
    730                     error("User declined.")
     715        log("CAUTION: commit-queue will discard all local changes in %s" % tool.scm().checkout_root)
     716        if options.confirm:
     717            response = raw_input("Are you sure?  Type 'yes' to continue: ")
     718            if (response != 'yes'):
     719                error("User declined.")
    731720
    732721        queue_log = self._add_log_to_output_tee(self.queue_log_path)
    733         if not options.is_relaunch:
    734             log("Running WebKit Commit Queue. %s" % datetime.now().strftime(self.log_date_format))
     722        log("Running WebKit Commit Queue. %s" % datetime.now().strftime(self.log_date_format))
    735723
    736724        self.status_bot = StatusBot(host=options.status_host)
    737725
    738         # Either of these calls could throw URLError which shouldn't stop the queue.
    739         # We catch all exceptions just in case.
    740         try:
    741             # Fetch patches instead of just bug ids to that we validate reviewer/committer flags on every patch.
    742             patches = tool.bugs.fetch_patches_from_commit_queue(reject_invalid_patches=True)
    743             if not len(patches):
    744                 self._update_status_and_sleep("Empty queue.")
    745             patch_ids = map(lambda patch: patch['id'], patches)
    746             first_bug_id = patches[0]['bug_id']
    747             log("%s in commit queue [%s]" % (pluralize('patch', len(patches)), ", ".join(patch_ids)))
    748 
    749             red_builders_names = tool.buildbot.red_core_builders_names()
    750             if red_builders_names:
    751                 red_builders_names = map(lambda name: '"%s"' % name, red_builders_names) # Add quotes around the names.
    752                 self._update_status_and_sleep("Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names))
    753 
    754             self.status_bot.update_status("Landing patches from bug %s." % first_bug_id, bug_id=first_bug_id)
    755         except Exception, e:
    756             # Don't try tell the status bot, in case telling it causes an exception.
    757             self._sleep("Exception while checking queue and bots: %s." % e)
    758 
    759         # Try to land patches on the first bug in the queue before looping
    760         bug_log_path = os.path.join(self.bug_logs_directory, "%s.log" % first_bug_id)
    761         bug_log = self._add_log_to_output_tee(bug_log_path)
    762         bugzilla_tool_path = __file__ # re-execute this script
    763         bugzilla_tool_args = [bugzilla_tool_path, 'land-patches', '--force-clean', '--commit-queue', '--quiet', first_bug_id]
    764         try:
    765             WebKitLandingScripts.run_and_throw_if_fail(bugzilla_tool_args)
    766         except ScriptError, e:
    767             # Unexpected failure!  Mark the patch as commit-queue- and comment in the bug.
    768             # exit(2) is a special exit code we use to indicate that the error was already handled by land-patches and we should keep looping anyway.
    769             if e.exit_code != 2:
    770                 tool.bugs.reject_patch_from_commit_queue(patch['id'], "Unexpected failure when landing patch!  Please file a bug against bugzilla-tool.\n%s" % e.message_with_output())
    771         self._remove_log_from_output_tee(bug_log)
    772         # self._remove_log_from_output_tee(queue_log) # implicit in the exec()
    773         self._next_patch()
     726        while (True):
     727            # Either of these calls could throw URLError which shouldn't stop the queue.
     728            # We catch all exceptions just in case.
     729            try:
     730                # Fetch patches instead of just bug ids to that we validate reviewer/committer flags on every patch.
     731                patches = tool.bugs.fetch_patches_from_commit_queue(reject_invalid_patches=True)
     732                if not len(patches):
     733                    self._update_status_and_sleep("Empty queue.")
     734                    continue
     735                patch_ids = map(lambda patch: patch['id'], patches)
     736                first_bug_id = patches[0]['bug_id']
     737                log("%s in commit queue [%s]" % (pluralize('patch', len(patches)), ", ".join(patch_ids)))
     738
     739                red_builders_names = tool.buildbot.red_core_builders_names()
     740                if red_builders_names:
     741                    red_builders_names = map(lambda name: '"%s"' % name, red_builders_names) # Add quotes around the names.
     742                    self._update_status_and_sleep("Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names))
     743                    continue
     744
     745                self.status_bot.update_status("Landing patches from bug %s." % first_bug_id, bug_id=first_bug_id)
     746            except Exception, e:
     747                # Don't try tell the status bot, in case telling it causes an exception.
     748                self._sleep("Exception while checking queue and bots: %s." % e)
     749                continue
     750
     751            # Try to land patches on the first bug in the queue before looping
     752            bug_log_path = os.path.join(self.bug_logs_directory, "%s.log" % first_bug_id)
     753            bug_log = self._add_log_to_output_tee(bug_log_path)
     754            bugzilla_tool_path = __file__ # re-execute this script
     755            bugzilla_tool_args = [bugzilla_tool_path, 'land-patches', '--force-clean', '--commit-queue', '--quiet', first_bug_id]
     756            try:
     757                WebKitLandingScripts.run_and_throw_if_fail(bugzilla_tool_args)
     758            except ScriptError, e:
     759                # Unexpected failure!  Mark the patch as commit-queue- and comment in the bug.
     760                # exit(2) is a special exit code we use to indicate that the error was already handled by land-patches and we should keep looping anyway.
     761                if e.exit_code != 2:
     762                    tool.bugs.reject_patch_from_commit_queue(patch['id'], "Unexpected failure when landing patch!  Please file a bug against bugzilla-tool.\n%s" % e.message_with_output())
     763            self._remove_log_from_output_tee(bug_log)
     764
     765        log("Finished WebKit Commit Queue. %s" % datetime.now().strftime(self.log_date_format))
     766        self._remove_log_from_output_tee(queue_log)
    774767
    775768
Note: See TracChangeset for help on using the changeset viewer.