Changeset 70023 in webkit


Ignore:
Timestamp:
Oct 18, 2010 9:11:01 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2010-10-18 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

CC authors of flaky tests when the commit-queue hits a flaky test
https://bugs.webkit.org/show_bug.cgi?id=47872

  • Scripts/webkitpy/common/checkout/api.py:
  • Scripts/webkitpy/common/net/layouttestresults.py:
  • Scripts/webkitpy/tool/commands/queues.py:
  • Scripts/webkitpy/tool/commands/queues_unittest.py:
  • Scripts/webkitpy/tool/mocktool.py:
Location:
trunk/WebKitTools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70022 r70023  
     12010-10-18  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        CC authors of flaky tests when the commit-queue hits a flaky test
     6        https://bugs.webkit.org/show_bug.cgi?id=47872
     7
     8        * Scripts/webkitpy/common/checkout/api.py:
     9        * Scripts/webkitpy/common/net/layouttestresults.py:
     10        * Scripts/webkitpy/tool/commands/queues.py:
     11        * Scripts/webkitpy/tool/commands/queues_unittest.py:
     12        * Scripts/webkitpy/tool/mocktool.py:
     13
    1142010-10-18  Eric Seidel  <eric@webkit.org>
    215
  • trunk/WebKitTools/Scripts/webkitpy/common/checkout/api.py

    r70020 r70023  
    116116        return CommitMessage("".join(changelog_messages).splitlines())
    117117
     118    def recent_commit_infos_for_files(self, paths):
     119        revisions = set(sum(map(self._scm.revisions_changing_file, paths), []))
     120        return set(map(self.commit_info_for_revision, revisions))
     121
    118122    def suggested_reviewers(self, git_commit):
    119123        changed_files = self.modified_non_changelogs(git_commit)
    120         revisions = set(sum(map(self._scm.revisions_changing_file, changed_files), []))
    121         commit_infos = set(map(self.commit_info_for_revision, revisions))
     124        commit_infos = self.recent_commit_infos_for_files(changed_files)
    122125        reviewers = [commit_info.reviewer() for commit_info in commit_infos if commit_info.reviewer()]
    123126        reviewers.extend([commit_info.author() for commit_info in commit_infos if commit_info.author() and commit_info.author().can_review])
  • trunk/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py

    r69829 r70023  
    3030
    3131from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, SoupStrainer
     32
     33
     34# FIXME: This should be unified with all the layout test results code in the layout_tests package
     35# This doesn't belong in common.net, but we don't have a better place for it yet.
     36def path_for_layout_test(test_name):
     37    return "LayoutTests/%s" % test_name
    3238
    3339
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py

    r69951 r70023  
    4040
    4141from webkitpy.common.net.bugzilla import CommitterValidator
    42 from webkitpy.common.net.layouttestresults import LayoutTestResults
     42from webkitpy.common.net.layouttestresults import path_for_layout_test, LayoutTestResults
    4343from webkitpy.common.net.statusserver import StatusServer
    4444from webkitpy.common.system.executive import ScriptError
     
    290290        return self._tool.bugs.fetch_attachment(patch.id())
    291291
     292    def _author_emails_for_tests(self, flaky_tests):
     293        test_paths = map(path_for_layout_test, flaky_tests)
     294        commit_infos = self._tool.checkout().recent_commit_infos_for_files(test_paths)
     295        return [commit_info.author().bugzilla_email() for commit_info in commit_infos if commit_info.author()]
     296
    292297    def report_flaky_tests(self, patch, flaky_tests):
    293         message = "The %s encountered the following flaky tests while processing attachment %s:\n\n%s\n\nPlease file bugs against the tests.  The commit-queue is continuing to process your patch." % (self.name, patch.id(), "\n".join(flaky_tests))
    294         self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=self.watchers)
     298        authors = self._author_emails_for_tests(flaky_tests)
     299        cc_explaination = "  The author(s) of the test(s) have been CCed on this bug." if authors else ""
     300        message = "The %s encountered the following flaky tests while processing attachment %s:\n\n%s\n\nPlease file bugs against the tests.%s  The commit-queue is continuing to process your patch." % (self.name, patch.id(), "\n".join(flaky_tests), cc_explaination)
     301        self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=authors)
    295302
    296303    # StepSequenceErrorHandler methods
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r69951 r70023  
    325325        queue = CommitQueue()
    326326        queue.bind_to_tool(MockTool())
    327         expected_stderr = """MOCK bug comment: bug_id=142, cc=[]
     327        expected_stderr = """MOCK bug comment: bug_id=142, cc=['abarth@webkit.org']
    328328--- Begin comment ---
    329329The commit-queue encountered the following flaky tests while processing attachment 197:
     
    332332bar/baz.html
    333333
    334 Please file bugs against the tests.  The commit-queue is continuing to process your patch.
     334Please file bugs against the tests.  The author(s) of the test(s) have been CCed on this bug.  The commit-queue is continuing to process your patch.
    335335--- End comment ---
    336336
  • trunk/WebKitTools/Scripts/webkitpy/tool/mocktool.py

    r69905 r70023  
    473473        return 12345
    474474
     475    def recent_commit_infos_for_files(self, paths):
     476        return [self.commit_info_for_revision(32)]
     477
    475478    def modified_changelogs(self, git_commit):
    476479        # Ideally we'd return something more interesting here.  The problem is
Note: See TracChangeset for help on using the changeset viewer.