Skip to content

Commit 44b9ae8

Browse files
authored
update go version (#7236)
* update go version * update go to 1.24.10 * switching from bullseye to bookworm
1 parent ad52430 commit 44b9ae8

File tree

13 files changed

+24
-29
lines changed

13 files changed

+24
-29
lines changed

.github/workflows/check-linux-build-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
tags: grafana/agent-build-image:latest
3030
platforms: 'linux/amd64,linux/arm64'
3131
build-args: |
32-
GO_RUNTIME=golang:1.24.6-bullseye
32+
GO_RUNTIME=golang:1.24.10-bookworm
3333
3434
- name: Check Linux boringcrypto build image
3535
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6
@@ -39,4 +39,4 @@ jobs:
3939
tags: grafana/agent-build-image:latest
4040
platforms: 'linux/amd64,linux/arm64'
4141
build-args: |
42-
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.24.6-bullseye
42+
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.24.10-bookworm

.github/workflows/update-build-images.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
strategy:
2121
matrix:
2222
build:
23-
- runtime: golang:1.24.6-bullseye
24-
- runtime: mcr.microsoft.com/oss/go/microsoft/golang:1.24.6-bullseye
23+
- runtime: golang:1.24.10-bookworm
24+
- runtime: mcr.microsoft.com/oss/go/microsoft/golang:1.24.10-bookworm
2525
suffix: "-boringcrypto"
2626
steps:
2727
- name: Checkout code 🛎️

build-image/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
55
# in environment variables.
66

7-
# NOTE: The GO_RUNTIME is used to switch between the default Google go runtime and mcr.microsoft.com/oss/go/microsoft/golang:1.24.6-bullseye which is a Microsoft
7+
# NOTE: The GO_RUNTIME is used to switch between the default Google go runtime and mcr.microsoft.com/oss/go/microsoft/golang:1.24.10-bookworm which is a Microsoft
88
# fork of go that allows using windows crypto instead of boring crypto. Details at https://github.com/microsoft/go/tree/microsoft/main/eng/doc/fips
99
ARG GO_RUNTIME=mustoverride
1010

@@ -59,12 +59,12 @@ RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@$CONTROLLER_GEN_V
5959
# dependencies.
6060
FROM rfratto/viceroy:v0.4.0
6161

62-
# Fix apt sources - restrict main bullseye to supported architectures
62+
# Fix apt sources - restrict main bookworm to supported architectures
6363
RUN rm -f /etc/apt/sources.list \
6464
&& rm -rf /etc/apt/sources.list.d/* \
65-
&& echo "deb [arch=amd64,arm64,armhf,i386] https://ftp.debian.org/debian bullseye main" > /etc/apt/sources.list \
66-
&& echo "deb https://ftp.debian.org/debian bullseye-updates main" >> /etc/apt/sources.list \
67-
&& echo "deb https://security.debian.org/debian-security bullseye-security main" >> /etc/apt/sources.list
65+
&& echo "deb [arch=amd64,arm64,armhf,i386] https://ftp.debian.org/debian bookworm main" > /etc/apt/sources.list \
66+
&& echo "deb https://ftp.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list \
67+
&& echo "deb https://security.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list
6868

6969
# Install other dependencies.
7070
#

build-image/windows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM library/golang:1.24.6-windowsservercore-ltsc2022
1+
FROM library/golang:1.24.10-windowsservercore-ltsc2022
22

33
SHELL ["powershell", "-command"]
44

cmd/grafana-agent/Dockerfile.windows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERS
1414
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS='builtinassets' make agent""
1515
# In this case, we're separating the clean command from make agent to avoid an issue where access to some mod cache
1616
# files is denied immediately after make agent, for example:
17-
# "go: remove C:\go\pkg\mod\golang.org\[email protected].6.windows-amd64\bin\go.exe: Access is denied."
17+
# "go: remove C:\go\pkg\mod\golang.org\[email protected].10.windows-amd64\bin\go.exe: Access is denied."
1818
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache""
1919

2020
# Use the smallest container possible for the final image

cmd/grafana-agentctl/Dockerfile.windows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SHELL ["cmd", "/S", "/C"]
1010
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make agentctl""
1111
# We're separating the clean command from make agent to avoid an issue where access to some mod cache
1212
# files is denied immediately after make agentctl, for example:
13-
# "go: remove C:\go\pkg\mod\golang.org\[email protected].6.windows-amd64\bin\go.exe: Access is denied."
13+
# "go: remove C:\go\pkg\mod\golang.org\[email protected].10.windows-amd64\bin\go.exe: Access is denied."
1414
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache""
1515

1616
# Use the smallest container possible for the final image

docs/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ include docs.mk
1111
docs: check-cloudwatch-integration
1212

1313
check-cloudwatch-integration:
14-
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.24.6-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md
15-
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.24.6-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md
14+
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.24.10-bookworm go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md
15+
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.24.10-bookworm go run static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md
1616

1717
generate-cloudwatch-integration:
18-
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.24.6-bullseye go run static/integrations/cloudwatch_exporter/docs/doc.go generate
18+
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.24.10-bookworm go run static/integrations/cloudwatch_exporter/docs/doc.go generate
1919

2020
sources/assets/hierarchy.svg: sources/operator/hierarchy.dot
2121
cat $< | $(PODMAN) run --rm -i nshine/dot dot -Tsvg > $@

docs/developer/updating-go.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ You will need to submit two pull requests:
99
At this point you can just search and replace all instances of the old version with the new one.
1010
For example, "1.22.1" would be replaced with "1.22.5".
1111

12-
The Go image which is used may sometimes have a name, like "bullseye".
12+
The Go image which is used may sometimes have a name, like "bookworm".
1313
The origins of the name are explained in more detail in [Go's DockerHub repository][go-dockerhub]:
1414

15-
> Some of these tags may have names like bookworm or bullseye in them.
16-
> These are the suite code names for releases of Debian⁠ and indicate which release the image is based on.
17-
> If your image needs to install any additional packages beyond what comes with the image,
15+
> Some of these tags may have names like bookworm or bullseye in them.
16+
> These are the suite code names for releases of Debian⁠ and indicate which release the image is based on.
17+
> If your image needs to install any additional packages beyond what comes with the image,
1818
> you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Debian.
1919
2020
[build-image-instructions]:../../build-image/README.md
2121
[go-dockerhub]:https://hub.docker.com/_/golang
22-
[example-pr]:https://github.com/grafana/agent/pull/6646/files
22+
[example-pr]:https://github.com/grafana/agent/pull/6646/files

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/grafana/agent
22

3-
go 1.24.6
3+
go 1.24.10
44

55
retract (
66
v1.3.191 // Published accidentally

go.sum

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,6 @@ github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUri
784784
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
785785
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
786786
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
787-
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
788-
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
789787
github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8=
790788
github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
791789
github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
@@ -803,8 +801,6 @@ github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr6
803801
github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
804802
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
805803
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
806-
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c=
807-
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
808804
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
809805
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
810806
github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=
@@ -2618,7 +2614,6 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1
26182614
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
26192615
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
26202616
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
2621-
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
26222617
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
26232618
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
26242619
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=

0 commit comments

Comments
 (0)