Group nested membership not indexed at a level of depth higher than 2
Summary
Group nested membership is limited to 2 levels of depth in the search index of GitLab.
I do not refer to nested groups, I refer to groups shared with other groups.
We are a 150 seats Premium customers and we are impacted by this bug. I believe other companies could be too.
Context
I will explain with an example. Let's say my company is organized in departments and departments are distributed in teams. If I want to create some user lists through GitLab groups, I would do it this way:
Company - All developers
|-- Department A
| |-- Team A1
| |-- Team A2
| `-- Team A3
`-- Department B
|-- Team B1
`-- Team B2
Let's point out that these groups are actually not nested in the GitLab structure. Only the group membership relations are nested. In other words, all the groups are next to each other like this:
In the "Members" section of the Company - All developers
group, I have all the departments groups under the "Group" tab
In the "Members" of the departments groups, I have all the related teams under the "Groups" tab.
Therefore, the department groups should gather the members of every related team group (Department A
should gather Team A1
, Team A2
and Team A3
). And the group Company - All developers
should gather the members of all departments groups (Department A
, Department B`, etc) thus all the members of all the teams.
Issue
Considering I am a member of a team, let's say Team A1
and that I am not a direct member of the parent groups (i.e. Department A
and Company - All developers
), I should be able to mention my team, my department and the whole company lists with the @
tags in issue and MR comments. However, it does not work with the whole company list (i.e. the group Company - All developers
). Same issue occurs if I try to add the Company - All developers
group to the members of one of my projects. It seems GitLab can search groups with shared membership at 2 level of nesting (team and department) but not more (company).
Solution
Could you increase the search to a nesting level higher than 2 ? I believe 4 or 5 could be good.
Steps to reproduce
We need two user accounts. Let's call them user-1
and user-2
. Let's say user-1
is an admin while user-2
is the user experiencing the issue.
Preparation
With user-1
, perform these steps:
- Create a group called
Company - All developers
- Create a group called
Department A
- Create a group called
Team A1
- Add the group
Department A
to the members of the groupCompany - All developers
- Add the group
Team A1
to the members of the groupDepartment A
- Add
user-2
to the members of the groupTeam A1
Issue
With user-2
, perform these steps:
Operation | Result |
---|---|
Create a random project and try to add Company - All developers to the members of the project. |
|
Create a random project and try to add Department A to the members of the project. |
|
Create a random project and try to add Team A1 to the members of the project. |
|
In a random issue / MR, try to tag @Company - All developers | |
In a random issue / MR, try to tag @department A | |
In a random issue / MR, try to tag @team A1 |
Example Project
https://gitlab.com/groups/vdsbenoit-bug-reports
I only have one account on gitlab.com. To test it by yourself, please do this:
- add yourself in a team (e.g. Team A1)
- try to tag Company - All developers in a comment
- try to add Company - All developers in a project members
What is the current bug behavior?
Users cannot tag a group in a comment nor add it to the member of a project if the membership nesting has more than 2 levels of detph.
What is the expected correct behavior?
Users are member of the group, their should be able to mention all of their groups in comments and add them to the members of their projects.
Relevant logs and/or screenshots
See screenshots in the description above + example project
Output of checks
This bug happens on GitLab.com
Possible fixes
I guess expanding the search to a nesting level higher than 2 might fix this issue.