Skip to content

Commit

Permalink
Add warn log when deleting inactive users (#32318)
Browse files Browse the repository at this point in the history
Add log for the problem #31480
  • Loading branch information
lunny authored Oct 23, 2024
1 parent 9206fbb commit a264c46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions services/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ func DeleteInactiveUsers(ctx context.Context, olderThan time.Duration) error {
if err = DeleteUser(ctx, u, false); err != nil {
// Ignore inactive users that were ever active but then were set inactive by admin
if models.IsErrUserOwnRepos(err) || models.IsErrUserHasOrgs(err) || models.IsErrUserOwnPackages(err) {
log.Warn("Inactive user %q has repositories, organizations or packages, skipping deletion: %v", u.Name, err)
continue
}
select {
Expand Down

0 comments on commit a264c46

Please sign in to comment.