Refactor s3 backend and suppress checksum warning

This commit is contained in:
2026-01-14 15:10:20 +01:00
parent 77b7548ef3
commit 211d4fae54

View File

@@ -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)
}