Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/build/cmd/gerritbot: bot insists on overwriting gerrit-side modifications #28713
In https://go-review.googlesource.com/c/blog/+/143544 I tried to update the commit message myself instead of sending the change back for another PR round, and GerritBot basically instantaneously reverted my edits, by re-pushing the copy from GitHub.
GerritBot should be able to tell whether it has already pushed the latest GitHub PR copy to Gerrit and if so NOT re-push it when Gerrit differs.
I think this is the same issue as #24887.
It's also related to #25359 (comment), where I suggested:
@andybons answered that in #25359 (comment), saying "It’s not unreasonable (implementing 2-way syncing), but naturally adds complexity to the implementation." and providing detailed information on the implementation considerations.
This sounds like a simpler solution than full 2-way syncing. The benefit seems to be no need to incur the complexities of full bidirectional sync. The downside is that it can leave a GitHub PR out of sync with the Gerrit CL commit message, which can cause confusion and loss of information (e.g., if the person edits the original PR to fix a small typo, it would revert the edited Gerrit CL commit message).
@rsc It sounds like you'd want to make use of this just before merging a CL, is that right? If so, the divergence may not matter as much.