-
Notifications
You must be signed in to change notification settings - Fork 548
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
Add metadata and tags to mc find #4531
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ mc find -json -tags="key=v*" myminio/testbucket/ { "status": "success", "type": "", "lastModified": "2023-01-05T10:26:13.12+01:00", "size": 712001, "key": "myminio/testbucket/out.csv", "etag": "", "metadata": { "X-Amz-Server-Side-Encryption": "aws:kms", "content-type": "text/csv" }, "tags": { "key": "value", "key2": "", "key3": "else" } } ``` Metadata: ``` λ go build&&mc find -json -metadata="content-type=text/csv" myminio/testbucket/ { "status": "success", "type": "", "lastModified": "2023-01-19T17:38:43.803+01:00", "size": 342934, "key": "myminio/testbucket/go2/src/cmd/go/internal/modfetch/zip_sum_test/testdata/zip_sums.csv", "etag": "", "metadata": { "X-Amz-Server-Side-Encryption": "aws:kms", "content-type": "text/csv" } } { "status": "success", "type": "", "lastModified": "2023-01-19T17:41:03.011+01:00", "size": 342934, "key": "myminio/testbucket/go3/src/cmd/go/internal/modfetch/zip_sum_test/testdata/zip_sums.csv", "etag": "", "metadata": { "X-Amz-Server-Side-Encryption": "aws:kms", "content-type": "text/csv" } } ```
klauspost
added a commit
to klauspost/minio
that referenced
this pull request
Mar 30, 2023
Everything is implemented similar to `ListObjectsV2M`, except this is for versions as well. Related PRs: minio/mc#4531 and minio/minio-go#1795
1 task
krisis
reviewed
Apr 1, 2023
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.
Great stuff! PR looks good. Need to update go.mod to use latest minio-go.
# Conflicts: # go.sum
Merged... |
harshavardhana
approved these changes
Apr 6, 2023
krisis
approved these changes
Apr 8, 2023
julio-lopez
reviewed
Apr 10, 2023
This was referenced Apr 10, 2023
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add metadata and tag search.
In both cases a MinIO sever must be on the backend. Tags and
--versions
requires the latest release.This is required for fixing unmarshal: minio/minio-go#1795
Motivation and Context
Examples
Metadata:
If a value is empty
-metadata="X-Amz-Server-Side-Encryption="
it must either not exist or have an empty value.Multiple tags or metadata fields can be queried, eg
-metadata="content-type=text/csv" -metadata="X-Amz-Server-Side-Encryption=."
. In that case all of them must exist.Regex is Go RE2 syntax.
How to test this PR?
See examples above.
Types of changes