Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/connector/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ func groupToResource(ctx context.Context, group *admin.Group) (*v2.Resource, err
Id: group.Id,
}),
}

// Skip grant listing for groups with no direct members to avoid unnecessary API calls
// and transient errors (e.g., TLS handshake timeouts) that can fail the entire sync.
if group.DirectMembersCount == 0 {
l.Debug("skipping grants for empty group", zap.String("group_id", group.Id), zap.String("group_name", group.Name))
resourceOpts = append(resourceOpts, rs.WithAnnotation(&v2.SkipGrants{}))
}

return rs.NewGroupResource(group.Name, resourceTypeGroup, group.Id, traitOpts, resourceOpts...)
}

Expand Down
Loading