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: assignReviewersToCLs fails to assign reviewers on x/tools CLs (e.g. CL 374434) #50723
Comments
Change https://go.dev/cl/386754 mentions this issue: |
Owners may include users that do not have an associated Gerrit account, notably GitHub Teams. When determining reviewers to add a CL, drop all these users from the potential reviewer set. Otherwise Gerrit chokes on attempting to set reviewer to "". Dropping these users from owners may result in an empty primary reviewer set (e.g., on packages where a GitHub team is the only primary owner). In this case, upgrade the secondary owners to primary so they end up as reviewers rather than just CC'd. If both lists are empty, a 'no-owners' tag is added to the CL by assignReviewersToCLs. For golang/go#50723. For golang/go#28320. Change-Id: I99ac5426e080bf32c46817c09debeac507282e01 Reviewed-on: https://go-review.googlesource.com/c/build/+/386754 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Trust: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
https://go.dev/cl/386754 should fix the symptom in the title: "assignReviewersToCLs fails to assign reviewers on x/tools CLs". But the problem that @dmitshur describes above with Gerrit group UUIDs not resulting in an owner GerritEmail still exists, so leaving this open. |
Change https://go.dev/cl/386794 mentions this issue: |
Prior to CL 247240, the addPerson line for Tools Team included: "1080@62eb7196-b449-3ce5-99f1-c037f21e1705" This was a "<account ID>@<instance ID>" format that isn't used much, but is documented as one of the formats that gophers.GetPerson accepts. It was interpreted as an email because of the '@' in the middle. That CL meant to replace the email with the UUID of a Gerrit group, but there's no explicit support for such entries, and it currently gets misinterpreted as the Tools Team's name. We're not yet sure how to best handle teams on the Gerrit side, but remove the UUID for now since it's neither supported nor used, to reduce confusion. Add test cases to help future team entry changes have the intended effect. For golang/go#50723. For golang/go#27631. Change-Id: Ice408033cd48fab746a395dc7a49f1dafe14fc55 Reviewed-on: https://go-review.googlesource.com/c/build/+/386794 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Michael Pratt <mpratt@google.com>
I filed this issue primarily to share my findings on a problem that was happening previously. I believe CL 386754 and CL 386794 largely resolved that problem, and there isn't anything very actionable left to do here, so I'll close it now. Follow-up work to improve reviewer assignment to teams in Gerrit will be better tracked in new issues. Thanks to @hyangah and @prattmic for helping with this issue. |
From
gopherbot
logs:Something's went wrong there. It seems it tried to set the reviewer identified by the empty string. Gerrit reports that the empty string is an ambiguous specification of a reviewer.
The logic for adding reviewers in this task looks like this:
It seems
owner.GerritEmail
must be the empty string.In
x/build/internal/gophers
there's an entry:It's possible the change made in CL 247240 is connected, since it results in the
Gerrit
field becoming an empty string:(Prior to that change, the
Gerrit
value for that team entry was "1080@62eb7196-b449-3ce5-99f1-c037f21e1705", which matched the "group_id@gerrit_instance" format.)tools-team Gerrit group id source
(Source is
https://go-review.googlesource.com/groups/?query=inname:tools-team
via https://gerrit-review.googlesource.com/Documentation/rest-api-groups.html#query-groups.)CC @hyangah.
The text was updated successfully, but these errors were encountered: