So I have some users who frequently want to inspec...
# general
q
So I have some users who frequently want to inspect sandbox contents for debug. They report it's annoying to hunt down the unique sandbox tag. One thing that came to mind was the possibility of fixing the sandbox naming pattern to something like
<sandboxdir>/pants-sandbox-<deterministic-name-from-target>/
. If we used
local_execution_root_dir
to set the sandbox dir to somewhere git-ignored in the repo, then multiple users on the same machine would only see their own. I'm guessing there's maybe a reason that this isn't a good idea, but thought I would ask. Of course using e.g.
keep-sandboxes
might result in not-entirely-hermetic builds. Does anyone have a better idea around ease-of-sandbox access?
c
I think this could make sense, although we could still keep a random id at the end to preserve the hermetic nature still:
<sandbox-dir>/pants-sandbox-<name-from-taget>-<random-string>/
q
I guess one of the underlying questions is, if you left off the random string, could it still be hermetic assuming one user and one pants invocation at a time
c
sure, given the directory is wiped prior to execution, the path name itself does not affect hermeticity afaict.
q
right, neat. so I guess it's 2 things to enable,
target-name-in-sandbox-name
and
no-random-sandbox-suffix
(for when you know what you're doing). Would this be easy to add, should i try?
c
It’s on the rust side of things, I guess “easy” would be a relative term, at least for me.. 😛 (I’m not skilled in rust, so..) I don’t mind us incorporating the target name in the sandbox.. not sure how feasible it is to ensure a directory is clean before executing in case the random part of it is removed tho, so I guess I’m +1 on the former and maybe -1 on the latter.. but that’s just my view of this. 😉 If this is something you care deeply for, go for it! 😄 (solicit more feedback before getting too heavily invested is likely a good idea too)
We always encourage community contributions, that’s how this project can stay a healthy one 🙂
q
yep, understood. even just the first thing alone might help. I'm not a rust person either, but maybe I can marshall one
😅 1
👍 1