• Robert Speicher's avatar
    Merge branch 'single_group_sync' into 'master' · d9e44d8f
    Robert Speicher authored
    Allow syncing a group against all providers at once
    
    Allows `Sync::Group` to sync members for a single group across all providers at once. Closes #399
    
    No
    
    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.
    
    See merge request !636
    d9e44d8f
group_spec.rb 7.47 KB