pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.19k stars 615 forks source link

Pants native client title #19863

Open kaos opened 9 months ago

kaos commented 9 months ago

When running pants using the native client, the process title is presented as "native_client".

It would be preferable if it presented itself as "pants".

image
stuhood commented 9 months ago

Unfortunately, scie-pants expects to find the native_client binary in a particular location, so changing the location of this binary in the pants repo isn't sufficient: https://github.com/pantsbuild/scie-pants/blob/4d1ac4d6a007b6a79d94722b6a587aefdd6ea1eb/tools/src/scie_pants/install_pants.py#L216-L219

One backwards compatible option would be to change the scie-pants install_pants.py helper to copy/rename the file.

kaos commented 9 months ago

I guess one option could be to use something like https://pypi.org/project/setproctitle/ as well, albeit perhaps less robust (but could be extended to include the name of a lone long running task..) or equiv. crate for rust if there is one.

huonw commented 9 months ago

Unfortunately, scie-pants expects to find the native_client binary in a particular location, so changing the location of this binary in the pants repo isn't sufficient:

If we did decide to rename the binary, there's a path forward:

  1. implement support for finding the client at .../native_client OR some new path .../pants (or whatever) in scie-pants
  2. bump the minimum scie version in Pants, which emits an error telling people they need to upgrade (although we could probably also do this one as a warning? since it'll fallback to the Python client?): https://github.com/pantsbuild/pants/blob/b0cf5c99c5aa1af39a729d9f2eccbcf4152bcb5c/src/python/pants/bin/pants_runner.py#L26-L27
  3. rename the client to match 1, once that minimum scie version takes effect appropriately
HeetVekariya commented 9 months ago

If the path issue is resolved and this issue still exists then i can work on this. I think i just need to rename the "native_client" to "pants", right ?