What do other developers think of GitHub Actions c...
# development
b
What do other developers think of GitHub Actions caching? The big gotcha are caches are immutable, so Pants normal caches don't quite match explicitly. The Pants setup dir can be cached based on Pants version. Then theres the other cache dirs. My thought was to include both in the key: • The branch name. This means for PR runs, the first build is heavy, and subsequent builds are fast_er_ (since the code from push to push should share most of the files with the first push) • This week (as an int). This would clear the cache every week or so so they dont get too stale IIUC restore keys correctly, if Pants had a cache trimming feature, that could be used as well.
Semi-related is this issue. If I could know the directory Pants will cache, say, the unzipped black PEX, I could cache that. And so on for other tools which change infrequently and I can easily get the fingerprint of based on
pants.toml
I suppose if I hash
pants.toml
then I can cache
~/.cache/pants/named_caches/pex_root
?
Oh not quite true because of my user reqs, however my PoC is just for format, so yes true
h
I suppose if I hash pants.toml then I can cache ~/.cache/pants/named_caches/pex_root?
Why is that?
b
Well my assumption was that the PEX Root would contain the artifacts from building/running the third party formatters. But local testing shows it didn't make it any faster 😕
E.g. cache the plumbing for building/running
black