feathersjs-ecosystem / feathers-blob

Feathers service for blob storage, like S3.
http://feathersjs.com
MIT License
92 stars 32 forks source link

[remove] Pass s3 params to the call to Model.remove #94

Closed mdartic closed 1 year ago

mdartic commented 2 years ago

Hi,

I use this package with s3.

I encounter a bug when I try to remove a file in a Bucket other than the default one.

When I create a new object, the Bucket is well used, and my file go to the right one.

But when I remove it, passing the same params.s3, they are not taken in consideration.

Do you agree with this update ? Any wishes for documentation updates ?

I'm waiting for the PR https://github.com/jb55/s3-blob-store/pull/26 to be merged too, as it was not transmitted to the s3 client by the s3-blob-store package.

claustres commented 2 years ago

It seems to me a great addition/fix, thanks. We should not have to wait for the referenced PR to be merged as we only use the abstract interface right ?

Would be great to have a specific test but as the CI has been moved from Travis to GitHub actions S3 tests are currently not running, we should have a look at it. Maybe you can try to run it locally and create a test @mdartic ?

mdartic commented 2 years ago

Ok, I'll try to add some tests with an S3. Do you think we could run tests also on github actions ? I didn't search how to run a s3 (minio like ?) server on github actions, but if it's feasible, it could be a good thing ?

claustres commented 2 years ago

I've added tests to use an AWS S3 bucket because there are some specific features available in addition to the abstract blob store interface using specific parameters, which is typically the case of your issue. The problem is that you need to have a AWS account and configure the required S3 secrets with eg env vars. This is not easy to "share" across multiple maintainers, so that when moving to github actions previous S3 tests running under travis were not migrated. Using a S3 stub could be relevent as long it is representative. Maybe @daffl has an idea on how we can make it easier ?

daffl commented 2 years ago

Could we use an S3 dummy server like https://github.com/jamhall/s3rver?