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: posts duplicate messages whenever Gerrit message IDs change #49467

Open
ianlancetaylor opened this issue Nov 8, 2021 · 1 comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

Starting at about 08 Nov 2021 02:47:26 -0800 GerritBot sent a large number of duplicate comments. These were comments made in Gerrit on CLs imported into GitHub. Those comments has already been echoed back to the original GitHub pull requests. They were then duplicated on November 8. This affected more than 50 pull requests.

Some Sample GitHub pull requests showing the duplicate comments:

golang/debug#7 (the first one I found)
golang/sys#114
#44998
#29726
#44535 (the last one I found)

CC @golang/osp-team

@dmitshur
Copy link
Contributor

dmitshur commented Nov 8, 2021

From taking a brief look, a part of the cause seems to be originating from Gerrit: some change there caused message IDs on existing comments to become different, and that led to messages that gerritbot posted to be slightly different, and defeating it's de-duplication logic.

For example, these two GitHub comments:

  1. cmd/racebuild: add linux/s390x support build#37 (comment)
  2. cmd/racebuild: add linux/s390x support build#37 (comment)

Are both referring to Heschi's only comment in Gerrit on that CL, but the former's URL includes:

Visit [golang.org/cl/336511](https://go-review.googlesource.com/c/build/+/336511#message-212851e6ca26bb1c864f1e79ada86a8f8f5211c0).

While this morning's one has a different message ID:

Visit [golang.org/cl/336511](https://go-review.googlesource.com/c/build/+/336511#message-c61585b95b9aa13f9d1b62707afb294cee7a2119).

gerritbot's de-duplication algorithm can be improved, but this also means unless Gerrit IDs change again (hopefully not something that happens often) this type of issue shouldn't keep happening.

@dmitshur dmitshur changed the title GerritBot: many duplicate messages x/build/cmd/gerritbot: posts duplicate messages whenever Gerrit message IDs change Nov 8, 2021
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Nov 8, 2021
@gopherbot gopherbot added this to the Unreleased milestone Nov 8, 2021
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants