gray-shoe-19951
06/20/2023, 4:37 AMbroad-processor-92400
06/20/2023, 4:55 AM~/.cache/pants/named_caches/mypy_cache
directory persists between CI runs, e.g. if using GitHub actions, use the actions/cache@v3
action with that path (and an appropriately invalidated cache key).
https://www.pantsbuild.org/docs/using-pants-in-ci discusses these directories somewhat.bitter-ability-32190
06/20/2023, 10:50 AMgray-shoe-19951
06/20/2023, 2:39 PMOne way to benefit from mypy's internal caching would be ensure thedirectory persists between CI runs, e.g. if using GitHub actions, use the~/.cache/pants/named_caches/mypy_cache
action with that path (and an appropriately invalidated cache key).actions/cache@v3
We recently switched to remote catching. We are using kubernetes agent in Jenkins. In the past, We mounted a kubernetes persist volume across our builds to share cache. Later We realized that it isn't the recommended way since lmdb used in Pants only supports local storage and we see the cache corruption sometimws. Hence, we moved to remote catching. Here are some follow-up questions, 1. Why the pants remote cache can not cache the mypy_cache as well? 2. What exactly were put into the remote cache by Pants? I was imagining Pants would put all those cache folders (e.g. lmdb_store/named_caches/etc) there but it doesn't seem the case.
bitter-ability-32190
06/20/2023, 2:54 PMgray-shoe-19951
06/20/2023, 4:20 PMWe also have ideas on how to model mypy differently to make caching better.
What is the plan to make it better. Btw, I don't think pants support pyright at the moment, am I right?
bitter-ability-32190
06/20/2023, 4:21 PMbitter-ability-32190
06/20/2023, 4:22 PM