diff --git a/.drone/drone.yml b/.drone/drone.yml index 086ed83ac2..cd95e4c248 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -10,7 +10,7 @@ steps: - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - docker buildx create --name multiarch --driver docker-container --use - - docker buildx build --build-arg="GO_RUNTIME=golang:1.22.5-bullseye" --push --platform + - docker buildx build --build-arg="GO_RUNTIME=golang:1.23.1-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image environment: DOCKER_LOGIN: @@ -44,7 +44,7 @@ steps: - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - docker buildx create --name multiarch --driver docker-container --use - - docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye" + - docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image environment: @@ -835,6 +835,6 @@ kind: secret name: updater_private_key --- kind: signature -hmac: ee269482e125ef982b0dffcf21ded182eb20960f97adf0513610fac49a1ab775 +hmac: d897b4d4c0e2b92087e4eab9ca27b1dbbe2f475172109656ad2d842cb4a5b945 ... diff --git a/.drone/pipelines/build_images.jsonnet b/.drone/pipelines/build_images.jsonnet index b090cdc9e9..d1ca1abee9 100644 --- a/.drone/pipelines/build_images.jsonnet +++ b/.drone/pipelines/build_images.jsonnet @@ -32,7 +32,7 @@ local locals = { 'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD', 'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes', 'docker buildx create --name multiarch --driver docker-container --use', - 'docker buildx build --build-arg="GO_RUNTIME=golang:1.22.5-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image', + 'docker buildx build --build-arg="GO_RUNTIME=golang:1.23.1-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image', ], }], volumes: [{ @@ -55,7 +55,7 @@ local locals = { 'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD', 'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes', 'docker buildx create --name multiarch --driver docker-container --use', - 'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image', + 'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image', ], }], volumes: [{ diff --git a/.github/workflows/check-linux-build-image.yml b/.github/workflows/check-linux-build-image.yml index 32bd3918ac..1f9649dd26 100644 --- a/.github/workflows/check-linux-build-image.yml +++ b/.github/workflows/check-linux-build-image.yml @@ -25,7 +25,7 @@ jobs: push: false tags: grafana/alloy-build-image:latest build-args: | - GO_RUNTIME=golang:1.22.5-bullseye + GO_RUNTIME=golang:1.23.1-bullseye - name: Create test Linux build image for boring crypto uses: docker/build-push-action@v6 @@ -34,4 +34,4 @@ jobs: push: false tags: grafana/alloy-build-image:latest build-args: | - GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye + GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-bullseye diff --git a/.github/workflows/fuzz-go.yml b/.github/workflows/fuzz-go.yml index 5b82d92c52..0bf241e719 100644 --- a/.github/workflows/fuzz-go.yml +++ b/.github/workflows/fuzz-go.yml @@ -67,10 +67,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Go 1.22 + - name: Set up Go 1.23 uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" cache: false - name: Find cache location diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 823ce60c21..9610db275a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" - name: Set OTEL Exporter Endpoint run: echo "OTEL_EXPORTER_ENDPOINT=172.17.0.1:4318" >> $GITHUB_ENV - name: Run tests diff --git a/CHANGELOG.md b/CHANGELOG.md index 69976fdf9c..931c7c978f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,8 @@ Main (unreleased) - Aliases for the namespaces are deprecated in the Cloudwatch exporter. For example: "s3" is not allowed, "AWS/S3" should be used. Usage of the aliases will generate warnings in the logs. Support for the aliases will be dropped in the upcoming releases. (@kgeckhart, @andriikushch) +- Upgrade Go version to 1.23.1 @wildum + v1.3.1 ----------------- diff --git a/Dockerfile.windows b/Dockerfile.windows index cdb1a5d6cb..101470a5d9 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -15,7 +15,7 @@ RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERS RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS=\"builtinassets ${GO_TAGS}\" make alloy"" # In this case, we're separating the clean command from make alloy to avoid an issue where access to some mod cache # files is denied immediately after make alloy, for example: -# "go: remove C:\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.22.3.windows-amd64\bin\go.exe: Access is denied." +# "go: remove C:\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.23.1.windows-amd64\bin\go.exe: Access is denied." RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache"" # Use the smallest container possible for the final image diff --git a/docs/Makefile b/docs/Makefile index 2ea60a40c8..13f179b1d4 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,7 +11,7 @@ include docs.mk docs: check-cloudwatch-integration check-cloudwatch-integration: - $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/reference/components/prometheus/prometheus.exporter.cloudwatch.md + $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.23.1-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/reference/components/prometheus/prometheus.exporter.cloudwatch.md generate-cloudwatch-integration: - $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.5-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go generate + $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.23.1-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go generate diff --git a/example/images/grizzly/Dockerfile b/example/images/grizzly/Dockerfile index 25be31db0b..6c7c4cec5c 100644 --- a/example/images/grizzly/Dockerfile +++ b/example/images/grizzly/Dockerfile @@ -1,3 +1,3 @@ -FROM golang:1.22-alpine +FROM golang:1.23-alpine RUN go install github.com/grafana/grizzly/cmd/grr@v0.4.3 diff --git a/example/images/jb/Dockerfile b/example/images/jb/Dockerfile index 786324a42e..751eb153c2 100644 --- a/example/images/jb/Dockerfile +++ b/example/images/jb/Dockerfile @@ -1,3 +1,3 @@ -FROM golang:1.22-alpine +FROM golang:1.23-alpine RUN go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.5.1 diff --git a/go.mod b/go.mod index 80ab5e8e89..fa3b9ad56c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/grafana/alloy -go 1.22.5 +go 1.23.1 require ( cloud.google.com/go/pubsub v1.38.0 diff --git a/go.sum b/go.sum index cb82ba4be4..e8a7451a05 100644 --- a/go.sum +++ b/go.sum @@ -2116,8 +2116,6 @@ github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTz github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= github.com/prometheus-community/stackdriver_exporter v0.15.1 h1:+k26zeBy8BlG+eDKPtYA7IKXrQCI7ISLfktjIUu7wBQ= github.com/prometheus-community/stackdriver_exporter v0.15.1/go.mod h1:UmmIgnrVQqDAeM8pSeYntBcUxPhp8oqb8W3nvRYzsSg= -github.com/prometheus-community/windows_exporter v0.26.2-0.20240731160221-8f2a45d83276 h1:hyWyr4JekYnFneEiqamv6CXQBA2ymSnS+VZgiWla++s= -github.com/prometheus-community/windows_exporter v0.26.2-0.20240731160221-8f2a45d83276/go.mod h1:5r9EMDZEMh+6a7fuTOoO/aik6R33NdSj5y19TFcfvDU= github.com/prometheus-community/windows_exporter v0.27.2 h1:/tdRTouPMVsC4qt8+s9NOPEm7L/9qdDxmasiETlx+Wk= github.com/prometheus-community/windows_exporter v0.27.2/go.mod h1:8+T6hfv71nvgVIzguouXkIGoa15ni+uXHHULBOA2bZo= github.com/prometheus-operator/prometheus-operator v0.66.0 h1:Jj4mbGAkfBbTih6ait03f2vUjEHB7Kb4gnlAmWu7AJ0= @@ -3025,8 +3023,6 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= diff --git a/internal/cmd/integration-tests/configs/kafka/Dockerfile b/internal/cmd/integration-tests/configs/kafka/Dockerfile index 5c0205fcbe..0084fd6b0c 100644 --- a/internal/cmd/integration-tests/configs/kafka/Dockerfile +++ b/internal/cmd/integration-tests/configs/kafka/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.5 as build +FROM golang:1.23.1 as build WORKDIR /app/ COPY go.mod go.sum ./ COPY syntax/go.mod syntax/go.sum ./syntax/ diff --git a/internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile b/internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile index 0d402bc156..9d2dc724ad 100644 --- a/internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile +++ b/internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.5 as build +FROM golang:1.23.1 as build WORKDIR /app/ COPY go.mod go.sum ./ COPY syntax/go.mod syntax/go.sum ./syntax/ diff --git a/internal/cmd/integration-tests/configs/prom-gen/Dockerfile b/internal/cmd/integration-tests/configs/prom-gen/Dockerfile index 3d66ab97ae..41854a8dea 100644 --- a/internal/cmd/integration-tests/configs/prom-gen/Dockerfile +++ b/internal/cmd/integration-tests/configs/prom-gen/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.5 as build +FROM golang:1.23.1 as build WORKDIR /app/ COPY go.mod go.sum ./ COPY syntax/go.mod syntax/go.sum ./syntax/ diff --git a/tools/build-image/Dockerfile b/tools/build-image/Dockerfile index 7c95dbcca7..e44abc1333 100644 --- a/tools/build-image/Dockerfile +++ b/tools/build-image/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -# NOTE: The GO_RUNTIME is used to switch between the default Google go runtime and mcr.microsoft.com/oss/go/microsoft/golang:1.22.5-bullseye which is a Microsoft +# NOTE: The GO_RUNTIME is used to switch between the default Google go runtime and mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-bullseye which is a Microsoft # 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 ARG GO_RUNTIME=mustoverride diff --git a/tools/build-image/windows/Dockerfile b/tools/build-image/windows/Dockerfile index 547eede77d..b352145bea 100644 --- a/tools/build-image/windows/Dockerfile +++ b/tools/build-image/windows/Dockerfile @@ -1,4 +1,4 @@ -FROM library/golang:1.22.5-windowsservercore-1809 +FROM library/golang:1.23.1-windowsservercore-1809 SHELL ["powershell", "-command"]