minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

mc find --metadata not working #4790

Closed oernii closed 5 months ago

oernii commented 10 months ago

Expected behavior

"mcli find --metadata" prints existing documents matching existing metadata

Actual behavior

"mcli find --metadata" returns nothing

Steps to reproduce the behavior

mcli cp /proc/cpuinfo --attr testname=33 alias/bucket/testfile mcli stat alias/bucket/testfile --versions mcli find --metadata testname=33 alias/bucket/

mc --version

mcli version RELEASE.2023-12-14T00-37-41Z (commit-id=8da737f8fd63de58dc475bf88eb9e285d206e3ae) Runtime: go1.21.5 linux/amd64

System information

RHEL8.9

vadmeste commented 10 months ago

@oernii what will work now is:

mcli find --metadata "X-Amz-Meta-Testname=33" alias/bucket/

All user custom metadata starts with X-Amz-Meta- in S3. This is not user friendly for now; we can use what is the best way to address this.

@harshavardhana does it make sense to differentiate between "standard" headers and unrecognized metatdata key and add X-Amz-Meta- in that case before comparing it with objects metadata found in the server ?

harshavardhana commented 6 months ago

@harshavardhana does it make sense to differentiate between "standard" headers and unrecognized metatdata key and add X-Amz-Meta- in that case before comparing it with objects metadata found in the server ?

yeah it makes sense @vadmeste