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/gopherbot: race condition in auto-closure of scratch CLs causing gopherbot to stall 30s #28286

Open
andybons opened this Issue Oct 19, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@andybons
Copy link
Member

andybons commented Oct 19, 2018

When closing scratch CLs, the maintner corpus doesn't get updated fast enough and it attempts to close the same CLs again, resulting in a 409 conflict:

2018/10/19 20:19:32 closing scratch CL https://golang.org/cl/140997 ...
2018/10/19 20:19:32 abandon scratch reviews: HTTP status 409 Conflict; change is abandoned
2018/10/19 20:19:32 HTTP status 409 Conflict; change is abandoned
2018/10/19 20:19:32 gopherbot ran in 1.745149115s
2018/10/19 20:19:32 sleeping 30s after previous error.

This error causes gopherbot to sleep for 30s as a result.

This is related to #28226 /cc @dmitshur

@andybons andybons added the NeedsFix label Oct 19, 2018

@andybons andybons added this to the Unreleased milestone Oct 19, 2018

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Oct 20, 2018

I think I've already seen code somewhere that uses Gerrit API in addition to maintner to confirm the "latest" state before taking some action. @bradfitz will probably remember where that was.

I suspect the fix for this can use a similar approach.

Note that this is different from #28226 in that the reported state isn't inconsistent, it's just not up to date.

@dmitshur dmitshur changed the title cmd/gopherbot: race condition in auto-closure of scratch CLs causing gopherbot to stall 30s x/build/cmd/gopherbot: race condition in auto-closure of scratch CLs causing gopherbot to stall 30s Oct 20, 2018

@gopherbot gopherbot added the Builders label Oct 20, 2018

@andybons

This comment has been minimized.

Copy link
Member Author

andybons commented Oct 20, 2018

@dmitshur auto-assignment of reviews and gerritbot both use the Gerrit API so that’s likely where you saw it.

@bradfitz

This comment has been minimized.

Copy link
Member

bradfitz commented Oct 29, 2018

@dmitshur, can you take this one?

@dmitshur dmitshur assigned dmitshur and unassigned bradfitz Oct 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.