Bug 208138 - [ews] commit-queue should check that patch have appropriate review flag
Summary: [ews] commit-queue should check that patch have appropriate review flag
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-24 08:33 PST by Aakash Jain
Modified: 2020-03-18 08:07 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.99 KB, patch)
2020-02-24 08:49 PST, Aakash Jain
no flags Details | Formatted Diff | Diff
Patch (4.24 KB, patch)
2020-02-24 10:30 PST, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>