Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: createBuckets simplify implementation #1840

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
apply suggestion
guozhi.li committed Oct 31, 2023
commit c88c6a1245bdb96c07e30469a9ca8d61f7170460
4 changes: 0 additions & 4 deletions pkg/apis/minio.min.io/v2/helper.go
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@ import (
"github.com/minio/madmin-go/v2"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/minio/minio-go/v7/pkg/s3utils"
)

// Webhook API constants
@@ -765,9 +764,6 @@ func (t *Tenant) CreateUsers(madmClnt *madmin.AdminClient, userCredentialSecrets
func (t *Tenant) CreateBuckets(minioClient *minio.Client, buckets ...Bucket) (create bool, err error) {
jiuker marked this conversation as resolved.
Show resolved Hide resolved
createBucketCount := 0
for _, bucket := range buckets {
if err = s3utils.CheckValidBucketNameStrict(bucket.Name); err != nil {
return false, err
}
// create each bucket with a 20 seconds timeout
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20)
defer cancel()