-
Notifications
You must be signed in to change notification settings - Fork 720
feat: add GetBucketType API for replication target validation #2195
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
Conversation
why do we need this API? @csumisha |
@harshavardhana Should throw validation error when trying to add a table warehouse bucket as a replication target bucket. https://github.com/miniohq/eos/pull/2717 |
Add GetBucketType() method to query bucket type via the ?bucket-type S3 extension endpoint. This allows validating replication targets to prevent setting warehouse buckets as replication destinations.
eed9156 to
be693a5
Compare
|
yes but why do we need this new API and exposed via minio-go? |
|
@harshavardhana It is using HeadBucket - I guess we don't have that as a standalone function, but rather a bunch of different calls. |
|
@harshavardhana as @klauspost mentioned there is no standalone head function, what is your recommendation here? |
53f85f9 to
5b9dc0e
Compare
Add HeadBucket method that performs HEAD request on bucket and returns HeadBucketInfo struct with bucket metadata from response headers. Includes Type field for MinIO bucket type extension (standard/warehouse).
5b9dc0e to
337f7c3
Compare
|
Not required, handled it differently https://github.com/miniohq/eos/pull/2717 |
Add GetBucketType() method to query bucket type via the ?bucket-type S3 extension endpoint. This allows validating replication targets to prevent setting warehouse buckets as replication destinations.