Bug 197519

Summary: webkit-patch --no-review upload does not submit patch to New EWS
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, dewei_zhu, ews-watchlist, glenn, jbedard, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Screenshot - Not submitted to New EWS
none
Patch
none
Archive of layout-test-results from ews212 for win-future
none
Patch none

Description Daniel Bates 2019-05-02 11:11:23 PDT
Created attachment 368790 [details]
Screenshot - Not submitted to New EWS

Ran `Tools/Scripts/webkit-patch upload -g HEAD --no-review 197480` today, here's the output, emphasis mine:

$ Tools/Scripts/webkit-patch upload -g HEAD --no-review 197480
Total errors found: 0 in 23 files
4 files to edit
Was that diff correct? [Y/n]: Y
Reading Keychain for bugs.webkit.org account and password.  Click "Allow" to continue...
Could not find a keychain entry for bugs.webkit.org.
Reading Keychain for bugs.webkit.org account and password.  Click "Allow" to continue...
Logging in as dbates@webkit.org...
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197480&ctype=xml&excludefield=attachmentdata
Obsoleting 1 old patch on bug 197480
Obsoleting attachment: 368720
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197480&ctype=xml&excludefield=attachmentdata
Adding patch "Patch" to https://bugs.webkit.org/show_bug.cgi?id=197480
Fetching: https://bugs.webkit.org/attachment.cgi?id=368787&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197480&ctype=xml&excludefield=attachmentdata
***Submitting attachment 368787 [details] to EWS queues***

The patch was submitted to the old EWS, but was not submitted to the new EWS.
Comment 1 Radar WebKit Bug Importer 2019-05-02 15:36:01 PDT
<rdar://problem/50424887>
Comment 2 Aakash Jain 2019-05-02 16:42:04 PDT
Created attachment 368844 [details]
Patch
Comment 3 Aakash Jain 2019-05-02 16:44:27 PDT
(In reply to Aakash Jain from comment #2)
> Created attachment 368844 [details]
This patch was uploaded using the 'webkit-patch upload --no-review' command. It did submit the patch to both old and new EWS. Logs:

[~/code/OpenSource/Tools]$webkit-patch upload --no-review 197519
Total errors found: 0 in 11 files
Was that diff correct? [Y/n]: 
Reading Keychain for bugs.webkit.org account and password.  Click "Allow" to continue...
Could not find a keychain entry for bugs.webkit.org.
Reading Keychain for bugs.webkit.org account and password.  Click "Allow" to continue...
Logging in as aakash_jain@apple.com...
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197519&ctype=xml&excludefield=attachmentdata
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197519&ctype=xml&excludefield=attachmentdata
Adding patch "Patch" to https://bugs.webkit.org/show_bug.cgi?id=197519
Fetching: https://bugs.webkit.org/attachment.cgi?id=368844&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197519&ctype=xml&excludefield=attachmentdata
Submitting attachment 368844 [details] to EWS queues
Submitting attachment 368844 [details] to EWS queues
Comment 4 EWS Watchlist 2019-05-02 18:20:20 PDT Comment hidden (obsolete)
Comment 5 EWS Watchlist 2019-05-02 18:20:22 PDT Comment hidden (obsolete)
Comment 6 Jonathan Bedard 2019-05-03 10:19:10 PDT
Comment on attachment 368844 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368844&action=review

> Tools/ChangeLog:17
> +        * Scripts/webkitpy/common/net/ewsserver_unittest.py: Added unit-test.

Unit test for the EWSServer class or unit test for the MockEWSServer class?

> Tools/Scripts/webkitpy/common/net/ewsserver.py:35
> +        self.use_https = bool(use_https)

Would it ever be valid to NOT use https here?

> Tools/Scripts/webkitpy/common/net/ewsserver_mock.py:32
> +        self.use_https = True

Why do we need use_https?

> Tools/Scripts/webkitpy/common/net/ewsserver_unittest.py:34
> +        self.assertTrue(ews_server.use_https)

This doesn't seem like a very useful test. I think we could actually try the submit_to_ews(...) function, I think that MockBrowser() provides enough to let that work.
Comment 7 Aakash Jain 2019-05-03 13:57:56 PDT
Comment on attachment 368844 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368844&action=review

>> Tools/ChangeLog:17
>> +        * Scripts/webkitpy/common/net/ewsserver_unittest.py: Added unit-test.
> 
> Unit test for the EWSServer class or unit test for the MockEWSServer class?

For EWSServer class.

>> Tools/Scripts/webkitpy/common/net/ewsserver.py:35
>> +        self.use_https = bool(use_https)
> 
> Would it ever be valid to NOT use https here?

It might be valid if for some reason https is not configured properly on the server (e.g.: submitting the patches to a UAT instance of EWS). I can't think of another strong reason. I was trying to keep it consistent with similar statusserver code. use_https was added by Dan Bates in r232979. I believe he might have encountered a scenario in which there was a need to use http instead of https.

>> Tools/Scripts/webkitpy/common/net/ewsserver_mock.py:32
>> +        self.use_https = True
> 
> Why do we need use_https?

Removing in updated patch.

>> Tools/Scripts/webkitpy/common/net/ewsserver_unittest.py:34
>> +        self.assertTrue(ews_server.use_https)
> 
> This doesn't seem like a very useful test. I think we could actually try the submit_to_ews(...) function, I think that MockBrowser() provides enough to let that work.

Improved unit-test little bit, it now executes the submit_to_ews method. Note that upload_unittest.py also cover submit_to_ews to some extent.
Comment 8 Aakash Jain 2019-05-03 14:05:17 PDT
Created attachment 368985 [details]
Patch
Comment 9 Jonathan Bedard 2019-05-03 14:32:27 PDT
(In reply to Aakash Jain from comment #7)
...
> > 
> > Would it ever be valid to NOT use https here?
> 
> It might be valid if for some reason https is not configured properly on the
> server (e.g.: submitting the patches to a UAT instance of EWS). I can't
> think of another strong reason. I was trying to keep it consistent with
> similar statusserver code. use_https was added by Dan Bates in r232979. I
> believe he might have encountered a scenario in which there was a need to
> use http instead of https.

I hadn't thought about UAT, that would be a good reason.
Comment 10 Jonathan Bedard 2019-05-03 14:34:33 PDT
Looks good to me, unofficial r+.
Comment 11 WebKit Commit Bot 2019-05-03 14:58:31 PDT
Comment on attachment 368985 [details]
Patch

Clearing flags on attachment: 368985

Committed r244923: <https://trac.webkit.org/changeset/244923>
Comment 12 WebKit Commit Bot 2019-05-03 14:58:32 PDT
All reviewed patches have been landed.  Closing bug.