https://pantsbuild.org/ logo
#general
Title
# general
j

jolly-midnight-72759

10/26/2020, 9:05 PM
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

flat-zoo-31952

10/26/2020, 9:43 PM
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

witty-crayon-22786

10/26/2020, 9:47 PM
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

flat-zoo-31952

10/26/2020, 9:56 PM
v2 doesn't seem to have a local
.cache
either
just a
~/.cache/pants
dir
w

witty-crayon-22786

10/26/2020, 9:56 PM
correct
f

flat-zoo-31952

10/26/2020, 9:57 PM
and this is safe/efficient to share across runs?
potentially concurrent ones?
w

witty-crayon-22786

10/26/2020, 9:57 PM
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

hundreds-father-404

10/26/2020, 10:03 PM
j

jolly-midnight-72759

10/26/2020, 10:37 PM
Are there lock files or issues with running two processes of pants against the same repo?
w

witty-crayon-22786

10/26/2020, 10:41 PM
@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
5 Views