I'm trying to work out how to take advantage of me...
# general
m
I'm trying to work out how to take advantage of memoization for pytest in our CI setup. It's not clear to me where this caching happens or where the information is stored, and can't seem to work it out from the docs. Right now we are using buildbarn and our pants.ci.toml has these options:
Copy code
...
local_cache = false
remote_cache_read = true
remote_cache_write = true
remote_execution = true
Outside of this we are only caching the pants bootstrap
/home/runner/.cache/nce/
While buildfarm seems to speed up pex setup and execution, we end up rerunning the tests even when it's not actually required.
h
Hmm, you shouldn’t be rerunning if the
pytest
processes are cached. Are you using test batching? It’s possible for batches to be different between runs in a way that prevents cache hits
m
Not to my knowledge -- if these settings ought to work there's probably something naive we're doing that is invalidating the cache. In this case with these settings would you expect the pytest processes be cached remotely on buildfarm?
h
I would, unless - try turning on
local_cache
, just in case there is some writethrough issue. And also, I suppose cache writes could be failing due to timeouts or something? Does buildbarn offer any dashboards to inspect this?