Bug 208138

Summary: [ews] commit-queue should check that patch have appropriate review flag
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=209231
Attachments:
Description Flags
Patch
none
Patch none

Description Aakash Jain 2020-02-24 08:33:01 PST
In addition to checking cq+ flag, commit-queue should also check that patch have appropriate review flag (i.e.: r+ or no review flags). Patches with r- or r? should be rejected by commit-queue. This is the same behavior as old EWS.
Comment 1 Aakash Jain 2020-02-24 08:49:46 PST
Created attachment 391548 [details]
Patch
Comment 3 Jonathan Bedard 2020-02-24 09:28:31 PST
Comment on attachment 391548 [details]
Patch

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

> Tools/BuildSlaveSupport/ews-build/steps.py:390
> +        self.setProperty('patch_author', patch_author)

This doesn't seem to match the changelog, it looks like it's only patch_author and not commuter and reviewer as well.

> Tools/BuildSlaveSupport/ews-build/steps.py:431
> +                        self.addURL('Reviewed by: {}'.format(patch_reviewer), '')

What does 'addURL' do? I don't see a URL in this line.
Comment 4 Jonathan Bedard 2020-02-24 09:29:29 PST
(In reply to Aakash Jain from comment #2)
> Sample runs:
> https://ews-build.webkit-uat.org/#/builders/26/builds/762
> https://ews-build.webkit-uat.org/#/builders/26/builds/750

You can review your own patch!?!

I've never tried that, I would expect commit queue to reject such a patch.
Comment 5 Aakash Jain 2020-02-24 10:26:45 PST
Comment on attachment 391548 [details]
Patch

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

>> Tools/BuildSlaveSupport/ews-build/steps.py:390
>> +        self.setProperty('patch_author', patch_author)
> 
> This doesn't seem to match the changelog, it looks like it's only patch_author and not commuter and reviewer as well.

patch_committer and patch_reviewer are set in subsequent methods.

>> Tools/BuildSlaveSupport/ews-build/steps.py:431
>> +                        self.addURL('Reviewed by: {}'.format(patch_reviewer), '')
> 
> What does 'addURL' do? I don't see a URL in this line.

It adds information with a clickable url next to the build step. e.g.: see https://ews-build.webkit-uat.org/#/builders/26/builds/765

We want to display this information (about patch author/reviewer), but don't really need to link to a url.

> You can review your own patch!?!
> I've never tried that, I would expect commit queue to reject such a patch.
Updated code rejects such patches.
Comment 6 Aakash Jain 2020-02-24 10:30:10 PST
Created attachment 391555 [details]
Patch
Comment 7 Aakash Jain 2020-02-24 10:31:21 PST
Sample run for rejecting patches r+ed by patch author: https://ews-build.webkit-uat.org/#/builders/26/builds/767
Comment 8 WebKit Commit Bot 2020-02-24 16:55:59 PST
Comment on attachment 391555 [details]
Patch

Clearing flags on attachment: 391555

Committed r257284: <https://trac.webkit.org/changeset/257284>
Comment 9 WebKit Commit Bot 2020-02-24 16:56:00 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2020-02-24 16:56:14 PST
<rdar://problem/59747195>