From 4a599a4016b3de52283cc1ee3826bd6d111b09d9 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Mon, 18 Aug 2025 17:53:11 +0200 Subject: [PATCH] fix(online buildpack): Update Go version used for online buildpack # Issue Using the Go buildpack with `GOTOOLCHAIN=local` as an online buildpack started to fail after https://github.com/cloudfoundry/go-buildpack/pull/516 as the `go.mod` requires a Go > 1.23 but the `install_go.sh` scripts still downloads Go 1.22. Without `GOTOOLCHAIN=local` it downloads Go 1.24 as required by the `go toolchain` line in `go.mod`: ``` 2025-08-18T17:45:00.33+0200 [STG/0] OUT -----> Download go 1.22.5 2025-08-18T17:45:03.60+0200 [STG/0] OUT -----> Running go build supply 2025-08-18T17:45:03.60+0200 [STG/0] OUT /tmp/buildpackdownloads/45909db73807128d ~ 2025-08-18T17:45:03.61+0200 [STG/0] ERR go: downloading go1.24.0 (linux/amd64) ``` With `GOTOOLCHAIN=local` it fails: ``` 2025-08-18T17:48:52.53+0200 [STG/0] OUT -----> Download go 1.22.5 2025-08-18T17:48:55.77+0200 [STG/0] OUT -----> Running go build supply 2025-08-18T17:48:55.77+0200 [STG/0] OUT /tmp/buildpackdownloads/45909db73807128d ~ 2025-08-18T17:48:55.77+0200 [STG/0] ERR go: go.mod requires go >= 1.23.0 (running go 1.22.5; GOTOOLCHAIN=local) 2025-08-18T17:48:55.77+0200 [STG/0] ERR Failed to compile droplet: Failed to run all supply scripts: exit status 1 ``` # Fix Bump Go version to the latest currently in `manifest.yml`. --- scripts/install_go.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_go.sh b/scripts/install_go.sh index a09027c3d..05d8b97b1 100755 --- a/scripts/install_go.sh +++ b/scripts/install_go.sh @@ -12,8 +12,8 @@ function main() { fi local version expected_sha dir - version="1.22.5" - expected_sha="ddb12ede43eef214c7d4376761bd5ba6297d5fa7a06d5635ea3e7a276b3db730" + version="1.24.6" + expected_sha="f39b242d56a2a0d1e0ca5f6294e1811dc9653354603078b128b7f347a33bca2c" dir="/tmp/go${version}" mkdir -p "${dir}"