proud-byte-81916
09/27/2023, 3:49 PM/tmp
partition gets filled up pretty quickly - i changed it using local_execution_root_dir = ".temp"
in the [GLOBAL] part of pants.toml, but now whenever I run for example pants test ::
I get in infinite loop:
15:48:48.52 [INFO] Initializing scheduler...
15:48:52.12 [INFO] Scheduler initialized.
15:48:52.52 [INFO] Filesystem changed during run: retrying `Paths(**)` in 500ms...
15:48:52.52 [INFO] Filesystem changed during run: retrying `Paths(**)` in 500ms...
15:48:52.52 [INFO] Filesystem changed during run: retrying `@rule(pants.core.goals.test.run_tests())` in 500ms...
15:48:53.33 [INFO] Filesystem changed during run: retrying `@rule(pants.core.goals.test.run_tests())` in 500ms...
15:48:54.38 [INFO] Filesystem changed during run: retrying `@rule(pants.core.goals.test.run_tests())` in 500ms...
15:48:54.39 [INFO] Filesystem changed during run: retrying `@rule(pants.backend.python.dependency_inference.rules.resolve_parsed_dependencies())` in 500ms...
15:48:54.40 [INFO] Filesystem changed during run: retrying `@rule(pants.backend.python.dependency_inference.rules.resolve_parsed_dependencies())` in 500ms...
How can I exclude a folder to from the inotify service that pants uses? Or what other solution could there be to have the temp folder where the main repository is?
Thank you so much in advance! 🙂curved-television-6568
09/27/2023, 4:12 PM.
prefix already. Do you set your own ignores overriding the defaults rather than adding to them perhaps?
https://www.pantsbuild.org/docs/options#addremove-semanticscurved-television-6568
09/27/2023, 4:13 PM.pants.d/pants.log
file, it tells you the file path that was notified as changed, so you can verify it is what you expectedproud-byte-81916
09/27/2023, 4:33 PMIntrinsicError: Failed to create hardlink to /workspaces/kittl-python/.cache/immutable/files/fa/faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8 at /workspaces/kittl-python/.temp/pants-sandbox-9z0B1O/pex: No such file or directory (os error 2)
It seems that it is not creating .temp/pants-sandbox-9z0B1O/pex
My [GLOBAL] pants.toml is:
[GLOBAL]
pants_version = "2.17.0"
pants_ignore = [
"!.env", # for tests to work
]
local_store_dir = ".cache"
local_cache = true
local_execution_root_dir = ".temp"
Any idea how to fix this by any chance? Thank you! 🙂curved-television-6568
09/27/2023, 4:43 PM-ldebug
maybe you get some more hints? and/or with --keep-sandboxes=always
?curved-television-6568
09/27/2023, 4:44 PMproud-byte-81916
09/27/2023, 4:45 PMproud-byte-81916
09/27/2023, 4:45 PMenough-analyst-54434
09/27/2023, 4:47 PMcurved-television-6568
09/27/2023, 4:51 PMWhat do you mean by “could be that you need to ignore it, like we just did”?about the gotcha of having the sandbox root in-repo, would at least require to ignore it, which we just did by adding it to
pants_ignore
(although I don’t see that in your pants config above) — but you said it’s working now 😉proud-byte-81916
09/27/2023, 4:52 PMpants_ignore
but didn't changeproud-byte-81916
09/27/2023, 4:53 PMproud-byte-81916
09/27/2023, 5:01 PMcurved-television-6568
09/27/2023, 5:12 PMkeep-sandboxes
what’s left in there? it should be cleaned up, is my impression (not used for caching, no, that would be the local store dir.proud-byte-81916
09/27/2023, 5:12 PMproud-byte-81916
09/27/2023, 5:30 PMvscode ➜ /workspaces/kittl-python (CU-86bvyazwa-Deploy-Logo-Generator-NER) $ pants lint ::
17:30:08.23 [ERROR] 1 Exception encountered:
Engine traceback:
in `lint` goal
IntrinsicError: Error making tempdir for local process execution: Custom { kind: NotFound, error: PathError { path: "/tmp/pants/pants-sandbox-YdPTW5", err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } }
curved-television-6568
09/27/2023, 5:32 PMproud-byte-81916
09/27/2023, 5:33 PMcurved-television-6568
09/27/2023, 5:33 PMproud-byte-81916
09/27/2023, 5:33 PMcurved-television-6568
09/27/2023, 5:34 PMproud-byte-81916
09/27/2023, 5:35 PMpants test ::
in my temp folder i keep having folders like: immutable_inputsgXwqTN immutable_inputsz9zVwU
not sure why these are there, but even if they stay, not sure then why linting is trying to find a sandbox thereproud-byte-81916
09/27/2023, 5:39 PMbroad-processor-92400
09/27/2023, 10:40 PMpants_ignore = [
"!.env", # for tests to work
]
you may want to use pants_ignore.add = [ ...
(i.e. add the .add
) instead, or else it's overwriting the default. Without the default, it'll be noticing changes in .git
and other unhelpful locations:
• see https://www.pantsbuild.org/docs/reference-global#pants_ignore for the default
• see https://www.pantsbuild.org/docs/options#addremove-semantics (particularly the "toml" callout) for how .add
worksproud-byte-81916
09/28/2023, 11:24 AMbroad-daybreak-7542
02/20/2025, 1:39 PM