Skip to content

remove datestamp from bootstrap cache keys#11613

Open
geekosaur wants to merge 1 commit intohaskell:masterfrom
geekosaur:remove-bootstrap-cache-timestamp
Open

remove datestamp from bootstrap cache keys#11613
geekosaur wants to merge 1 commit intohaskell:masterfrom
geekosaur:remove-bootstrap-cache-timestamp

Conversation

@geekosaur
Copy link
Collaborator

@geekosaur geekosaur commented Mar 12, 2026

The intent behind the datestamps was to avoid accumulating out of date source tarballs — which we've been doing since 2022, because nobody's been updating it.

Use a hash computed from the bootstrap JSONs instead, which will be self-updating.


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:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@geekosaur
Copy link
Collaborator Author

geekosaur commented Mar 12, 2026

EDIT: this comment is now historical; the first version removed the datestamp entirely, because nobody knew why it was there.


On second thought, I'm probably closing this in favor of adding a reminder to update the datestamp to things that update the bootstrap JSONs. The problem is that we'll accumulate older versions of source packages. (And probably already have such accumulation, since we haven't been updating the datestamp.)

Comments?

@geekosaur
Copy link
Collaborator Author

Actually, appropriate keys can be computed dynamically by using hashFiles on the bootstrap JSONs, so the next push will do that instead. Existing caches will be matched by restore-keys, in effect upgrading them without losing existing cached downloads.

@geekosaur
Copy link
Collaborator Author

Wait, if I save the existing caches we save 4 years of outdated source tarballs. Guess they just have to go.

@geekosaur geekosaur force-pushed the remove-bootstrap-cache-timestamp branch from faeed08 to 052834d Compare March 12, 2026 23:11
@geekosaur geekosaur force-pushed the remove-bootstrap-cache-timestamp branch 3 times, most recently from 4a0b19c to ddb8407 Compare March 13, 2026 00:04
@geekosaur
Copy link
Collaborator Author

Uh, anyone know if it's safe to swap the checkout and cache steps? Because it's kinda hard to compute a hash for a file that doesn't exist yet.

@geekosaur geekosaur force-pushed the remove-bootstrap-cache-timestamp branch from ddb8407 to 950755f Compare March 13, 2026 00:11
@geekosaur
Copy link
Collaborator Author

Hackage is "down" again, but at least the cache keys now work properly.

Without some distinct identifier, downloaded sources will accumulate
(and have been since the last time the datestamp was updated).

The old caches are ignored and will be purged according to GitHub's
cache expiration, because otherwise we'd continue to carry 4 years'
worth of outdated source tarballs.
@geekosaur geekosaur force-pushed the remove-bootstrap-cache-timestamp branch from 950755f to b570a10 Compare March 13, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants