WebKit Bugzilla
Attachment 347077 Details for
Bug 186140
: Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186140-20180814211425.patch (text/plain), 12.44 KB, created by
darshan
on 2018-08-14 08:44:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
darshan
Created:
2018-08-14 08:44:35 PDT
Size:
12.44 KB
patch
obsolete
>Subversion Revision: 234085 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7559b6fbc27a45b4387431aea1db8243f27d2c3b..e5096640c9f4924ceeebc3c05f923032db70aea5 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,32 @@ >+2018-08-14 Darshan Kadu <dkadu@igalia.com> >+ >+ Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links >+ https://bugs.webkit.org/show_bug.cgi?id=186140 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added a optional paramter see_also to post_comment_to_bug and added see_also >+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: >+ (Bugzilla.post_comment_to_bug): >+ >+ Modified mock for see_also parameter >+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: >+ (MockBugzilla.post_comment_to_bug): >+ >+ Made following unit tests to have see_also in bug comment >+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py: >+ * Scripts/webkitpy/tool/bot/sheriff_unittest.py: >+ (SheriffTest.test_post_blame_comment_on_bug): >+ * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: >+ * Scripts/webkitpy/tool/commands/queues_unittest.py: >+ * Scripts/webkitpy/tool/commands/upload_unittest.py: >+ * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: >+ * Scripts/webkitpy/w3c/test_exporter.py: >+ (WebPlatformTestExporter.make_pull_request): >+ * Scripts/webkitpy/w3c/test_exporter_unittest.py: >+ (TestExporterTest.MockBugzilla.post_comment_to_bug): >+ (TestExporterTest.test_export): >+ > 2018-07-20 John Wilander <wilander@apple.com> > > Resource Load Statistics: Enable basic functionality in experimental debug mode >diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >index 056c8075142b3e9a7a0403cecc023b57c7e1d87d..288f090662b2e7505824b338413cdf8bac289eb5 100644 >--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >@@ -851,13 +851,16 @@ class Bugzilla(object): > self.browser["newcc"] = ", ".join(email_address_list) > self.browser.submit() > >- def post_comment_to_bug(self, bug_id, comment_text, cc=None): >+ def post_comment_to_bug(self, bug_id, comment_text, cc=None, see_also=None): > self.authenticate() > > _log.info("Adding comment to bug %s" % bug_id) > self.open_url(self.bug_url_for_bug_id(bug_id)) > self.browser.select_form(name="changeform") > self.browser["comment"] = comment_text >+ if see_also: >+ _log.info("Adding PR link to See Also List for bug %s" % bug_id) >+ self.browser["see_also"] = ", ".join(see_also) > if cc: > self.browser["newcc"] = ", ".join(cc) > self.browser.submit() >diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py >index fb08ae9ce538ea1b2daa9e11e38e4643e7f9428b..3dfa4aabe6d3186da868a375d273c5edc6974c51 100644 >--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py >+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py >@@ -468,9 +468,9 @@ class MockBugzilla(object): > _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s'" % ( > flag_name, flag_value, attachment_id, comment_text)) > >- def post_comment_to_bug(self, bug_id, comment_text, cc=None): >- _log.info("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % ( >- bug_id, cc, comment_text)) >+ def post_comment_to_bug(self, bug_id, comment_text, cc=None, see_also=None): >+ _log.info("MOCK bug comment: bug_id=%s, cc=%s, see_also=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % ( >+ bug_id, cc, see_also, comment_text)) > > def add_attachment_to_bug(self, bug_id, file_or_string, description, filename=None, comment_text=None, mimetype=None): > _log.info("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s mimetype=%s" % >diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py >index 7b85d5b34c16ccf889be10b78ade27770f9c42f8..1bd9d7cdcef7ff22979f4cd5b40416d6165ea554 100644 >--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py >@@ -127,7 +127,7 @@ component: Tools / Tests > cc: abarth@webkit.org > blocked: 50856 > MOCK add_attachment_to_bug: bug_id=60001, description=Failure diff from mock-bot-id filename=failure.diff mimetype=None >-MOCK bug comment: bug_id=50000, cc=None >+MOCK bug comment: bug_id=50000, cc=None, see_also=None > --- Begin comment --- > The dummy-queue encountered the following flaky tests while processing attachment 10000: > >diff --git a/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py b/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py >index 78e7965aea7815f0abe71aaaca64e49e16e528cf..416592d2ee473a55fa54f8518a2ce902ba3bb900 100644 >--- a/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py >@@ -65,19 +65,19 @@ class SheriffTest(unittest.TestCase): > sheriff.post_blame_comment_on_bug(commit_info, builders, ["mock-test-1"]) > sheriff.post_blame_comment_on_bug(commit_info, builders, ["mock-test-1", "mock-test-2"]) > >- expected_logs = u"""MOCK bug comment: bug_id=1234, cc=['watcher@example.com'] >+ expected_logs = u"""MOCK bug comment: bug_id=1234, cc=['watcher@example.com'], see_also=None > --- Begin comment --- > https://trac.webkit.org/changeset/4321 might have broken Foo and Bar > --- End comment --- > >-MOCK bug comment: bug_id=1234, cc=['watcher@example.com'] >+MOCK bug comment: bug_id=1234, cc=['watcher@example.com'], see_also=None > --- Begin comment --- > https://trac.webkit.org/changeset/4321 might have broken Foo and Bar > The following tests are not passing: > mock-test-1 > --- End comment --- > >-MOCK bug comment: bug_id=1234, cc=['watcher@example.com'] >+MOCK bug comment: bug_id=1234, cc=['watcher@example.com'], see_also=None > --- Begin comment --- > https://trac.webkit.org/changeset/4321 might have broken Foo and Bar > The following tests are not passing: >diff --git a/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py b/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py >index e88a86fa55e1c1a6b969e78997f4a51c72a3db36..15c0b1f22c51a022c835720f6221c2f304aff781 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py >@@ -43,7 +43,7 @@ Message2." > > def test_args_parsing_with_bug(self): > expected_logs = """MockWatchList: determine_cc_and_messages >-MOCK bug comment: bug_id=50002, cc=set(['eric@webkit.org', 'levin@chromium.org', 'abarth@webkit.org']) >+MOCK bug comment: bug_id=50002, cc=set(['eric@webkit.org', 'levin@chromium.org', 'abarth@webkit.org']), see_also=None > --- Begin comment --- > Message1. > >diff --git a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >index ab64143ccfcd4f374b1211663e780db92e49e11c..3ea8785610315bacb8b1c833daee3df20aa216a9 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >@@ -424,14 +424,14 @@ MOCK: release_work_item: commit-queue 10000 > > def test_report_flaky_tests(self): > queue = TestCommitQueue(MockTool()) >- expected_logs = """MOCK bug comment: bug_id=50002, cc=None >+ expected_logs = """MOCK bug comment: bug_id=50002, cc=None, see_also=None > --- Begin comment --- > The commit-queue just saw foo/bar.html flake (text diff) while processing attachment 10000 on bug 50000. > Port: MockPort Platform: MockPlatform 1.0 > --- End comment --- > > MOCK add_attachment_to_bug: bug_id=50002, description=Failure diff from bot filename=failure.diff mimetype=None >-MOCK bug comment: bug_id=50002, cc=None >+MOCK bug comment: bug_id=50002, cc=None, see_also=None > --- Begin comment --- > The commit-queue just saw bar/baz.html flake (text diff) while processing attachment 10000 on bug 50000. > Port: MockPort Platform: MockPlatform 1.0 >@@ -439,7 +439,7 @@ Port: MockPort Platform: MockPlatform 1.0 > > bar/baz-diffs.txt does not exist in results archive, uploading entire archive. > MOCK add_attachment_to_bug: bug_id=50002, description=Archive of layout-test-results from bot filename=layout-test-results.zip mimetype=None >-MOCK bug comment: bug_id=50000, cc=None >+MOCK bug comment: bug_id=50000, cc=None, see_also=None > --- Begin comment --- > The commit-queue encountered the following flaky tests while processing attachment 10000: > >diff --git a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py >index b51d3e409fbdd268df6778a58103f4fda969ea39..afa79fc57c108fcaf50d96872caa93d96ad6b277 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py >@@ -194,7 +194,7 @@ Revision: 9876 > MOCK: user.open_url: http://example.com/50000 > Is this correct? > Adding comment to Bug 50000. >-MOCK bug comment: bug_id=50000, cc=None >+MOCK bug comment: bug_id=50000, cc=None, see_also=None > --- Begin comment --- > MOCK comment > >diff --git a/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py b/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py >index a978f4164852ceadec85ffd27046a2a738cb680f..b74f5c952b88d0c940dc25d74443f6cc2a1f9166 100644 >--- a/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py >+++ b/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py >@@ -42,7 +42,7 @@ class ApplyWatchListTest(unittest.TestCase): > 'diff': 'The diff', > } > expected_logs = """MockWatchList: determine_cc_and_messages >-MOCK bug comment: bug_id=50001, cc=set(['levin@chromium.org']) >+MOCK bug comment: bug_id=50001, cc=set(['levin@chromium.org']), see_also=None > --- Begin comment --- > Message2. > --- End comment --- >diff --git a/Tools/Scripts/webkitpy/w3c/test_exporter.py b/Tools/Scripts/webkitpy/w3c/test_exporter.py >index 6a72d156766554d2a61d78798549ca2bf003df8a..7290311ed04dc980748d8d1e448a112309880ef1 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_exporter.py >+++ b/Tools/Scripts/webkitpy/w3c/test_exporter.py >@@ -324,7 +324,8 @@ class WebPlatformTestExporter(object): > _log.warning(e) > _log.info('Could not add label "%s" to pr #%s. User "%s" may not have permission to update labels in the %s/%s repo.' % (WEBKIT_EXPORT_PR_LABEL, pr_number, self.username, WPT_GH_ORG, WPT_GH_REPO_NAME)) > if self._bug_id and pr_number: >- self._bugzilla.post_comment_to_bug(self._bug_id, "Submitted web-platform-tests pull request: " + WPT_PR_URL + str(pr_number)) >+ pr_url = WPT_PR_URL + str(pr_number) >+ self._bugzilla.post_comment_to_bug(self._bug_id, "Submitted web-platform-tests pull request: " + pr_url, see_also=[pr_url]) > > def create_wpt_pull_request(self, remote_branch_name, title, body): > pr_number = None >diff --git a/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py b/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >index 1efe507a8050bb89c5aa7d1f8375d35ac1928177..01bb1894cb65205ac32c6aba3dc7d2123f720d05 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >+++ b/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >@@ -41,7 +41,9 @@ class TestExporterTest(unittest.TestCase): > self.calls.append('fetch bug ' + id) > return {"title": "my bug title"} > >- def post_comment_to_bug(self, id, comment): >+ def post_comment_to_bug(self, id, comment, see_also=None): >+ if see_also: >+ self.calls.append("Append %s to see also list" % ", ".join(see_also)) > self.calls.append('post comment to bug ' + id + ' : ' + comment) > return True > >@@ -148,6 +150,7 @@ class TestExporterTest(unittest.TestCase): > 'reset hard origin/master']) > self.assertEquals(exporter._bugzilla.calls, [ > 'fetch bug 1234', >+ 'Append https://github.com/web-platform-tests/wpt/pull/5678 to see also list', > 'post comment to bug 1234 : Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/5678']) > self.assertEquals(mock_linter.calls, ['/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests', 'lint']) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186140
:
345458
|
345509
|
345693
|
345807
|
346016
|
346017
|
346044
|
347077
|
347078
|
347083
|
347084