distribution/registry/storage
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
..
cache format code with gofumpt 2022-11-03 22:48:20 +01:00
driver Fix S3 multipart upload pagination loop condition 2023-02-21 20:57:50 -08:00
blob_test.go replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
blobserver.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
blobstore.go deprecate ReadSeekCloser in favor of io.ReadSeekCloser 2022-11-10 23:10:32 +01:00
blobwriter.go format code with gofumpt 2022-11-03 22:48:20 +01:00
blobwriter_nonresumable.go bump up golang v1.17 2021-10-27 15:51:30 +08:00
blobwriter_resumable.go format code with gofumpt 2022-11-03 22:48:20 +01:00
catalog.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
catalog_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
doc.go Move storage package under registry package 2015-02-11 12:43:04 -08:00
error.go Remove old walk function 2018-01-18 13:06:07 -08:00
filereader.go replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
filereader_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
garbagecollect.go format code with gofumpt 2022-11-03 22:48:20 +01:00
garbagecollect_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
io.go replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
linkedblobstore.go deprecate ReadSeekCloser in favor of io.ReadSeekCloser 2022-11-10 23:10:32 +01:00
linkedblobstore_test.go Remove uses of deprecated go-digest.NewDigestFromHex, go-digest.Digest.Hex 2022-11-08 13:51:11 +01:00
manifestlisthandler.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
manifeststore.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
manifeststore_test.go registry/storage: rename variables that collided with imports 2022-11-28 10:08:05 +01:00
ocimanifesthandler.go format code with gofumpt 2022-11-03 22:48:20 +01:00
ocimanifesthandler_test.go registry: verify digest and check blob presence when put manifest 2021-04-16 16:11:52 +08:00
paths.go Remove uses of deprecated go-digest.NewDigestFromHex, go-digest.Digest.Hex 2022-11-08 13:51:11 +01:00
paths_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
purgeuploads.go format code with gofumpt 2022-11-03 22:48:20 +01:00
purgeuploads_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
registry.go Remove workaround from 2.1.1 for faulty 2.1.0 manifest links 2022-04-25 13:01:44 +01:00
schema2manifesthandler.go format code with gofumpt 2022-11-03 22:48:20 +01:00
schema2manifesthandler_test.go registry: verify digest and check blob presence when put manifest 2021-04-16 16:11:52 +08:00
signedmanifesthandler.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
tagstore.go format code with gofumpt 2022-11-03 22:48:20 +01:00
tagstore_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
v1unsupportedhandler.go format code with gofumpt 2022-11-03 22:48:20 +01:00
vacuum.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00