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

gerrit, x/review/git-codereview: give may-forge-author permission to approvers #55841

Closed
cherrymui opened this issue Sep 23, 2022 · 7 comments
Closed
Assignees
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@cherrymui
Copy link
Member

Currently, on Gerrit, the "Rebase" and "cherry-pick" buttons on the Gerrit UI require may-forge-author permission, if you're not the author of the original CL. This sometimes causes inconvenience. We are considering giving all Gerrit approvers (who can +2 CLs) may-forge-author permission.

A concern is that one might accidentally mail a CL that overwrites someone else's pending CL. To prevent that we're considering making the git-codereview tool check the author before mailing the CL, and adding a flag so if one actually needs to upload a forged CL one can use git mail -forge.

cc @golang/release @rsc

@cherrymui cherrymui added this to the Unreleased milestone Sep 23, 2022
@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 23, 2022
@mvdan
Copy link
Member

mvdan commented Sep 23, 2022

I would love to be able to rebase CLs. In particular, when an older CL was reviewed and ready, but I want to re-test it on master before landing it.

@dmitshur dmitshur added this to Planned in Go Release Team Sep 27, 2022
@heschi
Copy link
Contributor

heschi commented Jan 11, 2023

It turns out that our may-forge-author group conflates two permissions, and I didn't realize it:

  • The Forge Author Identity permission, which allows exactly what it says: setting the Author field to something that isn't the uploader. This seems pretty harmless; Author and Uploader are right next to each other in the UI, so I don't see much risk of confusion.
  • Add Patch Set on all CLs, which allows someone to upload a patchset to someone else's CL. Presumably they also need Forge Author Identity to do this. This is the dangerous one.

It seems to me that there's no reason not to grant Forge Author Identity to all approvers right now - it makes cherrypicks easier and has no downsides I can see.

That still leaves Add Patch Set. We can make a decision about that later. For my reference, are there use cases other than doing trivial rebases? The Gerrit team is working on improvements for that specific case that don't open up misuse concerns.

@heschi
Copy link
Contributor

heschi commented Jan 12, 2023

I've granted Forge Author Identity to the approvers group.

@heschi
Copy link
Contributor

heschi commented Jan 12, 2023

In an effort to remove unused permissions, I cleared out may-forge-author.

@FiloSottile, you were the only active non-Googler in the group as far as I could tell from a quick glance. Would you like me to add you back?

@FiloSottile
Copy link
Contributor

I do use Add Patch Set for a couple of purposes: occasionally I pick up an old CL from the review queue, and fix it up and get it reviewed by someone else without breaking the review history; and I often clean up the commit message before submitting. They're both ways to cut down on review round-trips, so not critical but convenient. The former I could also do less elegantly by abandoning and opening a new CL, the latter not so much.

@heschi
Copy link
Contributor

heschi commented Jan 12, 2023

Added.

@heschi
Copy link
Contributor

heschi commented Mar 21, 2023

The Gerrit team has launched support for trivial rebases without special permissions; you can see an example of @dmitshur using it at https://go-review.git.corp.google.com/c/build/+/477775/6#message-6beb8aa86e9796a603ef6de08318fa52b3ca80ac.

I believe that takes care of enough of the use cases for Add Patch Set that we can consider this fixed. I'll leave the Gerrit group alone since there are only 4 people in it.

@heschi heschi closed this as completed Mar 21, 2023
@golang golang locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Archived in project
Development

No branches or pull requests

6 participants