Hey pants team. Our org has had some issues where ...
# general
f
Hey pants team. Our org has had some issues where tool downloads do not work correctly over a VPN/proxy. We've followed the instructions at https://www.pantsbuild.org/stable/docs/using-pants/restricted-internet-access and it is working correctly. (eg. We can lock/export a venv with python_requirements containing both 3rd party pypi packages and 3rd party packages stored on our org's artifactory instance. However downloading standalone binaries doesn't seem to work. I typically get around this by just disabling my VPN/proxy. Once I've downloaded a tool once, its cached, generally until I need to upgrade pants version. Other team members are not so lucky, and are not able to disable their VPN/proxy. They can still access the download that has failed (eg. by checking the logs or the pants sandbox), download the file, and then customize the url pants uses to look at the local filesystem. We would love to solve this so things just work smoothly. Any suggestions on how to go about debugging the tool download?
h
I assume you're referring to binaries managed by
ExternalTool
subclasses? Such as Terraform? https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/terraform/tool.py#L42
If it extends
TemplatedExternalTool
then you can set the
url_template
option in your pants.toml to point to alternative URLs
Which binaries specifically are you looking at?
b
f
@happy-kitchen-89482 the most recent one is
helm-unittest
though IIRC we had issues with
pip
or
pex
not too long ago. Seems its always a github URL, but maybe that's just coincidence. @brief-scientist-13682 Currently using pants 2.30 (and I believe the issue started to appear when upgrading from 2.28 to 2.30). I'll get someone on my time to try running with
--no-pantsd
and see if that helps.
Yeah. That solution works. Run with
--no-pantsd
anytime there is proxy trouble, and then the tools are cached so we can go back to normal again after that.
b
@freezing-wall-19707 the issue I pointed to is an infinity issue IIUC. Always existed with the pantsd daemon + rust engine download intrinsic (used for some tool downloads - as opposed to pip/pex installs of tools).
f
@happy-kitchen-89482 I submitted a PR to update the docs with some info about this workaround: https://github.com/pantsbuild/pants/pull/23110
b
@freezing-wall-19707 I commented on the PR, but who is the intended audience for these docs? AFAICT it can only be older Pants users that are reading the wrong docs. That's fine I guess - I imagine many people don't toggle the docs version to match theirs - but it seems like calling out the fact this workaround is only needed prior to Pants 2.31.0 would be sane-making.