gitea: Inconsistent gitea behaviors and definition about config SERVE_DIRECT
-
Gitea version (or commit ref): gitea docker latest
-
Git version: git version 2.30.1
-
Operating system: ubuntu18.04
-
Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
-
Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
-
Log gist:
Description
I try the config field ‘SERVE_DIRECT’ which mentioned in gitea doc as Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing.
My config related is below:
[lfs]
STORAGE_TYPE = my_minio
[storage.my_minio]
STORAGE_TYPE = minio
SERVE_DIRECT = true
MINIO_ENDPOINT = ***:9000
MINIO_ACCESS_KEY_ID = ***
MINIO_SECRET_ACCESS_KEY = ***
MINIO_BUCKET = test
MINIO_LOCATION = us-east-1
MINIO_USE_SSL = false
However, I found nothing changes when I open this config. All lfs actions including add/download/clone are also add the I/O NET of gitea container. My docker stats i/o summary is blow:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
08f9524c06a9 test_gitea_1 0.01% 109.7MiB / 3.842GiB 2.79% 4.37GB / 4.36GB 91.2MB / 85.1MB 16
ab7d361bc42c test_giteadb_1 0.03% 74.61MiB / 3.842GiB 1.90% 822kB / 2.25MB 24.7MB / 246kB 8
8b55a751fc54 blissful_taussig 0.01% 70.05MiB / 3.842GiB 1.78% 3.23GB / 4.37GB 1.9GB / 2.55GB 11
Is my understanding of ‘SERVE_DIRECT’ config wrong? Or it is impossibe that my lfs file upload/download request can be served by minio directly with currently version gitea.
Thanks for any related answers or suggestions.
Screenshots
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (15 by maintainers)
I got it. I want to implement this task and contribute to gitea. I found the archive doing that by allocating a url by PresignedGetObject. I try to add codes when lfs info link:
info/lfs/objects/{oid}handlerDownloadHandlerand it work.I think I need to add some codes about
PresignedPutObjecturl at the upload handler. Or I need to add some verify logic inBatchHandlerlike download action which was often verified inUploadHandler.By the way, should I add this feature in lfs file downloading on the web page?