Skip to content

Commit daf34b0

Browse files
authored
Fix secret scope ACL deletion loop exiting early on NotFound (#4212)
## Changes When deleting multiple secret scope ACLs, if one ACL returns NotFound (due to race conditions or eventual consistency), the code would `return nil` and exit the loop early. This prevented remaining ACLs from being deleted. Changed to `continue` to skip NotFound errors and proceed with remaining deletions. ## Tests Only static analysis, no tests.
1 parent d0a9eb1 commit daf34b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundle/direct/dresources/secret_scope_acls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (r *ResourceSecretScopeAcls) setACLs(ctx context.Context, scopeName string,
188188
err := r.client.Secrets.DeleteAcl(ctx, acl)
189189
// Ignore not found errors for ACLs.
190190
if errors.Is(err, apierr.ErrNotFound) {
191-
return nil
191+
continue
192192
}
193193
if err != nil {
194194
return fmt.Errorf("failed to delete ACL %v for principal %q: %w", acl, acl.Principal, err)

0 commit comments

Comments
 (0)