Gerrit 3.6 - Unable to add registered users as reviewers.

442 views
Skip to first unread message

Jessica Gonzalez

unread,
Feb 21, 2023, 2:13:32 PM2/21/23
to Repo and Gerrit Discussion
Hi, 

We are experiencing some issues while trying to add a registered user as reviewer for a
CR. If this user is part of a group, he/she can be added as reviewer if we add
the entire group as reviewer to the CR but it fails while trying to add them individually. 

This is happening with some (not all) users. However, the user is able to be found if
we perform a search query with their identity. 

We have tried a re-indexing with no success. Is there anything else that could be causing 
this issue to happen?

Thank you so much!
Jess

Nasser Grainawi

unread,
Feb 21, 2023, 6:22:46 PM2/21/23
to Jessica Gonzalez, Repo and Gerrit Discussion
On Tue, Feb 21, 2023 at 12:13 PM Jessica Gonzalez <jwaga...@linuxfoundation.org> wrote:
Hi, 

We are experiencing some issues while trying to add a registered user as reviewer for a
CR. If this user is part of a group, he/she can be added as reviewer if we add
the entire group as reviewer to the CR but it fails while trying to add them individually. 

Hi Jess!

Are you trying to add the user as a reviewer through the web UI or through a different API? Are there any errors in the Gerrit error log or in the browser javascript console?

Looks like you also have this issue opened, so we should make sure updates get back into that ticket too. I don't know of and couldn't quickly find any fixes related to this issue, so this might be the first report.

Nasser
 

This is happening with some (not all) users. However, the user is able to be found if
we perform a search query with their identity. 

We have tried a re-indexing with no success. Is there anything else that could be causing 
this issue to happen?

Thank you so much!
Jess

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/bf44f7f5-2d03-44de-b821-09d4deda86aan%40googlegroups.com.

Edwin Kempin

unread,
Feb 22, 2023, 2:56:09 AM2/22/23
to Nasser Grainawi, Jessica Gonzalez, Repo and Gerrit Discussion
On Wed, Feb 22, 2023 at 12:22 AM Nasser Grainawi <nasser....@linaro.org> wrote:


On Tue, Feb 21, 2023 at 12:13 PM Jessica Gonzalez <jwaga...@linuxfoundation.org> wrote:
Hi, 

We are experiencing some issues while trying to add a registered user as reviewer for a
CR. If this user is part of a group, he/she can be added as reviewer if we add
the entire group as reviewer to the CR but it fails while trying to add them individually. 

Hi Jess!

Are you trying to add the user as a reviewer through the web UI or through a different API? Are there any errors in the Gerrit error log or in the browser javascript console?

Looks like you also have this issue opened, so we should make sure updates get back into that ticket too. I don't know of and couldn't quickly find any fixes related to this issue, so this might be the first report.

Nasser

Also please have a look at [1] which lists criterias for users to be suggested as reviewer:
 
 

This is happening with some (not all) users. However, the user is able to be found if
we perform a search query with their identity. 

We have tried a re-indexing with no success. Is there anything else that could be causing 
this issue to happen?

Thank you so much!
Jess

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/bf44f7f5-2d03-44de-b821-09d4deda86aan%40googlegroups.com.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

Jessica Gonzalez

unread,
Feb 22, 2023, 12:44:53 PM2/22/23
to Edwin Kempin, Nasser Grainawi, Repo and Gerrit Discussion
Thank you for your reply Edwin and Nasser. 

The users in question are applicable under the listed criteria to be suggested by the UI as reviewers. 

One test I did includes being able to successfully add those users by adding their gerrit group as reviewer, but when attempted to be added individually
their names are not suggested and fail to be added. 

This is all done via the UI. I am open to show you this case via zoom or I can record a short video if you want. 

I created the issue too just in case this is a new bug but if you guys think we should close it, please let me know. 

Thanks a ton for your help!
Jess

Edwin Kempin

unread,
Feb 23, 2023, 2:17:01 AM2/23/23
to Jessica Gonzalez, Nasser Grainawi, Repo and Gerrit Discussion
On Wed, Feb 22, 2023 at 6:44 PM Jessica Gonzalez <jwaga...@linuxfoundation.org> wrote:
Thank you for your reply Edwin and Nasser. 

The users in question are applicable under the listed criteria to be suggested by the UI as reviewers. 

One test I did includes being able to successfully add those users by adding their gerrit group as reviewer, but when attempted to be added individually
their names are not suggested and fail to be added. 

This is all done via the UI. I am open to show you this case via zoom or I can record a short video if you want. 

I would suggest tracing the Suggest Reviewers request [1] that doesn't return the expected results as described in [2].
From the trace it should be possible to understand why users are not matched and returned as expected.

Jessica Gonzalez

unread,
Feb 23, 2023, 5:48:08 PM2/23/23
to Repo and Gerrit Discussion
Thank you for the suggestion Edwin!

I am looking further in the logs to see if I can detect anything unusual. 

So, in this case, I am testing the userID "eball" which is one of the users that cannot be found in the suggestions. 

The API call with no trace "...suggest_reviewers?q=eball" returned 0. 
Adding the trace, the API returns other users that do not match the result and gets stuck.
Looking at the logs, it returned the known groups for user "eball" along other's. 
With this, I can confirm that the user is being located somehow and I can re-confirm it by being able to see his authored changes and being able to add him as reviewer if I
add his entire Gerrit group as reviewer. It is just not appearing in the suggestions.

I also suspect that this issue might be isolated to a single Gerrit group where "eball" and other non suggested users belong to. 
I tried changing the visibility of the group in question with no success. 

I will continue debugging. Any tips really help!

I appreciate it!
Jess

Jessica Gonzalez

unread,
Feb 23, 2023, 6:48:24 PM2/23/23
to Repo and Gerrit Discussion
Looking at the logs, 

The reviewer suggestions finds the account that I am trying to add as reviewer:
    ReviewersUtil : Matches: [1000079]
    ReviewersUtil : Candidate list: [1000079]
But I can see that later on in the logs it does not find it
    ReviewersUtil : Filtered recommendations: []

I'm still investigating what could have happened in between these logs

Thanks!
Jess
Message has been deleted

Amal Babu S

unread,
Feb 27, 2023, 1:36:10 AM2/27/23
to Repo and Gerrit Discussion
Hi,

Try typing the full username. If username contains 'n' character, you may need to type n-2 or n-1 characters. This usually happens with username contains character more than 5.

Thanks
Amal

Jessica Gonzalez

unread,
Feb 28, 2023, 5:01:28 PM2/28/23
to Repo and Gerrit Discussion
Thanks for the suggestion Amal, 

I tried that. Also, since we suspected this could be an index issue, we tried removing all the cached indexes and let them get rebuilt again which didn't seemed to fix the issue. 

@Edwin, @Nasser
In fact, I actually narrow down the problem:

If an account ends up in the Administrator's group or ends up in any of the Administrator's included groups, the account can't be added as reviewer. 
I tested this case with visibility "True" or "False" with no difference. 

Could there be an issue originating in the Admin's group?

Thank you so much for your help!
Jess   

Jessica Gonzalez

unread,
Mar 2, 2023, 5:34:08 PM3/2/23
to Repo and Gerrit Discussion
@Edwin, @Nasser

As a temporary solution, we did the following:
- Created a copy of the Administrators Gerrit Group
- Upgraded the new Administrators group with the same permissions as the original one
- Removed the members of the original Administrators group and added them to the new Administrators group

After this, we are able to see these individuals suggested as reviewers. 

We are uncertain still on what happened to our original Administrators group unfortunately. 
Anything that could help us debug better what caused this is very much appreciated!

Please let me know if we should keep the original issue I created opened (if applicable)

Thank you for all your help!
Jess

Nasser Grainawi

unread,
Mar 6, 2023, 10:54:20 AM3/6/23
to Jessica Gonzalez, Repo and Gerrit Discussion
On Thu, Mar 2, 2023 at 3:34 PM Jessica Gonzalez <jwaga...@linuxfoundation.org> wrote:
@Edwin, @Nasser

As a temporary solution, we did the following:
- Created a copy of the Administrators Gerrit Group
- Upgraded the new Administrators group with the same permissions as the original one
- Removed the members of the original Administrators group and added them to the new Administrators group

After this, we are able to see these individuals suggested as reviewers. 

We are uncertain still on what happened to our original Administrators group unfortunately. 
Anything that could help us debug better what caused this is very much appreciated!

That's very strange behavior and I can't really think of what would cause it. I think getting to more of a root cause now would require a backup copy of the broken setup and either stepping through with a debugger or testing with a custom application with lots of extra log statements added. We could point you to the code that's involved in your use case so you could do that analysis yourself if desired or you could look at the support offered by GerritForge and see if they could get that root cause for you.
 

Please let me know if we should keep the original issue I created opened (if applicable)

If you haven't yet, please update the issue with those workaround steps that solved it for you. I think it's fine to leave the issue open in case someone else comes across the same problem.

Nasser
 

Jessica Gonzalez

unread,
Mar 7, 2023, 5:41:54 PM3/7/23
to Nasser Grainawi, Repo and Gerrit Discussion
Thank you so much Nasser!

I have updated the issue with the information on how I made it work for now

I appreciate your help!
Jess

rastafaray1100

unread,
Mar 27, 2024, 1:45:14 PM3/27/24
to Repo and Gerrit Discussion
HI,
we had the same issue. it turns out that users that are part of "service users" group 
could not been added as reviewers.
removed them from Service users(typically being used by CI systems/jenkins/gitlab)...)
and all affected users started to bee seen.
of course this issue started when we upgraded from gerrit 2.16 to 3.7.x
Avishay

Reply all
Reply to author
Forward
0 new messages