Include project and subgroup shares in user autocomplete
What does this MR do and why?
Our user autocomplete currently returns users that are members of the group, its sub-groups and sub-projects.
But it is lacking sub-group members from group shares and sub-project members from project shares. This MR adds those 2 cases so that it includes all types of sub-group / sub-project membership.
Query changes
This is for the gitlab-com
group which is a large hierarchy with many members.
- Before: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/20397/commands/66691
- After: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/20397/commands/66697
- After (with CTE optimization): https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/20910/commands/68637
The new query reads more buffers because we read more data but running it many times on dblab the new query is actually slightly faster.
From Kibana, I see that we only have 1,650 hits for this endpoint over the last 7 days: https://log.gprd.gitlab.net/app/r/s/kyxtP
So it's not a very popular endpoint and a feature flag is probably not needed for this change.
How to set up and validate locally
Changes we made are for the group-level autocomplete so you can test this inside an Epic.
In an Epic Markdown field, type @
and search for the 2 types of users that we added.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #417757 (closed)