Skip to content

Allow syncing a group against all providers at once

Drew Blessing requested to merge dblessing/gitlab-ee:single_group_sync into master

What does this MR do?

Allows Sync::Group to sync members for a single group across all providers at once. Closes #399 (closed)

Are there points in the code the reviewer needs to double check?

No

Why was this MR needed?

The current implementation of LDAP group sync manages members based on a single LDAP provider. This is optimal because we can open a single connection to a given LDAP server (provider) and run all queries needed to sync all GitLab groups with links to that provider. If we want to sync a single group at a time we need to flip that model - for a single group, run the sync for all providers.

This presents a few challenges since we have a state machine on the group. In the former/current model we need to set the state inside the loop. However, if we do that in the latter model we will likely run into a race condition. At least, it will execute unnecessary queries against the database. Other than adding the functionality needed to sync a single group, the MR moves the state machine handling to the respective class method.

What are the relevant issue numbers?

#399 (closed)

Merge request reports