Annotations: Prevent orphaned annotation tags cleanup when no annotations were cleaned (#33957) (#33975)
Fixes #33948
Co-authored-by: Anatoly Fayngelerin <afayngelerin@dropbox.com>
(cherry picked from commit b0094b325e)
Co-authored-by: afayngelerindbx <38990103+afayngelerindbx@users.noreply.github.com>
This commit is contained in:
co-authored by
afayngelerindbx
parent
a574f97b79
commit
774ffd939c
@@ -47,8 +47,9 @@ func (acs *AnnotationCleanupService) CleanAnnotations(ctx context.Context, cfg *
|
||||
if err != nil {
|
||||
return totalCleanedAnnotations, 0, err
|
||||
}
|
||||
|
||||
affected, err = acs.cleanOrphanedAnnotationTags(ctx)
|
||||
if totalCleanedAnnotations > 0 {
|
||||
affected, err = acs.cleanOrphanedAnnotationTags(ctx)
|
||||
}
|
||||
return totalCleanedAnnotations, affected, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user