Codereview: Should the Go project stop importing GitHub PRs?
github.com
github.com
Gerrit is not a bad tool but it is somewhat hard to get used to if you have the more common GitHub-flavored git experience that most software engineers have these days.
I expect if the goal is to get the most vibrant contributor community possible the best thing would be to move to a GitHub-first workflow where Gerrit is supported as a backup. But there’s too much inertia for that to ever happen.
Here's a good example of what I mean, taking a change from ChromiumOS's Gerrit versus a random patch on Phorge (a fork of Phabricator which uses a similar workflow):
- https://chromium-review.googlesource.com/c/chromiumos/third_...
The Gerrit one is really busy in my opinion, while the Phorge one gives the page a lot more breathing room, which I think just makes viewing it much easier and less intimidating. Despite that Phorge is still good for power users: it shows all the needed information, has hotkey shortcuts for fast navigation, nice diff viewer, nice side panel with all diffs listed, etc.
I'm trying to set up Gerrit right now and the really compact UI is honestly my main complaint. Maybe someone who's better at UI/UX can give more refined comparison or analysis, but the nice, "bigger" design of Phabricator/Phorge's diff viewer is something I really miss. (I also like the "untabbed" design of Phorge, contra GitHub; all the comments, changes, and code is on one page, instead of having to click back and forth between comments and diffs.)
It was a lot easier to show how contributions stacked, to continue iterating on a “branch” while waiting for a review from the team, and worked better with trunk-based development workflows.
Gerrit seems to have a lot of extra features in it that make it extra confusing to me. Critique has a lot of features but all of them feel more like intuitive extensions on top of a code review platform (ex: attention set https://abseil.io/resources/swe-book/html/ch19.html). Gerrit seems to have a lot more going on in a much smaller (cramped IMO) UI.
From the sounds of it, the only situation where this PR-mirroring works properly, is PRs without any comments, which I imagine are quite rare. But if your PR does have comments, then you not only have to sign up for Gerrit anyways, but you're also responsible for keeping the GitHub PR and Gerrit PR in sync. That sounds horrible.
If you want to do the reviews in Gerrit, then that's more annoying, but the changes can still be made on GitHub.
It's a code review platform used heavily by Google.
The GitHub workflow is great for many projects but doesn’t really scale to thousands of contributors, every large project on GitHub (e.g. Kubernetes, VSCode) end up with loads of tooling, loads of pain, and a bad experience for contributors and maintainers.
Also Gerrit isn’t proprietary. It’s git for the VCS and gerrit is just a web app on top of that. It just works in a different model to GitHub.
If it's an open source project, it should be using an open source review platform that allows improvements and specialization of the code hosting too. Using github, where the review tools are bad and can't be improved by an outsider, is a slap in the face to open source.
Frankly, I'm tired of people using github. The fact that it still doesn't have any idea of patchsets and diffs between them is cripplingly bad (i.e. you force push a new version of your change, there's no easy way to review the diff between the old and new version of your change). Having to use yet more third party tools, like https://reviewable.io, isn't an answer to this, it's just a sign that github should be open source so these could be forks or first-party tools.
It's also just insulting for an open source project to force people to use a proprietary platform owned by microsoft.
1. As an author, responding to review feedback is a back-and-forth between my editor and the code review tool. I tend to write responses to comments while I edit code. When I'm satisfied and I've pushed my new code, I want to send all of the responses at once -- especially if two responses depend on each other. GitHub doesn't let me draft responses and then send all (unless I let the responses hang in the HTML input, which is risky).
2. On GitHub, there is no great way to update a PR with changes. Yes, I could push a new commit to the branch. But then I need to squash commits (I don't want the "bad" commits to land in main). When GitHub squashes commits, it concatenates the commit messages which is NOT what I want. (I care about my commit messages being precise and accurate.) I also can't reword my original commit message. So I guess I have to force push. But this makes it harder for collaborators to understand what has changed because GitHub garbage-collects old commits; sometimes I get the message that the old commit can't be found. On Gerrit, I (non-force) push to a "magic" ref which updates the PR for me.
3. As a code reviewer, it's really hard for me to understand what the PR author has changed since the last review. I think part of this is that by default GitHub shows the thread for a PR instead of the code. The thread view has a bunch of whitespace that makes it difficult to concisely understand what has changed. For an interface I use regularly, I really want a condensed view. Gerrit: https://chromium-review.googlesource.com/c/chromium/src/+/46...
4. Finally, Gerrit has a nice interface (like Critique) that concisely shows the PR history and what each individual is working on. (Here's a person picked randomly from Chromium code review: https://chromium-review.googlesource.com/q/owner:katzz@googl...). It's really useful for understanding what changes were made/are in progress. Again, GitHub's UI has so much whitespace that is definitely prettier but not useful for a tool that should help my productivity, not hurt it.
For (2) you definitely want Gerrit. For major improvements on (1), (3), and (4) you might like https://codeapprove.com which sits on top of GitHub and attempts to solve your pain points. Obviously I am biased!
Project management for my day job happens entirely in GitHub and while it’s not perfect, it’s significantly better than it was even 12 months ago.
There are actually a lot of good options in the space these days (Reviewable, Graphite, etc) so there’s no much reason to stick with what GitHub gives you!
Wikimedia opts to close PRs with a message saying (tl;dr): this is a read-only mirror, contribute via Gerrit.
Importing from GitHub seems like it might be a bad experience except for drive-by commits (which are valuable and Wikimedia misses out on).
Mirroring to GitHub is sensible—(1) Dependabot (2) Nice code browser (3) this is a perk of working on open projects: your name shows up in GitHub (the default place for open source developers) next to the project.
But there's no trivial way to make it clear for developers that your repo is a mirror (outside of the description). It would be nice if there were a button in the UI to make it clear a mirror is a mirror (e.g., to show up in searches for `mirror:true`[1]). It seems like this requires Special Privileges™ somewhere...
[0]: <https://phabricator.wikimedia.org/T37497> [1]: <https://github.com/search?q=mirror%3Atrue&type=repositories>