@@ -206,7 +206,7 @@ func (s AGPLIDPSync) ApplyGroupDifference(ctx context.Context, tx database.Store
206
206
return xerrors .Errorf ("remove user from %d groups: %w" , len (removeIDs ), err )
207
207
}
208
208
if len (removedGroupIDs ) != len (removeIDs ) {
209
- s .Logger .Debug (ctx , "failed to remove user from all groups" ,
209
+ s .Logger .Debug (ctx , "user not removed from expected number of groups" ,
210
210
slog .F ("user_id" , user .ID ),
211
211
slog .F ("groups_removed_count" , len (removedGroupIDs )),
212
212
slog .F ("expected_count" , len (removeIDs )),
@@ -225,7 +225,7 @@ func (s AGPLIDPSync) ApplyGroupDifference(ctx context.Context, tx database.Store
225
225
return xerrors .Errorf ("insert user into %d groups: %w" , len (add ), err )
226
226
}
227
227
if len (assignedGroupIDs ) != len (add ) {
228
- s .Logger .Debug (ctx , "failed to assign all groups to user " ,
228
+ s .Logger .Debug (ctx , "user not assigned to expected number of groups " ,
229
229
slog .F ("user_id" , user .ID ),
230
230
slog .F ("groups_assigned_count" , len (assignedGroupIDs )),
231
231
slog .F ("expected_count" , len (add )),
@@ -355,8 +355,7 @@ func (s GroupSyncSettings) ParseClaims(orgID uuid.UUID, mergedClaims jwt.MapClai
355
355
// TODO: Batching this would be better, as this is 1 or 2 db calls per organization.
356
356
func (s GroupSyncSettings ) HandleMissingGroups (ctx context.Context , tx database.Store , orgID uuid.UUID , add []ExpectedGroup ) ([]uuid.UUID , error ) {
357
357
// All expected that are missing IDs means the group does not exist
358
- // in the database. Either remove them, or create them if auto create is
359
- // turned on.
358
+ // in the database, or it is a legacy mapping, and we need to do a lookup.
360
359
var missingGroups []string
361
360
addIDs := make ([]uuid.UUID , 0 )
362
361
0 commit comments