distribution/registry/storage/driver
Aaron Lehmann 2074688be9 Fix S3 multipart upload pagination loop condition
The loop that iterates over paginated lists of S3 multipart upload parts
appears to be using the wrong variable in its loop condition. Nothing
inside the loop affects the value of `resp.IsTruncated`, so this loop
will either be wrongly skipped or loop forever.

It looks like this is a regression caused by commit
7736319f2e. The return value of
`ListMultipartUploads` used to be assigned to a variable named `resp`,
but it was renamed to `partsList` without updating the for loop
condition.

I believe this is causing an error we're seeing with large layer uploads
at commit time:

    upload resumed at wrong offset: 5242880000 != 5815706782

Missing parts of the multipart S3 upload would cause an incorrect size
calculation in `newWriter`.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2023-02-21 20:57:50 -08:00
..
azure replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
base format code with gofumpt 2022-11-03 22:48:20 +01:00
factory go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
filesystem replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
gcs replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
inmemory Merge pull request #3686 from m5i-work/exp 2022-11-11 17:07:14 +00:00
middleware cloudfront: use strings.Equalfold() 2022-11-10 22:38:16 +01:00
oss replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
s3-aws Fix S3 multipart upload pagination loop condition 2023-02-21 20:57:50 -08:00
swift replace strings.Split(N) for strings.Cut() or alternatives 2022-11-10 22:38:12 +01:00
testdriver go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
testsuites replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
fileinfo.go format code with gofumpt 2022-11-03 22:48:20 +01:00
storagedriver.go replace strings.Split(N) for strings.Cut() or alternatives 2022-11-10 22:38:12 +01:00
walk.go storagedriver/s3: Optimized Walk implementation + bugfix 2021-08-16 16:07:25 -04:00
walk_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00