-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use a separate cache entry for OS independent files #189
Comments
@quyykk this is an interesting idea indeed, and I wonder if we really need caching the vcpkg repository content (along with the vcpkg executable), especially since most of the time would have be spent building the vcpkg executable which is not the case anymore since a prebuilt version is downloaded, so it already works similarly like a cache. To disable and experiment without run-vcpkg's caching, it suffices to set doNotCache:true. I'll experiment with it. |
I was just testing without caching and indeed, restoring from cache takes ~10s and downloading the vcpkg repo also takes ~10s + ~1s (the executable). |
There's not always a prebuilt version available (with Linux ARM being the biggest missing). Maybe the doNotCache input could be inverted? |
@quyykk good idea, i can make by default |
@quyykk i am going to disable the cache of vcpkg+ports file by default and while testing this out, i noticed that the GH Action cache service is being throttled and refusing to answer too many requests altogether (not sure if this is done per user or per repo) with http status 429, for example: https://github.com/lukka/CppBuildTasks-Validation/actions/runs/4592317371/jobs/8109258929#step:5:94 How is vcpkg reacting to 429 http status? It should be retrying or at least warning that it failed the upload and why. I think there before there was one request per |
@quyykk with release https://github.com/lukka/run-vcpkg/releases/tag/v11.0 the cache of vcpkg's exe and port files is disabled by default, and can be turned out manually by the user ( it may be ideal that the flag is turned on automatically by the action though: #193 |
I don't think it retries, it just fails. It should say that it uploaded 0 packages to the cache though I believe. There is a retry mechanism when restoring from what I can tell. |
@quyykk yes, when the upload to the cache fails for a single port, it does not report an error but it says "Uploaded 0 package(s) to GHA in 123 ms.". The takeaway is that when using lot of ports (e.g. the boost metapackage) with the cache granularity of one entry per port, hitting the GitHub Action cache rate limits is happening quite often leading to some sporadic failure, which once relaunched manually later then they succeed. |
Yeah, Boost has a lot of header only libraries that take no time to build. I'll see if I can add a retry mechanism to vcpkg-tool 😄 |
@quyykk if retrying is a viable option, sounds good. Otherwise if retrying could lead to worsening the problem, it may be sufficient to write in the output the reason/failure that the built package has not been saved on the GH cache. A summary at the end would be a nice to have, e.g.,: I think all aforementioned suggestions could be a request on vcpkg-tool issue section. |
I was surprised to learn that run-vcpkg stores the vcpkg port and versioning files alongside the vcpkg exectuable in its cache. This makes the cache at least 70MB with lots of duplication across OSs. Since these files without the executable are OS independent, they should be stored in one (separate) cache usable by every OS (this has recently become possible).
Thoughts? Thanks!
The text was updated successfully, but these errors were encountered: