ci: key Windows sccache cache on MSVC version#787
Merged
Conversation
wgtmac
approved these changes
Jun 29, 2026
Member
|
Thanks @abnobdoss for improving this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Add the
cl.exeversion to the Windows sccache cache key (and its restore-keys prefix) intestandsql_catalog_test, so each MSVC build keeps its own cache. On thesql_catalog_testmatrix the suffix stays empty for the non-Windows legs, so their keys don't change.Why
sccache decides whether a cached object is still valid from the compiler binary. GitHub patches the Windows runner image regularly, roughly once a week, and rolls each update out across the hosted fleet over a few days rather than all at once. During that window back-to-back runs can land on different
cl.exebuilds. When that happens the two builds share one cache key and keep evicting each other, and a run on a newer compiler restores the old cache, misses everything, and rebuilds the whole stack (around 35 to 50 minutes). Putting thecl.exeversion in the key gives each compiler its own cache, so a run stays warm instead of recompiling.Validation
On the
windows-2025runner the resolve step readcl.exeas 19.51.36248, and the Windowstestandsql_catalog_testbuilds passed with the version in the key. The cache is only saved onmain, so the warm reuse shows up there rather than on a branch run.