mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-05 17:02:01 +00:00
Update module github.com/minio/minio-go/v7 to v7.0.95 (#8816)
Fixes #8529, supersedes #8597 Reverts the workaround of #8541 (while keeping the test) and ignore Close error (like #8527 did). https://github.com/minio/minio-go/pull/2137 makes the test pass without the `io.NopCloser`: ``` docker run --rm -e MINIO_DOMAIN=minio -e MINIO_ROOT_USER=123456 -e MINIO_ROOT_PASSWORD=12345678 -p 9000:9000 data.forgejo.org/oci/bitnami/minio:2024.8.17 ``` ``` TEST_MINIO_ENDPOINT=localhost:9000 go test -v -run ^TestMinioStorageIterator$ ./modules/storage ``` Wrapping the `io.Reader` in an `io.NopCloser` also hides all other methods (like `WriteTo` or `Seek`), so is not ideal. As a further "line of defense", the Close error is ignored (if saveAsPackageBlob was succesful, we don't really care if Close fails). Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8816 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: oliverpool <git@olivier.pfad.fr> Co-committed-by: oliverpool <git@olivier.pfad.fr>
This commit is contained in:
parent
64ad2a53bb
commit
d84a5217ee
4 changed files with 14 additions and 25 deletions
|
@ -209,7 +209,7 @@ func (m *MinioStorage) Save(path string, r io.Reader, size int64) (int64, error)
|
|||
m.ctx,
|
||||
m.bucket,
|
||||
m.buildMinioPath(path),
|
||||
io.NopCloser(r), // prevent minio from closing the reader
|
||||
r,
|
||||
size,
|
||||
minio.PutObjectOptions{
|
||||
ContentType: "application/octet-stream",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue