I spent most of my waking hours over the last two days on this with tedious trial and error, waiting 15m for my builds to complete after each change I made, and I’ve finally fixed the problem and isolated what is causing it for me.
My app has been working fine for months after connecting my Github repository and getting Cloud Run setup so I never had to get into the guts of this stuff until now - I am building my app full time and my goal with using Cloud Run and it’s Cloud Build / Buildpack support is to avoid getting sucked into these kind of rabbit holes.
In suspecting a change on Google’s end breaking things, I figured out how to hard-code Google’s build tools to specific hashes for versions from using their “latest” version which is the default.
There were three tools I cycled through changing versions for after finding them on gcr.io’s browser interface – the buildpack ‘builder’, the cloud builder ‘docker’, and the cloudsdktool ‘cloud-sdk’.
The issue is with the builder – if leave it at it’s standard setting to pull “:latest”, my builds fail with the EOF error or the socket error I mentioned above every single time.
But if change it in my YAML from this:
gcr.io/buildpacks/builder:latest
To this (a version from January 21st):
gcr.io/buildpacks/builder@sha256:a1a4bcf6bed942e6771d151ddee17cc679403d31b678b3efab09aa2e7ad60acc
My app builds every time.
A next step in further isolating the problem would see me snagging specific buildpack commits from the Github repository and trying to reproduce the problem locally, but I can’t see how they correlate with the actual releases and I need to get back to coding on my app anyway. I’ll be crossing my fingers this issue goes away when I inevitably have to update my cloud build yaml to run a newer buildpack as this one ages out. This could all be as simple as a caching/edge network issue with the “latest” pack version and this problem never rears it’s head again.
If someone @Google finds this helpful lmk, got a demo to put together for your Google for Startups team soon and having another internal reference would be awesome 