Skip to content
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

Add new parameter accelerate to S3 storage driver. #3181

Merged
merged 3 commits into from Apr 4, 2022
Merged

Add new parameter accelerate to S3 storage driver. #3181

merged 3 commits into from Apr 4, 2022

Conversation

pimuzzo
Copy link
Contributor

@pimuzzo pimuzzo commented Jun 12, 2020

Rebase of #2166 due to inactivity

Original PR comment:
I've added an optional parameter to enable S3 Transfer acceleration for the S3 storage driver. Thank you very much for considering the change.

If s3accelerate is set to true then we turn on S3 Transfer Acceleration via the AWS SDK. It defaults to false since this is an opt-in feature on the S3 bucket.

Signed-off-by: Kirat Singh kirat.singh@wsq.io

@gionn
Copy link

gionn commented Jun 15, 2020

If anyone interested, we published a docker image with this patch applied on top of the 2.7 branch, and we are using it in production since friday to fix slow downloads speeds when S3 bucket is in a different region than clients pulling.

https://hub.docker.com/r/cloudesire/distribution/tags

@@ -427,6 +446,10 @@ func New(params DriverParameters) (*Driver, error) {
awsConfig.WithEndpoint(params.RegionEndpoint)
}

if params.S3Accelerate {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment: just use awsConfig.WithS3UseAccelerate(params.S3Accelerate)? It can be concise.

@wy65701436
Copy link
Collaborator

and it's better to revert the change of document as well. https://github.com/docker/docker.github.io/pull/10993/files

@thaJeztah
Copy link
Member

@pimuzzo looks like CI is failing because the second commit is missing a DCO sign-off in the commit message https://github.com/docker/distribution/blob/master/CONTRIBUTING.md#sign-your-work

@hectoragb
Copy link

hectoragb commented Sep 28, 2020

@thaJeztah. Is there an ETA for merging this PR?

@milosgajdos
Copy link
Member

@pimuzzo this patch looks great. Would you mind rebasing again, please?

@pimuzzo
Copy link
Contributor Author

pimuzzo commented Dec 18, 2020

@milosgajdos PR rebased

@wy65701436 @thaJeztah Fixed review and signed commits

docs/configuration.md Outdated Show resolved Hide resolved
@pimuzzo pimuzzo changed the title Add new parameter s3accelerate to S3 storage driver. Add new parameter accelerate to S3 storage driver. Feb 21, 2021
@codecov-io
Copy link

Codecov Report

Merging #3181 (0067a94) into main (1057ff7) will decrease coverage by 0.28%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3181      +/-   ##
==========================================
- Coverage   56.12%   55.84%   -0.29%     
==========================================
  Files         105      102       -3     
  Lines        7431     7222     -209     
==========================================
- Hits         4171     4033     -138     
+ Misses       2615     2552      -63     
+ Partials      645      637       -8     
Flag Coverage Δ
linux ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
registry/storage/registry.go
registry/storage/linkedblobstore.go
reference/normalize.go
registry/api/errcode/errors.go
registry/handlers/hmac.go
notifications/metrics.go
registry/storage/cache/cache.go
registry/proxy/scheduler/scheduler.go
registry/auth/token/util.go
registry/auth/token/accesscontroller.go
... and 197 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1057ff7...0067a94. Read the comment docs.

@pimuzzo pimuzzo requested a review from joaodrp February 21, 2021 14:54
Copy link
Member

@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pimuzzo can you please update the S3 driver docs https://github.com/docker/docker.github.io/blob/master/registry/storage-drivers/s3.md as the comment on the original PR suggest?

@pimuzzo
Copy link
Contributor Author

pimuzzo commented Mar 1, 2021

@milosgajdos please take a look to https://github.com/docker/docker.github.io/pull/11140/files and leave me some comment on what you would change, it looks good to me

@pimuzzo pimuzzo requested a review from milosgajdos March 1, 2021 17:31
@gionn
Copy link

gionn commented Jun 1, 2021

@milosgajdos 🙏🏻

@milosgajdos
Copy link
Member

@pimuzzo can you rebase one more time. This LGTM and I'd like to give this 👍 so we can merge this in.

@milosgajdos
Copy link
Member

@pimuzzo can you sign your commits, please?

@pimuzzo
Copy link
Contributor Author

pimuzzo commented Apr 4, 2022

@milosgajdos I changed my workstation, please give me some time to fix all the things :D

Kirat Singh and others added 3 commits April 4, 2022 19:34
If s3accelerate is set to true then we turn on S3 Transfer
Acceleration via the AWS SDK.  It defaults to false since this is an
opt-in feature on the S3 bucket.

Signed-off-by: Kirat Singh <kirat.singh@wsq.io>
Signed-off-by: Simone Locci <simonelocci88@gmail.com>
Signed-off-by: Simone Locci <simonelocci88@gmail.com>
Signed-off-by: Simone Locci <simonelocci88@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2022

Codecov Report

Merging #3181 (66c0776) into main (dc7f44b) will not change coverage.
The diff coverage is n/a.

❗ Current head 66c0776 differs from pull request most recent head 80952c9. Consider uploading reports for the commit 80952c9 to get more accurate results

@@           Coverage Diff           @@
##             main    #3181   +/-   ##
=======================================
  Coverage   56.33%   56.33%           
=======================================
  Files         101      101           
  Lines        7313     7313           
=======================================
  Hits         4120     4120           
  Misses       2536     2536           
  Partials      657      657           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc7f44b...80952c9. Read the comment docs.

@pimuzzo
Copy link
Contributor Author

pimuzzo commented Apr 4, 2022

@milosgajdos I did it 👯‍♂️

@milosgajdos milosgajdos merged commit cd51f38 into distribution:main Apr 4, 2022
@milosgajdos milosgajdos mentioned this pull request Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants