-
Notifications
You must be signed in to change notification settings - Fork 459
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: create bucket make a conflict status for tenant. #1837
Conversation
I review the code and it looks good to me, let me do a quick test on this just to make sure it is not breaking the feature. On it... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jiuker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20) | ||
defer cancel() | ||
allBuckets, err := minioClient.ListBuckets(ctx) | ||
if err != nil { | ||
return err | ||
} | ||
allBucketsMap := make(map[string]bool) | ||
for _, bucket := range allBuckets { | ||
allBucketsMap[bucket.Name] = true | ||
} | ||
for _, bucket := range buckets { | ||
if !allBucketsMap[bucket.Name] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't we use HeadBucket
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't found that. Is there something I missed? @harshavardhana
fix #1829