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: sometimes does not remove wait-author #30172
Comments
It's a logic problem in We should compare Gerrit users by their Gerrit user ID only.
|
Change https://golang.org/cl/161977 mentions this issue: |
Change https://golang.org/cl/161901 mentions this issue: |
The purpose of function onLatestCL is to check that maintner data isn't behind Gerrit's data (as determined by talking to the Gerrit REST API directly). However, there are some meta commits that the Gerrit REST API doesn't return a corresponding message to, so sometimes maintner data is ahead of "latest Gerrit message". Since ahead is not _behind_, make onLatestCL report positively in such situations by checking all cl.Metas, not just the latest one. Do so in reverse order as an optimization (if there's a match, it's most likely near the end of cl.Metas slice). An example of such a meta commit is one that updates an uploaded patch set and sets the Reviewer field: $ git show fc20e3671f7b1ff889d5f947b11d7fda0b608751 commit fc20e3671f7b1ff889d5f947b11d7fda0b608751 (meta/35/111335/meta) Author: Gerrit User 14805 <14805@62eb7196-b449-3ce5-99f1-c037f21e1705> Date: Mon Feb 11 17:49:09 2019 +0000 Update patch set 6 Patch-set: 6 Reviewer: Gerrit User 14805 <14805@62eb7196-b449-3ce5-99f1-c037f21e1705> It has no corresponding message with same ID in the output from a Gerrit REST API call at https://go-review.googlesource.com/changes/111335/detail?o=MESSAGES, nor does it show up visually in the Gerrit UI at https://go-review.googlesource.com/c/crypto/+/111335. Before this change (with fix in CL 161977): 2019/02/11 15:02:33 Reloaded data from log *maintner.netMutSource. 2019/02/11 15:02:34 https://golang.org/cl/111335 -- remove wait-author; reply from Andreas Auernhammer <...@mail.de> 2019/02/11 15:02:35 onLatestCL: maintner metadata for CL 111335 is behind; skipping action for now. After this change: 2019/02/11 15:06:46 Reloaded data from log *maintner.netMutSource. 2019/02/11 15:06:46 https://golang.org/cl/111335 -- remove wait-author; reply from Andreas Auernhammer <...@mail.de> 2019/02/11 15:06:46 [dry run] would remove hashtag 'wait-author' from CL 111335 Updates golang/go#30172 Change-Id: I1575ccffbf8c3edb337f55bf1bf2c96a4a04bbdd Reviewed-on: https://go-review.googlesource.com/c/161901 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The fix is deployed now, and it's working as intended. See here. |
In https://go-review.googlesource.com/c/crypto/+/111335 it didn't remove the wait-author hashtag even if the author replied and uploaded new patch sets.
/cc @andybons @dmitshur
The text was updated successfully, but these errors were encountered: