-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add code to handle pagination of parts. Fixes max layer size of 10GB bug #2815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please sign your commits following these rules: $ git clone -b "issue_2814" git@github.com:bainsy88/distribution.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Signed-off-by: Jack Baines <jack.baines@uk.ibm.com>
Codecov Report
@@ Coverage Diff @@
## master #2815 +/- ##
=======================================
Coverage 60.25% 60.25%
=======================================
Files 103 103
Lines 8024 8024
=======================================
Hits 4835 4835
Misses 2546 2546
Partials 643 643
Continue to review full report at Codecov.
|
@@ -587,11 +587,20 @@ func (d *driver) Writer(ctx context.Context, path string, append bool) (storaged | |||
if err != nil { | |||
return nil, parseError(path, err) | |||
} | |||
var multiSize int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This multiSize was never used so is redundant code. The size is calculated by the calling function
@@ -549,9 +549,9 @@ func (d *driver) Reader(ctx context.Context, path string, offset int64) (io.Read | |||
|
|||
// Writer returns a FileWriter which will store the content written to it | |||
// at the location designated by "path" after the call to Commit. | |||
func (d *driver) Writer(ctx context.Context, path string, append bool) (storagedriver.FileWriter, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting a variable with the name append
overwrites the built-in function which meant I couldn't use it further down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Execution LGTM but we should test before merging
Yeah, agree on testing. I have manually tested for what it's worth. The reason for no unit tests up front is just time constraints, looks like there isn't a framework for mocking out S3 calls at the moment, so would be a fair chunk of work to get that implemented. The S3 interface is huge as well which doesn't make it very easy! |
Hi guys! is there a time frame to get this done? I got an use case that precisely needs of this feature enabled, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @bainsy88
can you please run make test
and set these env vars https://github.com/docker/distribution/blob/f4506b517a7e9e64cfdcc73c991d9e85b784dc3e/registry/storage/driver/s3-aws/s3_test.go#L107 to make sure the S3 tests run
@bainsy88 is there some public image I can test this on? Would be good to get this merged in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I still see problems when pushing layers bigger then 10GB: /usr/bin/registry_DO_NOT_USE_GC -v
/usr/bin/registry_DO_NOT_USE_GC github.com/docker/distribution v2.8.0 I tried to push (my repo with 10gb sample files)
|
hi, |
…on of parts. Fixes max layer size of 10GB bug This is a back-port of distribution#2815 Signed-off-by: Flavian Missi <fmissi@redhat.com>
Add code to handle pagination of parts. Fixes max layer size of 10GB bug
Add code to handle pagination of parts. Fixes max layer size of 10GB bug Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
Add code to handle pagination of parts. Fixes max layer size of 10GB bug Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
No description provided.