Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nolancon committed May 30, 2024
1 parent 429cfe4 commit 593b09a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/bucket/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ func (c *external) Delete(ctx context.Context, mg resource.Managed) error {
return err
}

if deleteErr != nil {
if deleteErr != nil { //nolint:nestif // Multiple checks required.
c.log.Info("Failed to delete bucket on one or more backends", "error", deleteErr.Error())
traces.SetAndRecordError(span, deleteErr)

if errors.Is(deleteErr, rgw.ErrBucketNotEmpty) {
c.log.Info("Cannot deleted non-empty bucket - this error will not be requeued", consts.KeyBucketName, bucket.Name)
// An error occured attempting to delete the bucket because it is not empty.
// An error occurred attempting to delete the bucket because it is not empty.
// If this Delete operation was triggered because the Bucket CR was "Disabled",
// we need to unset this value so as not to continue attempting Delete.
// Otherwise we can return no error as we do not wish to requeue the Delete.
Expand Down

0 comments on commit 593b09a

Please sign in to comment.