Changeset 90636 in webkit
- Timestamp:
- Jul 8, 2011 8:58:29 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90632 r90636 1 2011-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 1 19 2011-07-08 Adam Roben <aroben@apple.com> 2 20 -
trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py
r87107 r90636 44 44 ] 45 45 46 def _update(self):47 self.run_webkit_patch(["update", "--force-clean", "--quiet"])48 49 46 # AbstractQueue methods 50 47 … … 63 60 def next_work_item(self): 64 61 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 74 63 75 64 def should_proceed_with_work_item(self, failure_map): … … 78 67 79 68 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" % revision88 continue89 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)95 69 return True 96 70 -
trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py
r88581 r90636 35 35 36 36 class 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.