-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
MinIO > 2021 interprets a / prefix differently #26841
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
Conversation
|
Can you add a test case around it, if applicable. |
|
Does this mean we require a certain minimum version of minio or is it backwards-compatible? |
|
The existing tests fail when used with a recent MinIO server: this part of the code is covered. |
|
I see we are testing with gitea/.github/workflows/pull-db-tests.yml Line 34 in d5703d4
|
|
The logic is still not right. For example, |
Do you mean the logic of this fix is not right? Or that the logic of the minio implementation is not right? |
|
I guess "the logic of this fix is not right". In most Object Storages, prefix "dir" matchs "dir-1" and "dir/sub". If it needs to only match "dir/sub", it needs to use prefix "dir/" to list. |
$ minio --version
minio version RELEASE.2023-08-23T10-07-06Z (commit-id=af564b8ba07a7805a578b5f6f2b3827490f74ccd)
Running go test with -tags 'sqlite sqlite_unlock_notify'...
=== RUN TestMinioStorageIterator
2023/08/31 14:09:28 ...les/storage/minio.go:81:NewMinioStorage() [I] Creating Minio storage at 127.0.0.1:9000:gitea with base path
storage_test.go:49:
Error Trace: /home/earl-warren/software/forgejo/modules/storage/storage_test.go:49
/home/earl-warren/software/forgejo/modules/storage/minio_test.go:18
Error: "[a/1.txt b/1.txt b/2.txt b/3.txt b/x 4.txt ab/1.txt]" should have 0 item(s), but has 6
Test: TestMinioStorageIterator
--- FAIL: TestMinioStorageIterator (0.30s)
FAIL
FAIL code.gitea.io/gitea/modules/storage 0.306s
FAIL
make: *** [Makefile:470: test#TestMinioStorageIterator] Error 1
7f833ce to
7a9be79
Compare
|
I guess the right fix is like this: Fix object storage path handling #27024 |
Uh oh!
There was an error while loading. Please reload this page.