-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote-apis testing: pants is failing since 2.16 #20731
Comments
Thanks for flagging this. Is there a summary of how we can run the |
In order to run a test with pants locally you can I hope this helps! |
The logs of one of the test runs report that the RE server fails to find the Python3.9 executable in I see a similar error when testing locally with Nativelink as the underlying REAPI server. It looks like Pants submits an absolute path to the client's home directory to the remote execution server. The server is unable to find that path locally, because it runs on a different machine. The log below shows server output in my test. Pants is run as user michael, but there is no user michael in the executor container.
I assume something similar is happening in the remote-apis-testing repository, except that the mismatching contents of |
Ah okay, that's a handy smoking gun. Thank you! It looks like the process invocation is referencing the absolute path to the @thejcannon (as author) @stuhood (as reviewer): do you have any insight into how we might fix this remote execution issue? |
The |
Thanks for the pointer! The rule you mentioned clearly distinguishes between remote and local environments: pants/src/python/pants/core/util_rules/adhoc_binaries.py Lines 50 to 57 in a40f2fd
When pants/src/python/pants/core/util_rules/adhoc_binaries.py Lines 60 to 68 in a40f2fd
The Python binary download should emit a log message, but running pants with Here's a reproducer. Start an REAPI server in one terminal: git clone https://github.com/TraceMachina/nativelink.git
cd nativelink/deployment-examples/docker-compose
docker compose up -d --build
docker compose logs -f Start Pants in another terminal: cat << EOF >pants.toml
[GLOBAL]
pants_version = "2.20.0"
backend_packages = [
"pants.backend.python",
]
remote_execution = true
remote_store_address = "grpc://127.0.0.1:50051"
remote_execution_address = "grpc://127.0.0.1:50052"
remote_instance_name = "main"
process_execution_remote_parallelism = 1
[python]
interpreter_constraints = ["==3.11.*"]
EOF
cat << EOF >app.py
print("hello")
EOF
cat << EOF >BUILD
python_sources()
EOF
pants -ltrace --no-pantsd --no-local-cache run app.py |
Describe the bug
Since 2.16 (commit 27fc9ee7761e61f3c5c9b502d612df5f1f13e29b in https://github.com/pantsbuild/example-python), pants appears to be behave incorrectly when used for remote execution
See https://gitlab.com/remote-apis-testing/remote-apis-testing/-/merge_requests/362
Pants version
Issue is present from 2.16 to current one, 2.19 (commit f37c500e4f4e0c67e29aa9434b1b414f333bdd79 in https://github.com/pantsbuild/example-python)
OS
Linux
Additional info
We have upgraded to latest (2.19) in https://remote-apis-testing.gitlab.io/remote-apis-testing/ to show current status for now, please let us know if this is a known issue and we will upgrade as soon as a new tag is available
The text was updated successfully, but these errors were encountered: