worried-painter-31382
09/26/2022, 3:34 PMpantsd
isn't being re-used. We get
17:26:09.72 [INFO] Initializing scheduler...
17:26:09.85 [INFO] Scheduler initialized.
repeatedly for subprocesses.
2. It looks like python2.7 is used for some pex unzip thingy? Is this expected?
3. We're having cache misses everytime the subprocess is rerun. Could it be due to pyenv, XDG_CACHE_HOME_DIR or something else? It's hard to figure out what settings causes pants to disregard its cache.bitter-ability-32190
09/26/2022, 3:41 PM.pants.d/pants.log
to see what inotify
is telling pants has changedworried-painter-31382
09/26/2022, 3:42 PMbitter-ability-32190
09/26/2022, 3:42 PM-ldebug
and looking for "Running Process..." Log lines and comparing like-elements across runs can help identify what inputs have changedhappy-kitchen-89482
09/26/2022, 4:12 PMsubprocess
or similar?bitter-ability-32190
09/26/2022, 4:42 PMworried-painter-31382
09/26/2022, 4:52 PMhappy-kitchen-89482
09/26/2022, 4:58 PM./pants
directly from the shell?subprocess
in a repl, and I don’t see the issue happeningworried-painter-31382
09/26/2022, 5:02 PMbitter-ability-32190
09/26/2022, 5:10 PMworried-painter-31382
09/26/2022, 5:14 PM-ldebug
for the different invocations, app.py
runs
subprocess.run(
[str(pants_path), '-ldebug', 'package', str(dockerfile), '--dynamic-ui=False'],
text=True,
)
./pants package <snip>
20:08:06.55 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f8c4aae53a0>
20:08:06.55 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f8c4aae53a0>
20:08:06.55 [DEBUG] Connecting to pantsd on port 43245
20:08:06.55 [DEBUG] Connecting to pantsd on port 43245 attempt 1/3
20:08:06.55 [DEBUG] Connected to pantsd
20:08:06.57 [DEBUG] Launching 1 roots (poll=false).
20:08:06.57 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed.
20:08:06.58 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
20:08:06.58 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.scope_options()) of Some("@rule(construct_scope_())") changed.
20:08:06.58 [DEBUG] Dependency @rule(construct_scope_()) of Some("@rule(pants.init.plugin_resolver.resolve_plugins())") changed.
20:08:06.58 [DEBUG] computed 1 nodes in 0.011746 seconds. there are 7 total nodes.
20:08:06.60 [INFO] Initialization options changed: reinitializing scheduler...
$ python app.py
20:11:17.27 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f1555c3f580>
20:11:17.27 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f1555c3f580>
20:11:17.27 [DEBUG] Connecting to pantsd on port 43245
20:11:17.27 [DEBUG] Connecting to pantsd on port 43245 attempt 1/3
20:11:17.27 [DEBUG] masking tcgetattr exception: error(25, 'Inappropriate ioctl for device')
20:11:17.28 [DEBUG] Connected to pantsd
20:11:17.31 [DEBUG] Launching 1 roots (poll=false).
20:11:17.31 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed.
20:11:17.32 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
20:11:17.32 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.scope_options()) of Some("@rule(construct_scope_())") changed.
20:11:17.32 [DEBUG] Dependency @rule(construct_scope_()) of Some("@rule(pants.init.plugin_resolver.resolve_plugins())") changed.
20:11:17.32 [DEBUG] computed 1 nodes in 0.010312 seconds. there are 7 total nodes.
20:11:17.35 [INFO] Initialization options changed: reinitializing scheduler...
bitter-ability-32190
09/26/2022, 6:25 PMworried-painter-31382
09/26/2022, 6:46 PM20:11:17.32 [DEBUG] Dependency @rule(construct_scope_()) of Some("@rule(pants.init.plugin_resolver.resolve_plugins())") changed.
)bitter-ability-32190
09/26/2022, 7:32 PMworried-painter-31382
09/26/2022, 7:32 PM[GLOBAL]
pythonpath = ["%(buildroot)s/pants-plugins"]
pants_version = "2.13.0"
backend_packages = [
"pants.backend.python",
"pants.backend.docker",
"hash",
]
[source]
root_patterns = ["/"]
bitter-ability-32190
09/26/2022, 7:34 PMworried-painter-31382
09/26/2022, 7:36 PM__pycache__
directory in the plugin folderbitter-ability-32190
09/26/2022, 7:36 PMworried-painter-31382
09/26/2022, 7:36 PMpants_ignore
worked but read it again, it's gitignorepython app.py 21:40:59.89 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f471b174eb0> 21:40:59.90 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f471b174eb0> 21:40:59.90 [DEBUG] Connecting to pantsd on port 35825 21:40:59.90 [DEBUG] Connecting to pantsd on port 35825 attempt 1/3 21:40:59.90 [DEBUG] Connected to pantsd 21:40:59.93 [DEBUG] Launching 1 roots (poll=false). 21:40:59.94 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed. 21:40:59.95 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. 21:40:59.95 [DEBUG] computed 1 nodes in 0.010659 seconds. there are 7 total nodes. 21:40:59.97 [DEBUG] Launching 1 roots (poll=false). 21:40:59.97 [DEBUG] computed 1 nodes in 0.000277 seconds. there are 7 total nodes. 21:41:00.00 [DEBUG] specs are: Specs(includes=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(FileLiteralSpec(file='cloud/deployment/jwk_cacher/Dockerfile'),), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=True, from_change_detection=False), ignores=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=False, from_change_detection=False)) 21:41:00.00 [DEBUG] changed_options are: ChangedOptions(since=None, diffspec=None, dependees=<DependeesOption.NONE: 'none'>) 21:41:00.00 [DEBUG] Launching 1 roots (poll=false). 21:41:00.00 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed. 21:41:00.00 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. 21:41:00.00 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. 21:41:00.01 [DEBUG] computed 1 nodes in 0.001878 seconds. there are 818 total nodes. 21:41:00.01 [DEBUG] requesting <class 'pants.backend.project_info.list_targets.List'> to satisfy execution of `list` goal 21:41:00.01 [DEBUG] Launching 1 roots (poll=false). 21:41:00.01 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. 21:41:00.01 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. 21:41:00.01 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. 21:41:00.01 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed. cloud/deployment/jwk_cacher:jwk-cacher 21:41:00.01 [DEBUG] Completed: `list` goal 21:41:00.01 [DEBUG] computed 1 nodes in 0.007508 seconds. there are 820 total nodes.
./pants list -ldebug /home/tobias/projects/profiler/cloud/deployment/jwk_cacher/Dockerfile
21:43:40.79 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f2d66691e20>
21:43:40.79 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f2d66691e20>
21:43:40.79 [DEBUG] Connecting to pantsd on port 35825
21:43:40.80 [DEBUG] Connecting to pantsd on port 35825 attempt 1/3
21:43:40.80 [DEBUG] Connected to pantsd
21:43:40.81 [DEBUG] Launching 1 roots (poll=false).
21:43:40.81 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed.
21:43:40.82 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
21:43:40.82 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.scope_options()) of Some("@rule(construct_scope_())") changed.
21:43:40.82 [DEBUG] Dependency @rule(construct_scope_()) of Some("@rule(pants.init.plugin_resolver.resolve_plugins())") changed.
21:43:40.82 [DEBUG] computed 1 nodes in 0.014019 seconds. there are 7 total nodes.
21:43:40.85 [INFO] Initialization options changed: reinitializing scheduler...
21:43:40.85 [DEBUG] terminating pantsd service: <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7eee74368dc0>
21:43:41.27 [DEBUG] terminating pantsd service: <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7eee74365040>
21:43:41.27 [DEBUG] File handle limit is: 10000
21:43:41.27 [DEBUG] Using [cache::CommandRunner { inner: bounded::CommandRunner { inner: nailgun::CommandRunner { inner: local::CommandRunner { .. }, .. }, .. }, .. }, cache::CommandRunner { inner: bounded::CommandRunner { inner: nailgun::CommandRunner { inner: local::CommandRunner { .. }, .. }, .. }, .. }] for process execution.
21:43:41.37 [DEBUG] Changes to /home/tobias/.cache/pants/setup/bootstrap-Linux-x86_64/pants.QA6V74/install/bin, outside of the buildroot, will not be invalidated.
21:43:41.37 [DEBUG] Changes to /home/tobias/.cache/pants/setup/bootstrap-Linux-x86_64/pants.QA6V74/install/bin, outside of the buildroot, will not be invalidated.
21:43:41.37 [DEBUG] Changes to /home/tobias/.pyenv/versions/3.9.13/lib/python39.zip, outside of the buildroot, will not be invalidated.
21:43:41.37 [DEBUG] Changes to /home/tobias/.pyenv/versions/3.9.13/lib/python3.9, outside of the buildroot, will not be invalidated.
21:43:41.37 [DEBUG] Changes to /home/tobias/.pyenv/versions/3.9.13/lib/python3.9/lib-dynload, outside of the buildroot, will not be invalidated.
21:43:41.37 [DEBUG] Changes to /home/tobias/.cache/pants/setup/bootstrap-Linux-x86_64/2.13.0_py39/lib/python3.9/site-packages, outside of the buildroot, will not be invalidated.
21:43:41.37 [DEBUG] setting up service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7eecce188820>
21:43:41.37 [DEBUG] setting up service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7eecce188a60>
21:43:41.37 [DEBUG] starting service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7eecce188820>
21:43:41.38 [DEBUG] starting service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7eecce188a60>
21:43:41.38 [INFO] Scheduler initialized.
21:43:41.38 [DEBUG] Launching 1 roots (poll=false).
21:43:41.38 [DEBUG] computed 1 nodes in 0.000405 seconds. there are 7 total nodes.
21:43:41.42 [DEBUG] specs are: Specs(includes=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(FileLiteralSpec(file='cloud/deployment/jwk_cacher/Dockerfile'),), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=True, from_change_detection=False), ignores=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=False, from_change_detection=False))
21:43:41.42 [DEBUG] changed_options are: ChangedOptions(since=None, diffspec=None, dependees=<DependeesOption.NONE: 'none'>)
21:43:41.42 [DEBUG] Launching 1 roots (poll=false).
21:43:41.42 [DEBUG] computed 1 nodes in 0.002089 seconds. there are 17 total nodes.
21:43:41.42 [DEBUG] requesting <class 'pants.backend.project_info.list_targets.List'> to satisfy execution of `list` goal
21:43:41.42 [DEBUG] Launching 1 roots (poll=false).
21:43:41.42 [DEBUG] Completed: Find targets from input specs
21:43:41.56 [DEBUG] Completed: Generate `python_requirement` targets from requirements.txt
21:43:41.72 [DEBUG] Completed: Find targets from input specs
21:43:41.72 [DEBUG] Completed: Find targets from input specs
cloud/deployment/jwk_cacher:jwk-cacher
21:43:41.72 [DEBUG] Completed: `list` goal
21:43:41.72 [DEBUG] computed 1 nodes in 0.298842 seconds. there are 818 total nodes.
list
goal for some target, once via bash and once via python subprocessbitter-ability-32190
09/26/2022, 7:55 PMwitty-crayon-22786
09/26/2022, 7:58 PMsuggests that a bootstrap /Copy code20:08:06.60 [INFO] Initialization options changed: reinitializing scheduler...
daemon=True
option (an even smaller set of options) has changed between runspants.toml
, the next thing to check would just be whether some env vars are changing between runs.-ldebug
and then another without will cause the scheduler to invalidate, because `--level`/`-l` are bootstrap optionsworried-painter-31382
09/26/2022, 8:03 PM./pants list requirements.txt -ldebug && python -c "import subprocess; subprocess.run(['/home/tobias/projects/profiler/pants', 'list', 'requirements.txt', '-ldebug'])"
22:02:16.94 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7fcc41e96cd0>
22:02:16.94 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7fcc41e96cd0>
22:02:16.94 [DEBUG] Connecting to pantsd on port 38351
22:02:16.95 [DEBUG] Connecting to pantsd on port 38351 attempt 1/3
22:02:16.95 [DEBUG] Connected to pantsd
22:02:16.96 [DEBUG] Launching 1 roots (poll=false).
22:02:16.96 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed.
22:02:16.97 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:16.97 [DEBUG] computed 1 nodes in 0.011350 seconds. there are 7 total nodes.
22:02:17.00 [DEBUG] Launching 1 roots (poll=false).
22:02:17.00 [DEBUG] computed 1 nodes in 0.000408 seconds. there are 7 total nodes.
22:02:17.03 [DEBUG] specs are: Specs(includes=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(FileLiteralSpec(file='requirements.txt'),), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=True, from_change_detection=False), ignores=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=False, from_change_detection=False))
22:02:17.03 [DEBUG] changed_options are: ChangedOptions(since=None, diffspec=None, dependees=<DependeesOption.NONE: 'none'>)
22:02:17.03 [DEBUG] Launching 1 roots (poll=false).
22:02:17.03 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed.
22:02:17.03 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:17.03 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:17.03 [DEBUG] computed 1 nodes in 0.002203 seconds. there are 747 total nodes.
22:02:17.03 [DEBUG] requesting <class 'pants.backend.project_info.list_targets.List'> to satisfy execution of `list` goal
22:02:17.03 [DEBUG] Launching 1 roots (poll=false).
22:02:17.03 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:17.03 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:17.03 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:17.04 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
//:requirements_file
//requirements.txt:requirements
22:02:17.04 [DEBUG] Completed: `list` goal
22:02:17.04 [DEBUG] computed 1 nodes in 0.007651 seconds. there are 749 total nodes.
22:02:17.95 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f8fb8e81070>
22:02:17.95 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f8fb8e81070>
22:02:17.95 [DEBUG] Connecting to pantsd on port 38351
22:02:17.95 [DEBUG] Connecting to pantsd on port 38351 attempt 1/3
22:02:17.95 [DEBUG] Connected to pantsd
22:02:17.96 [DEBUG] Launching 1 roots (poll=false).
22:02:17.96 [DEBUG] Dependency SessionValues of Some("@rule(pants.engine.internals.options_parsing.parse_options())") changed.
22:02:17.97 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.parse_options()) of Some("@rule(pants.engine.internals.options_parsing.scope_options())") changed.
22:02:17.97 [DEBUG] Dependency @rule(pants.engine.internals.options_parsing.scope_options()) of Some("@rule(construct_scope_())") changed.
22:02:17.97 [DEBUG] Dependency @rule(construct_scope_()) of Some("@rule(pants.init.plugin_resolver.resolve_plugins())") changed.
22:02:17.97 [DEBUG] computed 1 nodes in 0.011941 seconds. there are 7 total nodes.
22:02:18.00 [INFO] Initialization options changed: reinitializing scheduler...
22:02:18.00 [DEBUG] terminating pantsd service: <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7fadef40ea60>
22:02:18.13 [DEBUG] terminating pantsd service: <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7fadef097d60>
22:02:18.14 [DEBUG] File handle limit is: 10000
22:02:18.14 [DEBUG] Using [cache::CommandRunner { inner: bounded::CommandRunner { inner: nailgun::CommandRunner { inner: local::CommandRunner { .. }, .. }, .. }, .. }, cache::CommandRunner { inner: bounded::CommandRunner { inner: nailgun::CommandRunner { inner: local::CommandRunner { .. }, .. }, .. }, .. }] for process execution.
22:02:18.24 [DEBUG] Changes to /home/tobias/.cache/pants/setup/bootstrap-Linux-x86_64/pants.QA6V74/install/bin, outside of the buildroot, will not be invalidated.
22:02:18.24 [DEBUG] Changes to /home/tobias/.cache/pants/setup/bootstrap-Linux-x86_64/pants.QA6V74/install/bin, outside of the buildroot, will not be invalidated.
22:02:18.24 [DEBUG] Changes to /home/tobias/.pyenv/versions/3.9.13/lib/python39.zip, outside of the buildroot, will not be invalidated.
22:02:18.24 [DEBUG] Changes to /home/tobias/.pyenv/versions/3.9.13/lib/python3.9, outside of the buildroot, will not be invalidated.
22:02:18.24 [DEBUG] Changes to /home/tobias/.pyenv/versions/3.9.13/lib/python3.9/lib-dynload, outside of the buildroot, will not be invalidated.
22:02:18.24 [DEBUG] Changes to /home/tobias/.cache/pants/setup/bootstrap-Linux-x86_64/2.13.0_py39/lib/python3.9/site-packages, outside of the buildroot, will not be invalidated.
22:02:18.24 [DEBUG] setting up service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7f6ac0e80cd0>
22:02:18.24 [DEBUG] setting up service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7f6ac0e80f10>
22:02:18.24 [DEBUG] starting service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7f6ac0e80cd0>
22:02:18.24 [DEBUG] starting service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7f6ac0e80f10>
22:02:18.24 [INFO] Scheduler initialized.
22:02:18.24 [DEBUG] Launching 1 roots (poll=false).
22:02:18.24 [DEBUG] computed 1 nodes in 0.000525 seconds. there are 7 total nodes.
22:02:18.28 [DEBUG] specs are: Specs(includes=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(FileLiteralSpec(file='requirements.txt'),), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=True, from_change_detection=False), ignores=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=False, from_change_detection=False))
22:02:18.28 [DEBUG] changed_options are: ChangedOptions(since=None, diffspec=None, dependees=<DependeesOption.NONE: 'none'>)
22:02:18.28 [DEBUG] Launching 1 roots (poll=false).
22:02:18.28 [DEBUG] computed 1 nodes in 0.002242 seconds. there are 22 total nodes.
22:02:18.28 [DEBUG] requesting <class 'pants.backend.project_info.list_targets.List'> to satisfy execution of `list` goal
22:02:18.28 [DEBUG] Launching 1 roots (poll=false).
22:02:18.29 [DEBUG] Completed: Find targets from input specs
22:02:18.44 [DEBUG] Completed: Generate `python_requirement` targets from requirements.txt
22:02:18.53 [DEBUG] Completed: Find targets from input specs
22:02:18.53 [DEBUG] Completed: Find targets from input specs
//:requirements_file
//requirements.txt:requirements
22:02:18.53 [DEBUG] Completed: `list` goal
22:02:18.54 [DEBUG] computed 1 nodes in 0.251346 seconds. there are 743 total nodes.
witty-crayon-22786
09/26/2022, 8:04 PMworried-painter-31382
09/26/2022, 8:22 PMwitty-crayon-22786
09/26/2022, 8:22 PMworried-painter-31382
09/26/2022, 9:04 PMit should not cause 1Seems it doesn't, I've circumvented pyenv and it still happens
[GLOBAL]
pants_version = "2.13.0"
backend_packages = [
"pants.backend.python"
]
BUILD
```
src/main.py
```print("Hello world!")
src/BUILD
python_sources()
Just to sanity check, it still occurs that the daemon is restarted when running
./pants list src/main.py -ldebug && python -c "import subprocess; subprocess.run(['/home/tobias/projects/dummy/pants', 'list', 'src/main.py', '-ldebug'])"
witty-crayon-22786
09/26/2022, 9:15 PM./pants help-all
(tons of JSON), although note that there is apparently some non-determinism in there, which shouldn’t impact anything aside from making your diff noisyworried-painter-31382
09/26/2022, 9:25 PM{
"details": "from env var PANTS_BIN_NAME",
"rank": "ENVIRONMENT",
"value": "/home/tobias/projects/dummy/pants"
},
{
"details": "from env var PANTS_BIN_NAME",
"rank": "ENVIRONMENT",
"value": "./pants"
},
bitter-ability-32190
09/26/2022, 9:27 PMwitty-crayon-22786
09/26/2022, 9:28 PMworried-painter-31382
09/26/2022, 9:29 PMAh yeah that makes sense. It's the difference between invoking the wrapper script and invoking the code directly.
FWIW you can set that in pants.toml. see if that helpsThe script invocation seem to override it unfortunately
cwd
of the subprocess is repo root ./pants
should be ok, and we already estabillished cwd should be repo root anyway because of pantsd dirsbitter-ability-32190
09/26/2022, 9:47 PMworried-painter-31382
09/26/2022, 9:49 PMIf you unconditionally set it to "./pants" does that "work"?If you mean in
pants.toml
the awnser is nobitter-ability-32190
09/26/2022, 10:18 PMworried-painter-31382
09/27/2022, 1:41 PMhappy-kitchen-89482
09/27/2022, 2:01 PMbitter-ability-32190
09/27/2022, 2:02 PM