-
Notifications
You must be signed in to change notification settings - Fork 18k
x/build/cmd/gerritbot: sometimes fails to close PR after its imported CL is submitted #35867
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
Comments
This seems to be happening again with PR #37328. It has been submitted on Gerrit 30 minutes ago, yet From its logs:
So But querying maintner directly, I can see that it has latest data. That PR description was never edited. There's likely some sort of logic problem in |
Another case affected PR #58779. It was submitted on Gerrit 5 days ago and the PR wasn't marked as closed. It once again got stuck on
There seems to be a race. The relevant code in cl := b.importedPRs[shortLink]
if cl != nil && b.pendingCLs[shortLink] == cl.Commit.Msg {
delete(b.pendingCLs, shortLink)
}
if b.pendingCLs[shortLink] != "" {
log.Printf("Changes for PR %s have yet to be mirrored in the maintner corpus. Skipping for now.", shortLink)
return nil
} But There are many ways this problem can be fixed. I'll just note that GerritBot clearly knows when an imported CL becomes submitted (or closed) given that it stops showing up in maintner's |
We should investigate why gerritbot didn't close a PR that was imported into Gerrit as a CL and submitted.
See #35751 (comment) for more details.
Thanks @odeke-em for noticing and reporting.
The text was updated successfully, but these errors were encountered: