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

Open
odeke-em opened this Issue Sep 5, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@odeke-em
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 label Sep 5, 2018

@odeke-em

This comment has been minimized.

Show comment
Hide comment
@odeke-em
Member

odeke-em commented Sep 5, 2018

@andybons

This comment has been minimized.

Show comment
Hide comment
@andybons

andybons Sep 5, 2018

Member

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.

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 from x/build/cmd/gopherbot: some PR code revisions are not mirrored to Gerrit to x/build/cmd/gerritbot: comments occasionally not posted to GitHub PR Sep 5, 2018

@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Sep 7, 2018

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@gopherbot

gopherbot Sep 7, 2018

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

gopherbot commented Sep 7, 2018

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

cmd/gerritbot: update gerritChangeRE for new Gerrit output format
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

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Sep 10, 2018

Member

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.

Member

dmitshur commented Sep 10, 2018

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

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Sep 21, 2018

Member

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.

Member

dmitshur commented Sep 21, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment