I am having some issues with the docker backend. T...
# general
b
I am having some issues with the docker backend. The dockerfile_parser.pex is failing to build for me:
Copy code
ProcessExecutionFailure: Process 'Building dockerfile_parser.pex from <resource://pants.backend.docker.subsystems/dockerfile.lock>' failed with exit code 1.
further on:
Copy code
× python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [66 lines of output]
...
running build_ext
      $ GOPATH=/home/kevin.hughes/.cache/pants/named_caches/pex_root/pip_cache/.tmp/tmpksv0d6wu go get -d
      go: <http://github.com/moby/buildkit@v0.9.0|github.com/moby/buildkit@v0.9.0>: reading <http://github.com/moby/buildkit/go.mod|github.com/moby/buildkit/go.mod> at revision v0.9.0: git ls-remote -q origin in /home/kevin.hughes/.cache/pants/named_caches/pex_root/pip_cache/.tmp/tmpksv0d6wu/pkg/mod/cache/vcs/caea0070b26a07cb7b120d5c2f77be316b3b67041a0fcead46cb7780b641be9a: exit status 128:
...
fatal: Could not read from remote repository.
Has anyone encountered similar or have some ideas on where to point me? I am not really sure how to debug further
b
Some questions: do you use a proxy? Can you clone the git repository in question outside of pants? Does it still reproduce (in case it is GitHub flakiness)?
b
no proxy, still reproducible and I can clone outside
b
Hmm. Does jumping into the sandbox allow you to experiment and narrow down the problem? (https://www.pantsbuild.org/docs/troubleshooting) Also, does your ambient shell have environment vars that seem like they might be relevant? (In the output of `env`… no idea what they might be, though)
b
the sandbox wasn’t useful. running __run.sh just hung with no output for a while
I am working in a VM and I have my ssh agent forwarded from the host but I don’t think that should matter. The isolated sandbox shouldn’t and doesn’t use any of that
👍 1
b
Ah, it's unfortunate that
__run.sh
didn't seem to be reproducing the issue. One option would be editing the script to add more logging/verbosity and see if that surfaces the problem (but, if you can't reproduce the problem without making changes, who knows if that's going to be useful...) Another piece outside a sandbox might be setting https://www.pantsbuild.org/docs/reference-pex#verbosity (e.g.
pants --pex-verbosity=3 ...
) and seeing if that has any useful output. 🤷‍♂️
Oh, hm, it's talking about running a
setup.py
, can you work out what pypi package it is running it for? If so, does running
pip install --no-binary :all: ...
directly (preferably, with the same interpreter) work outside pants?
b
looks like
ERROR: Failed building wheel for dockerfile
which makes sense given the go get failure. Running
pip install dockerfile
directly doesn’t fail but is currently hanging or taking a very long time. Waiting for it now… It did ask for my yubikey pin for ssh so that could be the issue inside of pants. I’ll have to spend some more time to make sure it is using the same interpreter but for now it seems to be stuck the same as when I ran __run.sh manually.
okay outside of pants
pip install dockerfile
did end up working. I had to install wheel manually and then I think things were quicker as well. The issue is probably how ssh is being asked for / used in the process. I’ll keep digging there when I get back to this
👍 1
ah turns out this was all some bad config on my side. Couple of issues stacking up - first I had some old config I used to need that forced all GitHub remotes to use ssh even if they are listed as https. This combined with the pin on my ssh key caused things to break. The error wasn’t super useful and I didn’t really consider that pants would be using my gitconfig. All good now!
👍 1