pantsbuild / scie-pants

Protects your Pants from the elements.
https://www.pantsbuild.org/docs/installation
Apache License 2.0
18 stars 17 forks source link

scie-pants unhelpful error on ambiguous Pants version tag #155

Open ImprintNav opened 1 year ago

ImprintNav commented 1 year ago

For example, setup pants.toml with version 2.16.0

$ pants
Failed to fetch https://binaries.pantsbuild.org/tags/pantsbuild.pants/release_2.16.0: [22] HTTP response code said error (The requested URL returned error: 404)
Install failed: list indices must be integers or slices, not str
More information can be found in the log at: /Users/navneethjayendran/Library/Caches/nce/142382d6e3ac0960e7d4f81b9df9de9559b7ac698db13d20cbd0e4aa57f68c1d/bindings/logs/configure.log

Error: Isolates your Pants from the elements.

Please select from the following boot commands:

<default>: Detects the current Pants installation and launches it.
bootstrap-tools: Introspection tools for the Pants bootstrap process.
pants: Runs a hermetic Pants installation.
pants-debug: Runs a hermetic Pants installation with a debug server for debugging Pants code.
update: Update scie-pants.

You can select a boot command by passing it as the 1st argument or else by setting the SCIE_BOOT environment variable.

ERROR: Failed to establish atomic directory /Users/navneethjayendran/Library/Caches/nce/142382d6e3ac0960e7d4f81b9df9de9559b7ac698db13d20cbd0e4aa57f68c1d/locks/configure-0cd3605ca31ca83f339db1732ae6d5e06250818e543746695e31695fcc251cad. Population of work directory failed: Boot binding command failed: exit status: 1

This seems to happen because the Github API, instead of 404'ing, will return a list of potential matches when the tag is a prefix of existing tags but doesn't exactly match any particular tag. It's a slightly confusing error that could be clarified.

sureshjoshi commented 1 month ago

I ran into something similar, but the updated version:

Inside a .devcontainer inside WSL2 (using the WSL filesystem, not mounted Windows one):

High level error for 2.21.0 (which exists) - writing some of this from memory because the terminal closed:

Wasn't able to fetch the Pants PEX at ....pants.2.21.0-cp39-linux_x86_64.pex

Check to see if the URL is reachable ....

Exception:

Command ...ptex-linux-x86_64 https://github.com/.../pants.2.21.0-cp39-linux_x86_64.pex returned non-zero exit status 1.

Error: Failed to establish atomic directory ... Population of work directory failed: Boot binding command failed: exit status 1.

So in this case, not sure if the issue was fundamentally caused by unpacking the pex file (which I could see happening on WSL inside of a dev container - that's layers on layers), or if it couldn't access Github.

Worked on my next attempt.