-
Notifications
You must be signed in to change notification settings - Fork 722
Replace OS name with image version in cache keys #11469
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: master
Are you sure you want to change the base?
Conversation
fc067ea to
bd768c5
Compare
|
Yay, it's doing the right thing. (The current run is of course reporting cache misses, because "ubuntu24" doesn't match "Linux"… but that's exactly what I want here.) |
|
This is not yet complete, though, I just realized: bootstrapping and quick jobs also use cache. The latter will be "hardest" to fix, because it uses the cache more times (7 or 8, IIRC, from when I grepped for ETA: nope, it's written. All Linux, but that means replacing a literal " |
|
Hm. Bootstrap caches have a datestamp in them. Should that be being updated, and if so when? (Regeneration of the JSON build plans seems likely to me, and as such probably that should be in the release wiki page where the plans are regenerated.) |
bd768c5 to
25727c7
Compare
|
Bootstrap and quick-jobs now also updated; let's see if I did it right…. |
25727c7 to
4d53a01
Compare
|
Missed some fallback keys in quick-checks which will be fixed on the next push; otherwise this is ready to go. (But not requesting reviews until I do that push.) |
This avoids OS updates in runner images giving us caches referencing possibly nonexistent OS shared objects.
4d53a01 to
66f076f
Compare
|
@andreasabel I learned about caching haskell things in GHA from your works so I dare to ping you here for your opinion: do you think this change makes sense? |
|
The now-linked issue explains why I did this, FWIW. /cc: @andreasabel |
|
Uh, let me correct that; that issue is mostly notes, the issue it links to is #11296 which is where the real problem arose. The best of my understanding is that GitHub was rolling out 24.04 one runner at a time, and when a build was cached on a newer runner any older runners trying to use that cache threw errors about cached references to newer glibc and/or glibcxx symbols. This PR ensures that such upgrades are separately cached. (IIRC we also saw this in a different form: I will also add that we prefer to use |
andreasabel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is making cache-keys more accurate, and you seem to need this accuracy (for reusing binaries from the cache).
I am missing the context to know the exact symptom you are fighting.
Just throwing in that the images get updated and if your setup is very dependent on the versions of everything on the image you might maybe need the image version also in the key: https://github.com/haskell/cabal/actions/runs/21572227509/job/62153142155#step:1:17
(But before considering this there should be a symptom, of course.)
|
I have access to the image version (it's |
|
I've also realized a couple more cases where this can happen: switching between release images. For example, if you for some reason need to downgrade I don't know how necessary this is for MacOS or Windows (Microsoft, at least, is fairly careful about backward compatibility — but forward compatibility requires an oracle regardless of OS) but this will make sure it can't come up with those either. |
Use cache keys that capture the OS version in sufficient detail to ensure that e.g. OS libraries don't mismatch between caches. This will prevent bad caches from being used when e.g.
ubuntu-latestis updated.Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: