Changeset 90636 in webkit


Ignore:
Timestamp:
Jul 8, 2011 8:58:29 AM (13 years ago)
Author:
abarth@webkit.org
Message:

sheriffbot is too spammy in IRC
https://bugs.webkit.org/show_bug.cgi?id=64153

Reviewed by Eric Seidel.

Reporting failures in IRC worked well when the tree was greener than it
is today. Nowadays, this feature mostly just results in spam about
false positives. If we reach a greener state, we can bring this code
back.

(Another possibility is to restrict this feature to builder bots,
rather than including testers, as we did before this patch.)

  • Scripts/webkitpy/tool/commands/sheriffbot.py:
  • Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90632 r90636  
     12011-07-08  Adam Barth  <abarth@webkit.org>
     2
     3        sheriffbot is too spammy in IRC
     4        https://bugs.webkit.org/show_bug.cgi?id=64153
     5
     6        Reviewed by Eric Seidel.
     7
     8        Reporting failures in IRC worked well when the tree was greener than it
     9        is today.  Nowadays, this feature mostly just results in spam about
     10        false positives.  If we reach a greener state, we can bring this code
     11        back.
     12
     13        (Another possibility is to restrict this feature to builder bots,
     14        rather than including testers, as we did before this patch.)
     15
     16        * Scripts/webkitpy/tool/commands/sheriffbot.py:
     17        * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
     18
    1192011-07-08  Adam Roben  <aroben@apple.com>
    220
  • trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py

    r87107 r90636  
    4444    ]
    4545
    46     def _update(self):
    47         self.run_webkit_patch(["update", "--force-clean", "--quiet"])
    48 
    4946    # AbstractQueue methods
    5047
     
    6360    def next_work_item(self):
    6461        self._irc_bot.process_pending_messages()
    65         self._update()
    66 
    67         # FIXME: We need to figure out how to provoke_flaky_builders.
    68 
    69         failure_map = self._tool.buildbot.failure_map()
    70         failure_map.filter_out_old_failures(self._is_old_failure)
    71         if failure_map.is_empty():
    72             return None
    73         return failure_map
     62        return
    7463
    7564    def should_proceed_with_work_item(self, failure_map):
     
    7867
    7968    def process_work_item(self, failure_map):
    80         failing_revisions = failure_map.failing_revisions()
    81         number_of_failing_revisions = len(failing_revisions)
    82         for revision in failing_revisions:
    83             builders = failure_map.builders_failing_for(revision)
    84             try:
    85                 commit_info = self._tool.checkout().commit_info_for_revision(revision)
    86                 if not commit_info:
    87                     print "FAILED to fetch CommitInfo for r%s, likely missing ChangeLog" % revision
    88                     continue
    89                 self._sheriff.post_irc_warning(commit_info, builders)
    90                 # We used to post on bugs, but it was too spammy.
    91             finally:
    92                 for builder in builders:
    93                     self._tool.status_server.update_svn_revision(revision, builder.name())
    94         self._sheriff.post_irc_summary(failure_map)
    9569        return True
    9670
  • trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py

    r88581 r90636  
    3535
    3636class SheriffBotTest(QueuesTest):
    37     builder1 = MockBuilder("Builder1")
    38     builder2 = MockBuilder("Builder2")
    39 
    40     def test_sheriff_bot(self):
    41         tool = MockTool()
    42         mock_work_item = MockFailureMap(tool.buildbot)
    43         expected_stderr = {
    44             "begin_work_queue": self._default_begin_work_queue_stderr("sheriff-bot", tool.scm().checkout_root),
    45             "next_work_item": "",
    46             "process_work_item": """MOCK: irc.post: abarth, darin, eseidel: http://trac.webkit.org/changeset/29837 might have broken Builder1
    47 MOCK: irc.post: New failures: mock-test-1
    48 """,
    49             "handle_unexpected_error": "Mock error message\n",
    50         }
    51         self.assert_queue_outputs(SheriffBot(), work_item=mock_work_item, expected_stderr=expected_stderr)
    52 
    53     def test_many_failing_tests(self):
    54         tool = MockTool()
    55         mock_work_item = MockFailureMap(tool.buildbot)
    56         mock_work_item.failing_tests = lambda: set(["test1", "test2", "test3", "test4", "test5", "test6", "test7"])
    57         expected_stderr = {
    58             "begin_work_queue": self._default_begin_work_queue_stderr("sheriff-bot", tool.scm().checkout_root),
    59             "next_work_item": "",
    60             "process_work_item": """MOCK: irc.post: abarth, darin, eseidel: http://trac.webkit.org/changeset/29837 might have broken Builder1
    61 MOCK: irc.post: New failures: test1, test2, test3, test4, test5 (and 2 more...)
    62 """,
    63             "handle_unexpected_error": "Mock error message\n",
    64         }
    65         self.assert_queue_outputs(SheriffBot(), work_item=mock_work_item, expected_stderr=expected_stderr)
     37    pass  # No unittests as the moment.
Note: See TracChangeset for help on using the changeset viewer.