Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/cmd/gerritbot: not possible to make cherry-pick CLs via PRs #30037

Open
dmitshur opened this issue Jan 31, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@dmitshur
Copy link
Member

commented Jan 31, 2019

I investigated whether it's possible to create cherry-pick CLs by making a Pull Request, a question that was brought up on the golang-dev mailing list here.

In order to learn whether it's supported, I made an attempt and learned from the experience:

It was possible to create the cherry-pick CL against the correct release branch by having the appropriate base branch in the PR.

However, gerritbot does not recognize it when the PR description contains Change-Id and other lines from the commit being backported. In the PR, the description ended with:

<body>

Change-Id: I09a2212eb74c63db575223277aec363c55421ed8
Reviewed-on: https://go-review.googlesource.com/c/159157
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>

In the imported CL, the commit message ended up having:

<body>

Change-Id: I09a2212eb74c63db575223277aec363c55421ed8
Reviewed-on: https://go-review.googlesource.com/c/159157
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>

Change-Id: I09a2212eb74c63db575223277aec363c55421ed8
GitHub-Last-Rev: 396cc6b3a61292ccbe3ccad4e55c3a9842145cab
GitHub-Pull-Request: golang/go#29926

In order for it to be possible to make cherry-pick CLs via gerritbot, it would need to gain support for recognizing when the PR description contains Change-Id lines from the original commit, and reuse it. So the final commit message imported by gerritbot would need to look something like:

<body>

Change-Id: I09a2212eb74c63db575223277aec363c55421ed8
Reviewed-on: https://go-review.googlesource.com/c/159157
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
GitHub-Last-Rev: 396cc6b3a61292ccbe3ccad4e55c3a9842145cab
GitHub-Pull-Request: golang/go#29926

Until this is resolved, it's not possible to send cherry-pick CLs via Pull Requests. /cc @andybons

@dmitshur dmitshur added this to the Unplanned milestone Jan 31, 2019

@gopherbot gopherbot added the Builders label Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.