From 8f07460ab32c6f7863038261652b87cfca224f1f Mon Sep 17 00:00:00 2001 From: Andrew Gillis <11790789+gammazero@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:46:20 -1000 Subject: [PATCH] Upgrade to go1.24 (#10726) * Upgrade to go1.24 * fix test to look for new version info string --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docker-build.yml | 2 +- .github/workflows/gateway-conformance.yml | 4 ++-- .github/workflows/gobuild.yml | 2 +- .github/workflows/golang-analysis.yml | 2 +- .github/workflows/golint.yml | 2 +- .github/workflows/gotest.yml | 2 +- .github/workflows/interop.yml | 2 +- .github/workflows/sharness.yml | 2 +- Dockerfile | 2 +- docs/examples/kubo-as-a-library/go.mod | 2 +- go.mod | 2 +- test/cli/basic_commands_test.go | 2 +- test/dependencies/go.mod | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8ed324854ff..4bc3665b692 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e13a3f88231..180f37963aa 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - uses: actions/checkout@v4 - run: docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG . - run: docker run --rm $IMAGE_NAME:$WIP_IMAGE_TAG --version diff --git a/.github/workflows/gateway-conformance.yml b/.github/workflows/gateway-conformance.yml index 8e254532244..96be54ec247 100644 --- a/.github/workflows/gateway-conformance.yml +++ b/.github/workflows/gateway-conformance.yml @@ -49,7 +49,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - uses: protocol/cache-go-action@v1 with: name: ${{ github.job }} @@ -136,7 +136,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - uses: protocol/cache-go-action@v1 with: name: ${{ github.job }} diff --git a/.github/workflows/gobuild.yml b/.github/workflows/gobuild.yml index 5aebfd9385f..32cefb4c138 100644 --- a/.github/workflows/gobuild.yml +++ b/.github/workflows/gobuild.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - uses: actions/checkout@v4 - run: make cmd/ipfs-try-build env: diff --git a/.github/workflows/golang-analysis.yml b/.github/workflows/golang-analysis.yml index 36a5bba01ba..aef63584598 100644 --- a/.github/workflows/golang-analysis.yml +++ b/.github/workflows/golang-analysis.yml @@ -27,7 +27,7 @@ jobs: submodules: recursive - uses: actions/setup-go@v5 with: - go-version: "1.23.x" + go-version: "1.24.x" - name: Check that go.mod is tidy uses: protocol/multiple-go-modules@v1.4 with: diff --git a/.github/workflows/golint.yml b/.github/workflows/golint.yml index 57b5d46ddd5..5f6e0bb20cc 100644 --- a/.github/workflows/golint.yml +++ b/.github/workflows/golint.yml @@ -31,6 +31,6 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - uses: actions/checkout@v4 - run: make -O test_go_lint diff --git a/.github/workflows/gotest.yml b/.github/workflows/gotest.yml index 5bff78c9d65..63718783a42 100644 --- a/.github/workflows/gotest.yml +++ b/.github/workflows/gotest.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - name: Check out Kubo uses: actions/checkout@v4 - name: Install missing tools diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index bfa6523de4e..e85e1f2fe36 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -10,7 +10,7 @@ on: - 'master' env: - GO_VERSION: 1.23.x + GO_VERSION: 1.24.x concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} diff --git a/.github/workflows/sharness.yml b/.github/workflows/sharness.yml index 6aaacf9a828..5aabf16b928 100644 --- a/.github/workflows/sharness.yml +++ b/.github/workflows/sharness.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - name: Checkout Kubo uses: actions/checkout@v4 with: diff --git a/Dockerfile b/Dockerfile index 53647bc23ab..1465e5d02d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23 AS builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.24 AS builder ARG TARGETOS TARGETARCH diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index c81a97ca570..b597f31a833 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/kubo/examples/kubo-as-a-library -go 1.23 +go 1.24 // Used to keep this in sync with the current version of kubo. You should remove // this if you copy this example. diff --git a/go.mod b/go.mod index 696f591527f..5f01b8e0103 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/kubo -go 1.23 +go 1.24 require ( bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc diff --git a/test/cli/basic_commands_test.go b/test/cli/basic_commands_test.go index a91340f9ae5..62733d00b6f 100644 --- a/test/cli/basic_commands_test.go +++ b/test/cli/basic_commands_test.go @@ -62,7 +62,7 @@ func TestIPFSVersionDeps(t *testing.T) { res = strings.TrimSpace(res) lines := SplitLines(res) - assert.Equal(t, "github.com/ipfs/kubo@(devel)", lines[0]) + assert.True(t, strings.HasPrefix(lines[0], "github.com/ipfs/kubo@v")) for _, depLine := range lines[1:] { split := strings.Split(depLine, " => ") diff --git a/test/dependencies/go.mod b/test/dependencies/go.mod index 8f0ae3a9536..313f557863a 100644 --- a/test/dependencies/go.mod +++ b/test/dependencies/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/kubo/test/dependencies -go 1.23 +go 1.24 replace github.com/ipfs/kubo => ../../