In the docs online, the following is stated for CI...
# general
In the docs online, the following is stated for CI:
Copy code
Directories to cache
In your CI's config file, we recommend caching these directories:

$HOME/.cache/pants/setup: the initial bootstrapping of Pants.
$HOME/.cache/pants/named_caches: caches of tools like pip and PEX.
$HOME/.cache/pants/lmdb_store: cached content for prior Pants runs.
version 1.26 does not appear in the list of versions on the docs. Does the above statement still hold true for 1.26?
Hey Connor! It depends if you’re using the v1 or v2 Python backend You’ll always want to cache
You can leave off
because that was an optimization we added in 1.29 iirc The rest depends on if you’re using v1 or v2
We are still using the v1 backend
There is also a plugins directory in the cache, is that something that should also be preserved or would that be rebuilt from the info in
You'll benefit from preserving that, IIRC
Generally caching the
directory under the repo root will capture all post-setup state for reuse in the next run, so it'll be as if you re-ran Pants from the state at the end of the previous run. You may want to periodically clean that up if it gets too large (but that's true for any CI caching).
There is also a plugins directory
Ah yes, that’s good to cache too if y’all are using plugins. You can leave off the
As for setup state, then caching
, possibly without
is a good idea.
Ok, I will keep those those around then. @happy-kitchen-89482 We currently keep the
directory around, but I found that our tests fail to find a library that is built by a plugin when running from the cache. I was able to reproduce the issue by removing the
, and
directories, so the file is somewhere in there (I'm assuming the
directory). I should also note we run our pants build in a container, so maybe the thing to do is just mount the home directory so we keep all those extra files.
This is a custom plugin?
It is indeed
Ah, then it might be doing something unexpected I guess, wrt where it stores things. In v1 that was very possible. In v2, not.
Hard to know without seeing its source code.
Ok, the issue is slightly different than what I originally thought. I'll open a ticket.