Skip to content

Commit 3defda7

Browse files
committed
cmd/go-cache-plugin: silence spurious warnings from the AWS SDK
Recent versions of the AWS SDK have begun logging checksum verification errors. Disable that logging by adding the relevant client option.
1 parent 1d8d5c3 commit 3defda7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/go-cache-plugin/setup.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"strings"
1919
"time"
2020

21+
"github.com/aws/aws-sdk-go-v2/aws"
2122
"github.com/aws/aws-sdk-go-v2/config"
2223
"github.com/aws/aws-sdk-go-v2/service/s3"
2324
"github.com/creachadair/command"
@@ -51,7 +52,10 @@ func initCacheServer(env *command.Env) (*gocache.Server, *s3util.Client, error)
5152
return nil, nil, fmt.Errorf("create local cache: %w", err)
5253
}
5354

54-
cfg, err := config.LoadDefaultConfig(env.Context(), config.WithRegion(region))
55+
cfg, err := config.LoadDefaultConfig(env.Context(),
56+
config.WithRegion(region),
57+
config.WithResponseChecksumValidation(aws.ResponseChecksumValidationWhenRequired),
58+
)
5559
if err != nil {
5660
return nil, nil, fmt.Errorf("load AWS config: %w", err)
5761
}

0 commit comments

Comments
 (0)