ObjectStorageProvider: add write back support #1677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When we succesfully restore a binary package from the cloud storage we should cache it locally to avoid downloading it again.
This feature works at these conditions:
default,write
,default,readwrite
,files,...,write
,files,...,readwrite
)x-aws,...,read
,x-aws,...,readwrite
,x-cos,...,read
,x-cos,...,readwrite
,x-gcs,...,read
,x-gcs,...,readwrite
)To cache it, it just moves the restored zip to the local cache directory instead of deleting it.
Design
Rational
We have our developers compiling with their machines inside our offices around the world and they also often work from home. To speed-up their job we store precompiled externals in archives on AWS S3.
For externals we have an internal solution that uses local hard-drive as first layer cache and S3 as second layer. When something is not found localy, it is downloaded and then left on the local hard-drive for a while.
A part of the compilation time optimization, this is also helping a lot into keeping egress costs under control:
This is an example of a month where costs were higher than usual because for some few days the feature was not working after an upgrade of our tool.
This small PR is implementing with fews lines of code a similar strategy to VCPKG.