Bug 254914 - [EWS][git-webkit] Tools get confused when PR is created from a branch named “main”
Summary: [EWS][git-webkit] Tools get confused when PR is created from a branch named “...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-03 05:26 PDT by Adrian Perez
Modified: 2023-04-10 05:27 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2023-04-03 05:26:50 PDT
Steps to reproduce:

 1. Setup the WebKit repository for contribution.

 2. Add a commit directly on your local clone of the “main” branch.

 3. Try submitting a patch with “git webkit commit && git webkit pfr” -- fun things happen.

 4. Manually format the commit log and create the PR anyway -- EWS builds fail, e.g:

     https://ews-build.webkit.org/#/builders/5/builds/2675
     https://ews-build.webkit.org/#/builders/2/builds/2514

This happened in https://github.com/WebKit/WebKit/pull/11913 🙃️

Not sure if we want to enforce^W encourage always using a branch with
a name different from “main” or to allow it. In the first case it would be
better to get a warning from the tools, in the latter we would need to fix
the tools to not trip on “main”. IMO both solutions would be okay, I have
no strong opinion for one or the other.
Comment 1 Sam Sneddon [:gsnedders] 2023-04-03 05:29:08 PDT
It shouldn't be too hard to add a warning/error/prompt in this case, I don't think.

Does `git webkit commit` fail, or just `git webkit pr`?
Comment 2 Adrian Perez 2023-04-03 06:12:13 PDT
(In reply to Sam Sneddon [:gsnedders] from comment #1)
> It shouldn't be too hard to add a warning/error/prompt in this case, I don't
> think.
> 
> Does `git webkit commit` fail, or just `git webkit pr`?

I have double checked now:

 1. git webkit commit -> works fine

 2. git webkit pfr -> gives the message
    “'main' is not a pull request branch, enter issue URL or title of new issue:”

    Entering an issue number results in a new local branch being
    created, but the PR opened has only “???” in its title and
    summary. You can see that in this test PR that I have created
    to demonstrate this: https://github.com/WebKit/WebKit/pull/12316

I think the latter is what happened in PR 11913 which I linked in the
bug description. Then the issue with the EWS is (I think) that they
manually pushed to the “main” branch in their personal clone of the
repository, created the PR from GitHub with the appropriate commit
log formatting, and then the builders gave the error we can see in
the builder links above.
Comment 3 Sam Sneddon [:gsnedders] 2023-04-03 07:14:17 PDT
Yeah, that's what I suspected would be the case; just wanted to check there wasn't something _else_ in `git-webkit commit` too!
Comment 4 Radar WebKit Bug Importer 2023-04-10 05:27:17 PDT
<rdar://problem/107829857>