-
Notifications
You must be signed in to change notification settings - Fork 335
ObjectStorageProvider: add write back support #1677
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
base: main
Are you sure you want to change the base?
ObjectStorageProvider: add write back support #1677
Conversation
|
Related: #1406 |
4649e4f to
e13b440
Compare
e13b440 to
676e48f
Compare
|
There are 3 PRs trying to implement write back support to this tool. This is a must-have feature in many circumstances. What distinguish this solution is the following:
What about taking in this now and then looking forward for a more robust solution based on the other proposals in the mid-long term? At the end this is the most efficient solution possible on the backends we are targeting:
No extra copies, just one fast, atomic I/O operation. |
|
@BillyONeal what do you think about my last comment? |
|
This looks like a very positive pr, that just does local caching where it can, why is it not accepted? I understand all of the issues about the general write back support problem, but this fixes 90% of my use case, such that I have a script that does this manually already, which I run regularly, but it pulls in way more than i need or want. |
15f5e6d to
dac97e8
Compare
|
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
flowchart TD subgraph Dev["Developer Machine"] A[Checked-out C++ Code] B["VCPKG Build Process"] C["Local Binary Cache (.zip files)"] end subgraph AWS["Build of the external component (CMake)"] D[GitHub checkout] E[CMake config] F[CMake build] end A --> B B -->|Check| C C -->|Hit| BDone[Use from Local Cache] C -->|Miss| FCheck[Check S3 Cache] FCheck -->|Hit| FDownload[Download from S3] FDownload --> B FDownload -.-> CUpdate FCheck -->|Miss| D D --> E E --> F F --> CUpdate["Update Local Cache"] CUpdate --> B BDone --> B style BDone fill:#ccffcc,stroke:#333 style FDownload fill:#ccffcc,stroke:#333 style CUpdate fill:#ccffcc,stroke:#333 linkStyle 6 stroke:red,stroke-width:3px,stroke-dasharray: 5, 5Rational
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.