Skip to content

pantsd not retaining / forwarding http_proxy env vars #22932

@alextremblay

Description

@alextremblay

Describe the bug
Just started using pants yesterday and ran across this error while trying to generate lockfiles:

$ pants generate-lockfiles 
16:20:51.53 [INFO] Initializing scheduler...
16:20:53.64 [INFO] Scheduler initialized.
...
16:29:37.97 [ERROR] 1 Exception encountered:

Engine traceback:
  in `generate-lockfiles` goal

IntrinsicError: Error downloading file: error sending request for url (https://github.com/astral-sh/python-build-standalone/releases/download/20250610/cpython-3.10.18%2B20250610-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz)

Pants version
tested with pants 2.27 and 2.29

OS
Linux

Additional info
my pants.toml file:

[GLOBAL]
pants_version = "2.29.0"
backend_packages = [
    "pants.backend.python",
    "pants.backend.experimental.python.lint.ruff.check",
    "pants.backend.experimental.python.lint.ruff.format",
    "pants.backend.experimental.python.typecheck.pyright",
    "pants.backend.python.providers.experimental.python_build_standalone",
]

[python]
interpreter_constraints = ["CPython>=3.10,<3.11"]
enable_resolves = true

[subprocess-environment]
# pull in proxy settings from environment and pass them through to all subprocesses
env_vars = [
    "http_proxy",
    "https_proxy",
    "no_proxy",
    "HTTP_PROXY",
    "HTTPS_PROXY",
    "NO_PROXY",
]

I suspect #22725 is related. The creator of that issue is getting the same error and also mentions using a proxy. If so, then that person is misattributing their issue to a change in OS or pants version

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions