-
Notifications
You must be signed in to change notification settings - Fork 551
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
Correct dist-toolchain cache invalidation #554
Comments
The dist client has this concept of "weak toolchain hashes" which are an easy-to-compute hash of some parts of the toolchain: Lines 47 to 55 in d309339
It uses those to lookup whether it has already packaged a toolchain, and during packaging it generates a stronger hash from all the files in the toolchain archive, which is what it uses to talk about toolchains with the build server. For the Rust compiler the weak hash is actually pretty good, it includes the Lines 1003 to 1011 in 6371211
The weak map gets persisted as It's also possible that this is related to #87 will not do the right thing if someone uses rustup to point the same Line 839 in d309339
|
This seems like #87 |
On further inspection, there's the override case to handle, but also the simpler case of a binary path like |
That seems like it ought to be handled properly? The sccache server caches compiler info by path + mtime, so if a compiler gets updated that ought to invalidate the cache. |
… compiler info. The hash for rust compilations do not currently take the dist archive into account, meaning that updates to the dist archive may require clearing the cache to purge old compiled artifacts. This takes the dist archive into account when hashing rust compiles by hashing it when constructing a rust compiler instance. It also takes the dist archive and its mtime into account when caching compiler info in order to account for swapping out archives without re-starting the local daemon. Fixes mozilla#554
… compiler info. The hash for rust compilations do not currently take the dist archive into account, meaning that updates to the dist archive may require clearing the cache to purge old compiled artifacts. This takes the dist archive into account when hashing rust compiles by hashing it when constructing a rust compiler instance. It also takes the dist archive and its mtime into account when caching compiler info in order to account for swapping out archives without re-starting the local daemon. Fixes mozilla#554
A user reported needing to delete the
dist-client
cache directory locally when moving between rust toolchain versions to correct a version mismatch between local and the distributed builder. We should determine the circumstances where this might happen and correct it.The text was updated successfully, but these errors were encountered: