Huh, when pulling the master branch and running `....
# development
h
Huh, when pulling the master branch and running
./pants test src/python/pants/util/objects_test.py
, I get a no such file error for the script `./find_binary.sh`:
Copy code
14:04:34.94 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/bin/local_pants_runner.py", line 276, in run
    engine_result = self._run_v2(goals)
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/bin/local_pants_runner.py", line 190, in _run_v2
    return self._maybe_run_v2_body(goals, poll=False)
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/bin/local_pants_runner.py", line 212, in _maybe_run_v2_body
    poll_delay=(0.1 if poll else None),
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/init/engine_initializer.py", line 132, in run_goal_rules
    goal_product, params, poll=poll, poll_delay=poll_delay
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/engine/internals/scheduler.py", line 563, in run_goal_rule
    self._raise_on_error([t for _, t in throws])
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/engine/internals/scheduler.py", line 527, in _raise_on_error
    wrapped_exceptions=tuple(t.exc for t in throws),

Exception message: 1 Exception encountered:

Engine traceback:
  in select
  in pants.core.goals.test.run_tests
  in pants.core.goals.test.enrich_test_result (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.goals.pytest_runner.run_python_test (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
  in pants.engine.internals.graph.transitive_targets
  in pants.engine.internals.graph.resolve_targets (src/python/pants/util/objects_test.py:tests)
  in pants.engine.internals.graph.resolve_unexpanded_targets (src/python/pants/util/objects_test.py:tests)
  in pants.engine.internals.graph.resolve_dependencies (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.dependency_inference.rules.infer_python_dependencies_via_imports (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.dependency_inference.import_parser.parse_python_imports
  in pants.backend.python.util_rules.pex.find_interpreter (CPython<3.9,>=3.7)
  in pants.engine.process.fallible_to_exec_result_or_raise
  in pants.engine.process.remove_platform_information
  in pants.engine.process.upcast_process
  in pants.backend.python.util_rules.pex_cli.setup_pex_cli_process
  in pants.backend.python.util_rules.pex_environment.find_pex_python
  in pants.engine.process.find_binary
  in pants.engine.process.find_binary
  in pants.engine.process.fallible_to_exec_result_or_raise
  in pants.engine.process.remove_platform_information
  in multi_platform_process
Traceback (no traceback):
  <pants native internals>
Exception: Failed to execute: Process {
    argv: [
        "./find_binary.sh",
        "bash",
    ],
    env: {
        "PATH": "/usr/bin:/bin:/usr/local/bin",
    },
    working_directory: None,
    input_files: Digest(
        Fingerprint<124495cfdd1160d88a797da1b5de65f0b9d57642b553d7ff5195d5375411b492>,
        91,
    ),
    output_files: {},
    output_directories: {},
    timeout: None,
    execution_slot_variable: None,
    description: "Searching for `bash` on PATH=/usr/bin:/bin:/usr/local/bin",
    level: Debug,
    append_only_caches: {},
    jdk_home: None,
    platform_constraint: None,
    is_nailgunnable: false,
    cache_scope: PerRestart,
}

Error launching process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Traceback (most recent call last):
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/bin/local_pants_runner.py", line 276, in run
    engine_result = self._run_v2(goals)
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/bin/local_pants_runner.py", line 190, in _run_v2
    return self._maybe_run_v2_body(goals, poll=False)
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/bin/local_pants_runner.py", line 212, in _maybe_run_v2_body
    poll_delay=(0.1 if poll else None),
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/init/engine_initializer.py", line 132, in run_goal_rules
    goal_product, params, poll=poll, poll_delay=poll_delay
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/engine/internals/scheduler.py", line 563, in run_goal_rule
    self._raise_on_error([t for _, t in throws])
  File "/Users/eric/DocsLocal/code/projects/pants/src/python/pants/engine/internals/scheduler.py", line 527, in _raise_on_error
    wrapped_exceptions=tuple(t.exc for t in throws),
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:

Engine traceback:
  in select
  in pants.core.goals.test.run_tests
  in pants.core.goals.test.enrich_test_result (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.goals.pytest_runner.run_python_test (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
  in pants.engine.internals.graph.transitive_targets
  in pants.engine.internals.graph.resolve_targets (src/python/pants/util/objects_test.py:tests)
  in pants.engine.internals.graph.resolve_unexpanded_targets (src/python/pants/util/objects_test.py:tests)
  in pants.engine.internals.graph.resolve_dependencies (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.dependency_inference.rules.infer_python_dependencies_via_imports (src/python/pants/util/objects_test.py:tests)
  in pants.backend.python.dependency_inference.import_parser.parse_python_imports
  in pants.backend.python.util_rules.pex.find_interpreter (CPython<3.9,>=3.7)
  in pants.engine.process.fallible_to_exec_result_or_raise
  in pants.engine.process.remove_platform_information
  in pants.engine.process.upcast_process
  in pants.backend.python.util_rules.pex_cli.setup_pex_cli_process
  in pants.backend.python.util_rules.pex_environment.find_pex_python
  in pants.engine.process.find_binary
  in pants.engine.process.find_binary
  in pants.engine.process.fallible_to_exec_result_or_raise
  in pants.engine.process.remove_platform_information
  in multi_platform_process
Traceback (no traceback):
  <pants native internals>
Exception: Failed to execute: Process {
    argv: [
        "./find_binary.sh",
        "bash",
    ],
    env: {
        "PATH": "/usr/bin:/bin:/usr/local/bin",
    },
    working_directory: None,
    input_files: Digest(
        Fingerprint<124495cfdd1160d88a797da1b5de65f0b9d57642b553d7ff5195d5375411b492>,
        91,
    ),
    output_files: {},
    output_directories: {},
    timeout: None,
    execution_slot_variable: None,
    description: "Searching for `bash` on PATH=/usr/bin:/bin:/usr/local/bin",
    level: Debug,
    append_only_caches: {},
    jdk_home: None,
    platform_constraint: None,
    is_nailgunnable: false,
    cache_scope: PerRestart,
}

Error launching process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Interesting…this started failing for me on the Rust 1.49 upgrade
h
maybe something changed about the API contract?
./pants test src/python/pants/util/objects_test.py
works for me on latest master
h
@witty-crayon-22786 or @fast-nail-55400 could you please try on macOS?
f
👀
I’m trying that command. also, don’t we run that test on macOS though?
w
yea, i repro on OSX
f
what versions of macOS are you both running?
h
No, we only run a couple smoke screens like
./pants list ::
on macOS. We definitely should run
./pants test src/python/pants/util:
though, that’s a great and quick test to do
11.1
f
I believe they removed bash with 11.x, right?
h
Copy code
▶ where bash
/usr/local/bin/bash
/bin/bash
w
it’s not the default shell, but it’s still installed
and i’m on 10.15
f
I’m seeing it too.
I’m also on 10.15.x
w
did they… change the behavior of `fsync`…?
👀 1
--no-process-execution-cleanup-local-dirs
shows the file in the sandbox, but could be racey?
f
going to revert the change and see if the test passes
👍 1
h
so does this seem to be about a recent OS X upgrade changing what shells are on what paths, rather than the rust update?
w
no. 10.15 is old
h
No I think it’s the Rust update
going to revert the change and see if the test passes
CI won’t show you this. You’d need to add to `ci.py`’s
run_smoke_tests()
that it runs
test src/python/pants/util:
. That would be an excellent change to make
w
other potentially related aspect is that this codepath will be using https://github.com/pantsbuild/pants/pull/10577 since it creates the script
f
after reversion back to 1.48,
test_get_docstring_fallback_to_parents
fails for me
h
fails with what?
f
Copy code
E       AssertionError: assert equals failed
E         'The base class of the class hi  'The base class of the class hi
E         erarchy.\n\nWhen called, it acc  erarchy.\n\nWhen called, it acc
E         epts no arguments and returns a  epts no arguments and returns a
E          new featureless\ninstance that   new featureless\ninstance that
E          has no instance attributes and   has no instance attributes and
E          cannot be given any.'            cannot be given any.\n'
extra newline
h
Weird, it passes for me. Either way, that test will be deleted in 2.3
f
I did apply a security update to 10.15 over the weekend
w
https://github.com/pantsbuild/pants/pull/10577 actually removed the fsync here. seeing whether adding it back helps.
no impact from the fsync.
hm… potentially related from the release notes: https://github.com/rust-lang/rust/pull/66512 , although i’m not sure how? EDIT: it seems like the underlying changes in the PR would have impacted us well before the stabilization. so probably not. EDIT2: oh. no. very old.
we should revert in the meantime though.
f
yeah trying to run
./pants test src/python/pants/base::
fails on 1.49 and succeeds on 1.48
w
i’ll get it out.
f
I just pushed one
w
f
I assume someone will take care of increasing the number of tests running on macOS?
h
I can do that in a followup
e
I commented on ticket, but do you have /usr/bin/env Eric?
h
/usr/bin/env bash
w
Copy code
/private/var/folders/bg/_r10hqp14kjcpv68yzdk5svc0000gn/T/process-executionvrX4qr/find_binary.sh bash
works after the run with
--no-process-execution-cleanup-local-dirs
(will add to ticket)
h
and note that it works on 1.48 but not 1.49. My machine setup hasn’t changed at all, e.g. no changes made to my PATH.
f
25 minutes and counting
e
A reminder on the fsync mentioned above - that was always a red-herring from the day I introduced it way back. That only gets bits on a physical medium, it has 0 to do with visibility of writes that are comitted to the vfs layer / read from the vfs layer - on Linux at least.
👍 1
f
landed the reversion
👍 1