beyondstorage / go-storage

A vendor-neutral storage library for Golang: Write once, run on every storage service.

Home Page:https://beyondstorage.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

services/s3: `List` with `types.ListModePart` mode test fails when using MinIO

JinnyYi opened this issue · comments

services/s3 should compatible with MinIO and pass integration test with MinIO: List with types.ListModePart mode should lists in-progress multipart uploads.

  1. CreateMultipart with key 420d60bd-c35a-4106-a347-4eaeaef5276e/6ed57725-4f94-4cf2-b2eb-81a857a1a3e3: get the MultipartID: dbacfbb1-5c55-43a9-aeac-ba0c39521c9e
  2. WriteMultipart with the MultipartID get from step 1 to write a part
  3. List with types.ListModePart mode to get the iterator it.

Excepted Behavior

We can retrieve all the in-progress multipart uploads by calling Next() continuously until get the IterateDone.

mo, err := it.Next()
mid, ok := mo.GetMultipartID()
// mid should equal to the `MultipartID` returned by `CreateMultipart`

Current Behavior

When calling it.Next():

runtime error: invalid memory address or nil pointer dereference

The ListMultipartUploads request and response are as follows, no in-progress mulitpart upload info in the response body:

image

Steps to Reproduce

Run integration test for services/s3 with the following config:

STORAGE_S3_INTEGRATION_TEST=on
STORAGE_S3_CREDENTIAL=hmac:admin:password
STORAGE_S3_NAME=<bucketname>
STORAGE_S3_LOCATION=local

Also we need to set endpoint and UsePathStyle for initialization:

pairs.WithEndpoint("http:<MinIO server IP>:9000")
s3.WithForcePathStyle()

Environment

  • MinIO: minio version RELEASE.2021-10-13T00-23-17Z
  • services/s3: v2.5.0

Possible answer: minio/minio#11686

I think the problem should be #1000