MM-57375: Update to latest minio image (#27475)

* test with latest minio image
* Update the KMS key
- Also use latest config settings. The older ones were deprecated.
This commit is contained in:
Agniva De Sarker 2024-06-28 20:34:18 +05:30 committed by GitHub
parent 70b218839f
commit d20b55bde8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -59,14 +59,14 @@ services:
timeout: 10s
retries: 3
minio:
image: "minio/minio:RELEASE.2019-10-11T00-38-09Z"
image: "minio/minio:RELEASE.2024-06-22T05-26-45Z"
command: "server /data"
networks:
- mm-test
environment:
MINIO_ACCESS_KEY: minioaccesskey
MINIO_SECRET_KEY: miniosecretkey
MINIO_SSE_MASTER_KEY: "my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574"
MINIO_ROOT_USER: minioaccesskey
MINIO_ROOT_PASSWORD: miniosecretkey
MINIO_KMS_SECRET_KEY: my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
inbucket:
image: "inbucket/inbucket:stable"
restart: always

View File

@ -56,6 +56,7 @@ type S3FileBackendNoBucketError struct{}
const (
// This is not exported by minio. See: https://github.com/minio/minio-go/issues/1339
bucketNotFound = "NoSuchBucket"
invalidBucket = "InvalidBucketName"
)
var (
@ -211,7 +212,7 @@ func (b *S3FileBackend) TestConnection() error {
obj := <-b.client.ListObjects(ctx, b.bucket, s3.ListObjectsOptions{Prefix: b.pathPrefix})
if obj.Err != nil {
typedErr := s3.ToErrorResponse(obj.Err)
if typedErr.Code != bucketNotFound {
if typedErr.Code != bucketNotFound && typedErr.Code != invalidBucket {
return &S3FileBackendAuthError{DetailedError: "unable to list objects in the S3 bucket"}
}
exists = false
@ -219,7 +220,10 @@ func (b *S3FileBackend) TestConnection() error {
} else {
exists, err = b.client.BucketExists(ctx, b.bucket)
if err != nil {
return &S3FileBackendAuthError{DetailedError: "unable to check if the S3 bucket exists"}
typedErr := s3.ToErrorResponse(err)
if typedErr.Code != bucketNotFound && typedErr.Code != invalidBucket {
return &S3FileBackendAuthError{DetailedError: "unable to check if the S3 bucket exists"}
}
}
}