From 211d4fae5434a9653dc3207913b099f30eaeb58f Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 14 Jan 2026 15:10:20 +0100 Subject: [PATCH] Refactor s3 backend and suppress checksum warning --- pkg/archive/s3Backend.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg/archive/s3Backend.go b/pkg/archive/s3Backend.go index a9933a9f..85df5c27 100644 --- a/pkg/archive/s3Backend.go +++ b/pkg/archive/s3Backend.go @@ -15,6 +15,7 @@ import ( "io" "math" "os" + "slices" "strconv" "strings" "sync" @@ -115,6 +116,7 @@ func (s3a *S3Archive) Init(rawConfig json.RawMessage) (uint64, error) { // Create S3 client with path-style option and custom endpoint if specified s3a.client = s3.NewFromConfig(awsCfg, func(o *s3.Options) { + o.DisableLogOutputChecksumValidationSkipped = true o.UsePathStyle = cfg.UsePathStyle if cfg.Endpoint != "" { o.BaseEndpoint = aws.String(cfg.Endpoint) @@ -911,13 +913,7 @@ func (s3a *S3Archive) StoreClusterCfg(name string, config *schema.Cluster) error } // Update clusters list if new - found := false - for _, c := range s3a.clusters { - if c == name { - found = true - break - } - } + found := slices.Contains(s3a.clusters, name) if !found { s3a.clusters = append(s3a.clusters, name) }