[vcpkg] support Google Cloud Storage as binary cache#11
[vcpkg] support Google Cloud Storage as binary cache#11ras0219-msft merged 4 commits intomicrosoft:mainfrom coryan:feat-binary-cache-with-gcs
Conversation
|
/cc: @ras0219-msft as we discussed earlier, here is an initial PR. |
vicroms
left a comment
There was a problem hiding this comment.
Thanks for the PR! I know it's still a draft but I took a peek and left some comments.
| bool gsutil_stat(const std::string& url) | ||
| { | ||
| System::Command cmd; | ||
| cmd.string_arg("gsutil").string_arg("-q").string_arg("stat").string_arg(url); |
There was a problem hiding this comment.
We may want to add gsutil to https://github.com/microsoft/vcpkg-tool/blob/main/src/vcpkg/tools.cpp to eventually support automatic download via vcpkgTools.xml (https://github.com/microsoft/vcpkg/blob/master/scripts/vcpkgTools.xml).
There was a problem hiding this comment.
That does seem like a good idea. I doubt I will have time to do this until the weekend. We can wait or merge now, your call, but I prefer to merge sooner rather than later.
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
Cool.
|
|
You can use a subdirectory of |
|
@coryan Let me know if you'd like this to be merged or if you're still working on it. |
|
Let's merge as-is, I am working on the parallel download but will take me a while. Thanks for checking on me. |
|
Awesome, thanks! When we push a binary tool update, I'll ping you to potentially add a docs blurb to binarycaching.md |
|
Happy to send patches to the documentation too. I also created a couple of bugs to implement the suggestions (requests?) that came up during the review. Feel free to assign them to me. |
# This is the 1st commit message: WIP # The commit message #2 will be skipped: # Fix build error # The commit message microsoft#3 will be skipped: # Implement bulk operation # The commit message microsoft#4 will be skipped: # Remove unused struct # The commit message microsoft#5 will be skipped: # Follow redirects # The commit message microsoft#6 will be skipped: # Get HTTP response code # The commit message microsoft#7 will be skipped: # Map URL response code to the correct index # The commit message microsoft#8 will be skipped: # Map URL response code to the correct index # The commit message microsoft#9 will be skipped: # Undo changes to workflows # The commit message microsoft#10 will be skipped: # Implement store to asset cache # The commit message microsoft#11 will be skipped: # handle file:// protocol # The commit message microsoft#12 will be skipped: # Implement try_download_file # The commit message microsoft#13 will be skipped: # Add missing calls to curl_easy_cleanup # The commit message microsoft#14 will be skipped: # Fix global init # The commit message microsoft#15 will be skipped: # Replace all calls in downloads.cpp and fix unit tests # The commit message microsoft#16 will be skipped: # use libcurl to submit metrics payload # The commit message microsoft#17 will be skipped: # Use Schannel on Windows # The commit message microsoft#18 will be skipped: # Apply suggestions from code review # # Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> # The commit message microsoft#19 will be skipped: # Fix unit test # The commit message microsoft#20 will be skipped: # Change curl error messages # The commit message microsoft#21 will be skipped: # generate message map # The commit message microsoft#22 will be skipped: # Always call multi_remove_handle # The commit message microsoft#23 will be skipped: # Fix end-to-end tests # The commit message microsoft#24 will be skipped: # Cleanup header lists # The commit message microsoft#25 will be skipped: # curl global init order # The commit message microsoft#26 will be skipped: # Use external libcurl on non-Windows # The commit message microsoft#27 will be skipped: # Install libcurl4 dev package on Linux # The commit message microsoft#28 will be skipped: # Disable metrics by default in debug builds # The commit message microsoft#29 will be skipped: # Set user agent using CURLOPT_USERAGENT # The commit message microsoft#30 will be skipped: # curl initialization again
Adds a new binary cache provider (configured via
x-gcs) to useGoogle Cloud Storage as the backend. All uploads and downloads
are done via the
gsutiltool.I expect this PR to need a lot of additional work, mostly I am seeking
feedback.
There is plenty of room for optimization, this uploads and downloads
one object at a time, and does not take advantage of
gsutilparallelizationeither (aka the
-moption).Another future improvement would be to structure the cache to support
gsutil rsync.