I'm looking at our CI lmdb caching and seeing very...
# general
b
I'm looking at our CI lmdb caching and seeing very low cache hits (like, almost always zero). I think this is because we run multiple jobs, like the first one is just lint. So that one writes the cache, and then subsequent jobs just read, the cache, but then don't save it back (
Cache hit occurred on the primary key pants-lmdb-store-Linux-cache0-py3.11-522859fdfb8ba8e8dacb37b17f2cbd46a79909ca, not saving cache.
). I'm thinking the init-pants action should call actions/cache with
save-always: 'true'
, specifically for the lmdb cache. Or am I missing something there?
I guess it's working as-is; my situation may just be degraded because of jobs running in parallel; I just saw a
Failed to save: Unable to reserve cache with key pants-lmdb-store-Linux-cache0-py3.11-47aa99699961ae3b5364c7350ed7938c4c357e7b, another job may be creating this cache. More details: Cache already exists
still true though -- even if I serialize them, the first one saves its cache and then subsequent ones don't