yanganto / s3rs

A s3 cli client with multi configs with diffent provider
MIT License
47 stars 8 forks source link

Error messages, docs are extremely vague #103

Open TuggyNE opened 1 year ago

TuggyNE commented 1 year ago

After reading the README and config examples, I wrote what I thought would be a sensible baseline config in ~/.s3rs.toml, but it wasn't recognized at all (dumping a raw Rust NotFound error), even after passing the full path to --config=. Finally I moved it to ~/.config/s3rs/aws.toml, specifying aws — although it has to use =, not `, whether-cor--config`, which is weirdly finicky. As far as I can tell, this restriction is nowhere mentioned.

Currently I'm trying to figure out why a standard s3://bucket/object/pseudo/path URI is failing validation. The error message does not explain what's wrong, or even list the actual URI that is erroneous (and since I'm scripting usage, it's at least theoretically possible that it has somehow gotten mangled). This occurs even when using a URI copied directly from the output of s3rs ll.

However, I'm being stymied in this investigation by a mysterious error that popped up when I tried to remove a layer or two of indirection and run the command more directly. It now says "NotFound" for some different reason than the previous one. (In fact, this problem turns out to be due to running as the wrong user, but there's no real specificity in the error message, such as pointing out the inaccessibility of the config directory.)

TuggyNE commented 1 year ago

It looks like get only works (contrary to common usage and documentation) if it's passed a full destination path.

yanganto commented 1 year ago

The project starts early, and there is no StructOpt or other command line relating library (even earlier 1 or 2 years than AWS s3 Rust SDK public release), so you can find the finicky option and a lot of things not under best practice and legacy.

I do not get benefits from this project, and no one directly pays me to do this. I do this because I hope there is an S3 tool that can treat every storage (AWS s3/OSS/GCP object storage) the same as when I worked at a storage server/system manufacturer. I do not reach my goal, there are only ceph and aws in the tool, and I left my previous role, so there will be fewer servers for me to test on it.

However, this is still an open-source project, if you are interested in and want to fix anything imported in the repo. It will be appreciated and will be merged without being over-picky.

Your voice is also important to me, I will fix that one by one but not in a hurry. I hope this is fine for you.