Optimize syncing of multiple LDAP groups for all providers

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
  • Close this issue

In the LdapGroupSyncWorker when we sync a single provider, we make sure we sync all groups trough a single proxy.

When we sync all providers however, we open a new connection to LDAP for each group and each provider. in EE::Gitlab::LDAP::Sync::Group.execute_all_providers

We should update the LdapGroupSyncWorker to share a EE::Gitlab::LDAP::Sync::Proxy for each provider and sync all groups using that proxy.

This is currently not a big problem because the time we sync all providers, we only sync a single group: https://gitlab.com/gitlab-org/gitlab-ee/blob/1552a182ee3b8a93d09c124f46a7e878773bb908/app/controllers/groups/ldaps_controller.rb#L7

See the discussion here: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1819#note_29700172

cc @dblessing

Edited May 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading