Skip to content

Commit

Permalink
MM-57375: Update to latest minio image (#27475)
Browse files Browse the repository at this point in the history
* test with latest minio image
* Update the KMS key
- Also use latest config settings. The older ones were deprecated.
  • Loading branch information
agnivade authored Jun 28, 2024
1 parent 70b2188 commit d20b55b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions server/build/docker-compose.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions server/platform/shared/filestore/s3store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -211,15 +212,18 @@ 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
}
} 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"}
}
}
}

Expand Down

0 comments on commit d20b55b

Please sign in to comment.