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: comments occasionally not posted to GitHub PR #27504

Closed
odeke-em opened this issue Sep 5, 2018 · 7 comments
Closed

x/build/cmd/gerritbot: comments occasionally not posted to GitHub PR #27504

odeke-em opened this issue Sep 5, 2018 · 7 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@odeke-em
Copy link
Member

odeke-em commented Sep 5, 2018

Over the past couple of days I've been involved with at least two separate issues with bodies that were updated on Github but Gopherbot did not mirror them on Gerrit yet posted up messages on Gerrit.

Those issues are:

Got

screen shot 2018-09-04 at 6 25 52 pm

screen shot 2018-09-04 at 6 26 06 pm

Want

screen shot 2018-09-04 at 6 25 14 pm

Got

screen shot 2018-09-04 at 6 27 15 pm

screen shot 2018-09-04 at 6 27 27 pm

Want

screen shot 2018-09-04 at 6 28 08 pm

and also there have been a couple of PRs for which a Gerrit CL wasn't opened, perhaps the problem is related? For example:

@gopherbot gopherbot added this to the Unreleased milestone Sep 5, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Sep 5, 2018
@odeke-em
Copy link
Member Author

odeke-em commented Sep 5, 2018

/cc builders squad @andybons @bradfitz @FiloSottile @kevinburke @dmitshur

@andybons
Copy link
Member

andybons commented Sep 5, 2018

The first two issues are behaving as expected. The Gerrit commit message is determined by the title and description of the PR and is one-way (GitHub -> Gerrit).

See https://golang.org/wiki/GerritBot#how-does-gerritbot-determine-the-final-commit-message #25359 for more info.

and also there have been a couple of PRs for which a Gerrit CL wasn't opened

This isn’t correct. The Gerrit CLs were created by GerritBot, but no comment was added to the original GitHub PR.

@andybons andybons changed the title x/build/cmd/gopherbot: some PR code revisions are not mirrored to Gerrit x/build/cmd/gerritbot: comments occasionally not posted to GitHub PR Sep 5, 2018
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 5, 2018
@dmitshur
Copy link
Contributor

dmitshur commented Sep 7, 2018

Something along these lines happened in golang/dl#1 as well. The PR was mirrored (to https://go-review.googlesource.com/c/dl/+/134117) but no corresponding "PR has been imported to Gerrit" comment was created.

I filed #27561 with more details for that particular instance, but I suspect there's overlap with this issue.

@gopherbot
Copy link

Change https://golang.org/cl/134175 mentions this issue: cmd/gerritbot: update gerritChangeRE for new Gerrit output format

gopherbot pushed a commit to golang/build that referenced this issue Sep 10, 2018
Gerrit has changed the format it uses for the Change URL in its output.
It used to be something like:

	remote: SUCCESS
	remote:
	remote: New Changes:
	remote:   https://go-review.googlesource.com/#/c/dl/+/134117 remove blank line from codereview.cfg

Now it is:

	remote: SUCCESS
	remote:
	remote: New Changes:
	remote:   https://go-review.googlesource.com/c/dl/+/134117 remove blank line from codereview.cfg

(The '#' path element in the Change URL is removed.)

Update the regexp to match, and add a test for it.

This fix will likely cause the previously unposted "This PR has been
imported to Gerrit for code review" comments to get posted during
next pull request activity, since they haven't already been.

Fixes golang/go#27561.
Updates golang/go#27504.

Change-Id: I37a75ddb8d879017ebd887c651ca74a6ad6b892d
Reviewed-on: https://go-review.googlesource.com/134175
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@dmitshur
Copy link
Contributor

Now that #27561 (comment) is resolved, at least a part of this issue should be resolved too. Perhaps all of it.

If there are further occurrences of this, please let us know. Otherwise, we can probably close this after some time passes.

@dmitshur
Copy link
Contributor

Another issue that might have played a role in this issue happening was #27536: gerritbot was crashing occasionally. It's conceivable (and likely) that each time it crashed, it missed some operations that should've been performed.

The crashing issue is resolved now, so I'm interested in hearing of any further re-occurrences of the original issue if it happens again.

@dmitshur dmitshur added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 4, 2018
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants