From 39d097fb4540787286ea80e281049d38d9bc8a4c Mon Sep 17 00:00:00 2001 From: Rafael Fonseca Date: Mon, 18 Mar 2024 16:20:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20s3:=20do=20not=20ignore?= =?UTF-8?q?=20non-aws=20errors=20when=20deleting=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If any error of non awserr.Error type happens when trying to list a bootstrap data object, it would be silently ignored. --- pkg/cloud/services/s3/s3.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cloud/services/s3/s3.go b/pkg/cloud/services/s3/s3.go index b6695fd006..e3d38dbe5c 100644 --- a/pkg/cloud/services/s3/s3.go +++ b/pkg/cloud/services/s3/s3.go @@ -211,10 +211,9 @@ func (s *Service) Delete(m *scope.MachineScope) error { case s3.ErrCodeNoSuchBucket: s.scope.Debug("Bucket does not exist", "bucket", bucket) return nil - default: - return errors.Wrap(aerr, "deleting S3 object") } } + return errors.Wrap(err, "deleting S3 object") } s.scope.Info("Deleting S3 object", "bucket", bucket, "key", key)