Open eli-darkly opened 2 years ago
Hello @eli-darkly . Thank you for reporting this issue and sorry for the late response.
It is common to have incompatibilities while upgrading Go versions.
Given that in this scenario you were already using a cache, once you decide to update the Go version, we recommend to update the go/install
call, specifically the cache-key
parameter to create a whole new caching storage with the new Go version. This way you will make sure that there will not be traces of the previous version in your Filesystem.
I have a CI job that runs on a machine executor and installs Go with the
go/install
command from the Go orb.I was previously using Go 1.16.10 and everything was working fine. Then I changed the Go version to 1.17.6, and even though the Go install step still seemed to work, as soon as I tried to build some Go code I got errors like this:
Online advice like this generally agreed that this meant a corrupt Go installation, possibly due to not removing a previous installation. So, I tried setting the
cache-key
parameter to bust the cache so there couldn't be any previous installation. That fixed the build... at least, until the next time I ran it, at which point it failed again.It looks to me like this failure is correlated with whether the Go orb is reusing a cached version of
/usr/local/go/bin/go
or not. I don't see how it could be caching an invalid executable, because in the previous test run that succeeded, it was using that very same executable. But, so far, this is very reproducible and I can't get the build to stay green except by settingcache: false
.