From 555ae5441eb6baf6ae4a2da0e249d43325f0eb89 Mon Sep 17 00:00:00 2001 From: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:59:17 -0700 Subject: [PATCH] Update Go to 1.24.5 (#30770) ## #30730 - Update Go version - Update the docs for this process - Confirmed `fleet`, `fleetctl`, and related docker images build successfully - Note that failing tests are unrelated: see [Slack thread](https://fleetdm.slack.com/archives/C019WG4GH0A/p1752175318523689) --------- Co-authored-by: Jacob Shandling --- Dockerfile-desktop-linux | 2 +- changes/update-go-1.24.5 | 1 + docs/Contributing/workflows/upgrading-go-version.md | 8 ++++++-- go.mod | 2 +- .../loadtesting/terraform/docker/loadtest.Dockerfile | 2 +- orbit/changes/update-go-1.24.5 | 1 + tools/mdm/migration/mdmproxy/Dockerfile | 2 +- tools/mdm/windows/bitlocker/go.mod | 2 +- tools/snapshot/go.mod | 2 +- tools/terraform/go.mod | 2 +- 10 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 changes/update-go-1.24.5 create mode 100644 orbit/changes/update-go-1.24.5 diff --git a/Dockerfile-desktop-linux b/Dockerfile-desktop-linux index 90583947f0..f6d6e2f902 100644 --- a/Dockerfile-desktop-linux +++ b/Dockerfile-desktop-linux @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 golang:1.24.4-bullseye@sha256:dfd72198d14bc22f270c9e000c304a2ffd19f5a5f693fad82643311afdc6b568 +FROM --platform=linux/amd64 golang:1.24.5-bullseye@sha256:254c0d1f13aad57bb210caa9e049deaee17ab7b8a976dba755cba1adf3fbe291 LABEL maintainer="Fleet Developers" RUN mkdir -p /usr/src/fleet diff --git a/changes/update-go-1.24.5 b/changes/update-go-1.24.5 new file mode 100644 index 0000000000..d742711f33 --- /dev/null +++ b/changes/update-go-1.24.5 @@ -0,0 +1 @@ +* Updated go to 1.24.5 diff --git a/docs/Contributing/workflows/upgrading-go-version.md b/docs/Contributing/workflows/upgrading-go-version.md index d5da911e28..0390c06b45 100644 --- a/docs/Contributing/workflows/upgrading-go-version.md +++ b/docs/Contributing/workflows/upgrading-go-version.md @@ -14,7 +14,11 @@ See the "Go linter" section below about upgrading the Go linter version. ## Upgrading go for all Fleet -Run `make update-go version={target_version}` (for example, `make update-go version=1.24.5`) and update the SHA256 of the updated Dockerfiles manually. +1. Run `make update-go version={target_version}` (for example, `make update-go version=1.24.5`) +2. Manually update the index digest sha256 of the updated Dockerfiles with the updated value of the + relevant OS/Arch of the official Docker image from + https://hub.docker.com/_/golang/tags?name= (e.g., + `https://hub.docker.com/_/golang/tags?name=1.24.5-bullseye` when upgrading to 1.24.5) ### Go Linter @@ -27,7 +31,7 @@ Update the instructions in the [Testing and local development doc](https://githu 1. Build `fleet` and `fleetctl` using `make build`. 2. Verify that `fleet serve` runs, the site is accessible, and basic API/db functionality works (try creating a new team, query and policy) 3. Verify that `fleetctl` works by using `fleetctl get config` -4. Run `make go-lint` locally to find and fix any new issues. +4. Run `make lint-go` locally to find and fix any new issues. 5. Create a draft pull request from your branch and verify that tests pass. ## Updating this guide diff --git a/go.mod b/go.mod index f16efc9d05..2e8fcd3d76 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/fleetdm/fleet/v4 -go 1.24.4 +go 1.24.5 require ( cloud.google.com/go/pubsub v1.45.1 diff --git a/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile b/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile index a0f4160124..25f07baf54 100644 --- a/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile +++ b/infrastructure/loadtesting/terraform/docker/loadtest.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24.4-alpine3.21@sha256:56a23791af0f77c87b049230ead03bd8c3ad41683415ea4595e84ce7eada121a +FROM golang:1.24.5-alpine3.21@sha256:933e5a0829a1f97cc99917e3b799ebe450af30236f5a023a3583d26b5ef9166f ARG TAG RUN apk add git RUN git clone -b $TAG --depth=1 --no-tags --progress --no-recurse-submodules https://github.com/fleetdm/fleet.git && cd /go/fleet/cmd/osquery-perf/ && go build . diff --git a/orbit/changes/update-go-1.24.5 b/orbit/changes/update-go-1.24.5 new file mode 100644 index 0000000000..d742711f33 --- /dev/null +++ b/orbit/changes/update-go-1.24.5 @@ -0,0 +1 @@ +* Updated go to 1.24.5 diff --git a/tools/mdm/migration/mdmproxy/Dockerfile b/tools/mdm/migration/mdmproxy/Dockerfile index fb3858e6b1..0c006594fa 100644 --- a/tools/mdm/migration/mdmproxy/Dockerfile +++ b/tools/mdm/migration/mdmproxy/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24.4-alpine3.21@sha256:56a23791af0f77c87b049230ead03bd8c3ad41683415ea4595e84ce7eada121a +FROM golang:1.24.5-alpine3.21@sha256:933e5a0829a1f97cc99917e3b799ebe450af30236f5a023a3583d26b5ef9166f ARG TAG RUN apk update && apk add --no-cache git RUN git clone -b $TAG --depth=1 --no-tags --progress --no-recurse-submodules https://github.com/fleetdm/fleet.git && cd /go/fleet/tools/mdm/migration/mdmproxy && go build . diff --git a/tools/mdm/windows/bitlocker/go.mod b/tools/mdm/windows/bitlocker/go.mod index 852ff92b34..b5cb4857e5 100755 --- a/tools/mdm/windows/bitlocker/go.mod +++ b/tools/mdm/windows/bitlocker/go.mod @@ -1,6 +1,6 @@ module bitlocker -go 1.24.4 +go 1.24.5 require github.com/go-ole/go-ole v1.3.0 diff --git a/tools/snapshot/go.mod b/tools/snapshot/go.mod index a6232972d2..691a5fb1a7 100644 --- a/tools/snapshot/go.mod +++ b/tools/snapshot/go.mod @@ -1,6 +1,6 @@ module github.com/fleetdm/fleet/v4/tools/snapshot -go 1.24.4 +go 1.24.5 require ( github.com/manifoldco/promptui v0.9.0 diff --git a/tools/terraform/go.mod b/tools/terraform/go.mod index 60d56e87dd..c342754d0e 100644 --- a/tools/terraform/go.mod +++ b/tools/terraform/go.mod @@ -1,6 +1,6 @@ module terraform-provider-fleetdm -go 1.24.4 +go 1.24.5 require ( github.com/hashicorp/terraform-plugin-framework v1.7.0