:wave: — how can i debug `ExternalTool` download d...
# general
👋 — how can i debug
download details? .. i’ve looked at the documentation and according to my own local tools i have entered the proper values for checksum + size, but … pants does not really like me: all i get is (with debug logging as well):
Copy code
14:51:39.58 [DEBUG] (workunit_store) Completed: Downloading: <https://github.com/google/go-jsonnet/releases/download/v0.19.1/go-jsonnet_0.19.1_Darwin_arm64.tar.gz> (2.87 MB)

14:51:39.58 [ERROR] (pants.bin.local_pants_runner) 1 Exception encountered:

  Exception: Error hashing/capturing URL fetch response: Downloaded file was larger than expected digest
output from running checks on my local system:
Copy code
❯ shasum -a 256 ~/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz
c7a98187b4b167e9e885dba52138ed802d4db4635b47b95af6a82448ff9d7ba1  /Users/dreuss/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz
Copy code
❯ wc -c /Users/dreuss/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz
 3004958 /Users/dreuss/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz
external tool known versions config:
Copy code
default_known_versions = [
✅ 1
Hi! Maybeee
says something but I don't think it does. How are you calculating the two values? It sounds like the num bytes is the issue, not the sha256
so, after looking at things again, i clearly have the size wrong, and it works after fixing that 🤦‍♂️
❤️ 1
i think i had an old copy lying around i was checking the size on, and that apparently changed at some point — pebcak on my end, but … it would be nice if debug logs could output the values that it calculated (checksum and size) so it would be easy to verify if you got things wrong 🙏
👍 1
glad it's working!
Well, on size we could only help you "half" the time. If the size you state is too small, we'll (hopefully!) only read up to that amount of bytes off the wire. It's only if the size you configured is too big that we could tell you the actual was smaller. The size configuration is a ~security measure in that sense. Sha256 alone is perfectly more than fine for verifying identity, it's just that you could feed it an infinite stream of bytes.