https://pantsbuild.org/ logo
#development
Title
# development
m

melodic-thailand-99227

10/14/2021, 5:28 AM
Hi Guys, running pants tailor on a repo with a socket file causes the following crash:
Copy code
bash-5.1$ ls
pants		pants.toml
bash-5.1$ python -c "import socket as s; sock = s.socket(s.AF_UNIX); sock.bind('test.sock')"
bash-5.1$ ./pants tailor
08:27:39.96 [INFO] Initializing scheduler...
08:27:40.32 [INFO] Scheduler initialized.
08:27:40.35 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
  File "/Users/yoav/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.4xKIPa/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 234, in _run_inner
    return self._perform_run(goals)
  File "/Users/yoav/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.4xKIPa/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 173, in _perform_run
    return self._perform_run_body(goals, poll=False)
  File "/Users/yoav/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.4xKIPa/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
    return self.graph_session.run_goal_rules(
  File "/Users/yoav/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.4xKIPa/install/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
    exit_code = self.scheduler_session.run_goal_rule(
  File "/Users/yoav/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.4xKIPa/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 533, in run_goal_rule
    self._raise_on_error([t for _, t in throws])
  File "/Users/yoav/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.4xKIPa/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 501, in _raise_on_error
    raise ExecutionError(

Exception message: 1 Exception encountered:

  Exception: Failed to scan directory "/private/tmp/zxcv/": Expected File, Dir or Link, but "test.sock" (relative to "/private/tmp/zxcv") was a FileType(FileType { mode: 49152 })



(Use --print-stacktrace for more error details and/or --no-process-execution-local-cleanup to inspect chroots and/or -ldebug for more logs. See <https://www.pantsbuild.org/v2.6/docs/troubleshooting> for common issues. Consider reaching out for help: <https://www.pantsbuild.org/v2.6/docs/getting-help.>)
h

happy-kitchen-89482

10/14/2021, 5:34 AM
Hmm, sorry for the inconvenience. Is this blocking you at the moment? Note that you can run tailor on specific subdirs with
./pants tailor path/to/dir
if that helps unblock.
h

hundreds-father-404

10/14/2021, 5:41 AM
Hi, you can also add to
pants_ignore
Copy code
[GLOBAL]
pants_ignore.add = ["test.sock"]
☝️ 1
m

melodic-thailand-99227

10/14/2021, 11:31 AM
I just deleted the socket file, but I thought it’s something we should fix 🙂
h

happy-kitchen-89482

10/15/2021, 5:39 AM
If it's not too much of a hassle, would you mind opening a ticket for this? https://github.com/pantsbuild/pants/issues/new/choose Thanks!
m

melodic-thailand-99227

10/17/2021, 9:25 AM
@hundreds-father-404 resurrecting this issue - adding to the
pants_ignore.add
doesn’t work
h

hundreds-father-404

12/16/2021, 5:23 PM
Interesting, I reproduce that too! Thanks for the report. Is this blocking you?
m

melodic-thailand-99227

12/17/2021, 6:46 AM
no, i managed with .gitignore