s3gw-tech / s3gw

Container able to run on a Kubernetes cluster, providing S3-compatible endpoints to applications.
https://s3gw.tech
Apache License 2.0
148 stars 21 forks source link

[BUG] UI: Deleting an object deletes all following the same name base pattern #822

Closed 0xavi0 closed 1 year ago

0xavi0 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Looks like when deleting an object the UI is using a regex pattern or similar. (At least that's the feeling as a user) The video below is pretty self explanatory, but it you have a bucket with objects with the following names:

and you delete the test object (the name is the base prefix of the names of the rest), it deletes them all.

Tested with 0.23.0-rc2

To Reproduce Steps to reproduce the behavior:

Create a few objects sharing the same prefix in the name. Delete the base name one.

Expected behavior A clear and concise description of what you expected to happen.

Only delete the selected object.

Screenshots If applicable, add screenshots to help explain your problem.

https://github.com/aquarist-labs/s3gw/assets/96239481/dea16bf6-9203-45b2-92ee-5e283fbfa0a8

votdev commented 1 year ago

Wow, this is new. Never experienced that before.

votdev commented 1 year ago

Can not reproduce that with podman run --replace --name=s3gw -it -p 7480:7480 -e S3GW_DEBUG=high quay.io/s3gw/s3gw:v0.23.0-rc2 and a local running v0.23.0 UI backend.

Peek 2023-11-21 15-35

votdev commented 1 year ago

But i see you are not using file extensions. Need to test that.

votdev commented 1 year ago

OK, strange. I can confirm the files will be deleted if there is no file extension.

0xavi0 commented 1 year ago

Yup, I also tested WITH file extension and it works fine, so the root cause seems to be no file extension