Docker and Pants question: Do you use a different ...
# general
j
Docker and Pants question: Do you use a different
.pantsd
directory when running
./pants
in a Docker container? What about any
*.pyc
files created if you share your repo inside your container? Do you share your repo inside your container?
🤔 1
f
I just mount my cache dirs, but I'm running into intermittent problems doing that, so I'd like to see a better answer if possible
w
i would suggest against trying to share
.pants.d
… but anything in the home directory should be safe to share.
in v2, nothing that contributes to performance is located in
.pants.d
, so there isn’t really an advantage to including it anyway.
👀 1
f
v2 doesn't seem to have a local
.cache
either
just a
~/.cache/pants
dir
w
correct
f
and this is safe/efficient to share across runs?
potentially concurrent ones?
w
the v2 native “build cache” (the cache of Processes that pants has directly executed in sandboxes) is located under
~/.cache/pants/lmdb_store
@flat-zoo-31952: correct: it’s a concurrency safe database
👍 1
but more generally, the guarantee of anything under
~/.cache/pants
is that it is concurrency safe.
h
j
Are there lock files or issues with running two processes of pants against the same repo?
w
@jolly-midnight-72759: it is completely safe, but concurrent runs of pantsd in the same workspace are not supported currently (the `N+1`th runs will report that they are waiting), so if you want multiple runs, one of them would need to pass
--concurrent
(which effectively disables
pantsd
).
👍🏽 1
i just got back from parental leave, but it’s one of the things i’d like to tackle soon: https://github.com/pantsbuild/pants/issues/7654
👶🏽 1
🙏 2
😄 1