From bd29e7921cc0fcc7ee0f378e8765fb26c0ee0d80 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Wed, 7 Feb 2024 13:01:25 -0500 Subject: [PATCH] misc: update to Go 1.22 for builds --- .drone/drone.yml | 116 ++++++++++++------------ .github/workflows/integration-tests.yml | 2 +- .github/workflows/test.yml | 4 +- CHANGELOG.md | 16 ++-- tools/make/build-container.mk | 2 +- 5 files changed, 71 insertions(+), 69 deletions(-) diff --git a/.drone/drone.yml b/.drone/drone.yml index b234441b6770..4a55da51c8e5 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -75,7 +75,7 @@ steps: - commands: - apt-get update -y && apt-get install -y libsystemd-dev - make lint - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Lint trigger: event: @@ -93,7 +93,7 @@ steps: - ERR_MSG="Dashboard definitions are out of date. Please run 'make generate-dashboards' and commit changes!" - if [ ! -z "$(git status --porcelain)" ]; then echo $ERR_MSG >&2; exit 1; fi - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Regenerate dashboards trigger: event: @@ -111,7 +111,7 @@ steps: - ERR_MSG="Custom Resource Definitions are out of date. Please run 'make generate-crds' and commit changes!" - if [ ! -z "$(git status --porcelain)" ]; then echo $ERR_MSG >&2; exit 1; fi - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Regenerate crds trigger: event: @@ -126,7 +126,7 @@ platform: steps: - commands: - make GO_TAGS="nodocker" test - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Run Go tests trigger: event: @@ -141,7 +141,7 @@ platform: steps: - commands: - K8S_USE_DOCKER_NETWORK=1 make test - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Run Go tests volumes: - name: docker @@ -164,7 +164,7 @@ platform: steps: - commands: - go test -tags="nodocker,nonetwork" ./... - image: grafana/agent-build-image:0.30.4-windows + image: grafana/agent-build-image:0.31.0-windows name: Run Go tests trigger: ref: @@ -179,7 +179,7 @@ platform: steps: - commands: - make agent-image - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build container volumes: - name: docker @@ -204,7 +204,7 @@ platform: steps: - commands: - make agentctl-image - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build container volumes: - name: docker @@ -229,7 +229,7 @@ platform: steps: - commands: - make operator-image - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build container volumes: - name: docker @@ -255,7 +255,7 @@ platform: steps: - commands: - '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agent' - image: grafana/agent-build-image:0.30.4-windows + image: grafana/agent-build-image:0.31.0-windows name: Build container volumes: - name: docker @@ -281,7 +281,7 @@ platform: steps: - commands: - '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agentctl' - image: grafana/agent-build-image:0.30.4-windows + image: grafana/agent-build-image:0.31.0-windows name: Build container volumes: - name: docker @@ -308,7 +308,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -325,7 +325,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -342,7 +342,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -359,7 +359,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -375,7 +375,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -391,7 +391,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -407,7 +407,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -423,7 +423,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -440,7 +440,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -457,7 +457,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -474,7 +474,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -491,7 +491,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -507,7 +507,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -523,7 +523,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -539,7 +539,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -555,7 +555,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -572,7 +572,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -589,7 +589,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -606,7 +606,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -623,7 +623,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -639,7 +639,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -655,7 +655,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -671,7 +671,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -687,7 +687,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -704,7 +704,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -721,7 +721,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -738,7 +738,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -755,7 +755,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -771,7 +771,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -787,7 +787,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -803,7 +803,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -819,7 +819,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -836,7 +836,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= GOEXPERIMENT=boringcrypto make agent-boringcrypto - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -853,7 +853,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= GOEXPERIMENT=boringcrypto make agent-boringcrypto - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Build trigger: event: @@ -869,7 +869,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Configure QEMU volumes: - name: docker @@ -889,7 +889,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Publish container volumes: - name: docker @@ -913,7 +913,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Configure QEMU volumes: - name: docker @@ -933,7 +933,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Publish container volumes: - name: docker @@ -957,7 +957,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Configure QEMU volumes: - name: docker @@ -977,7 +977,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Publish container volumes: - name: docker @@ -1001,7 +1001,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Configure QEMU volumes: - name: docker @@ -1021,7 +1021,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Publish container volumes: - name: docker @@ -1050,7 +1050,7 @@ steps: from_secret: docker_login DOCKER_PASSWORD: from_secret: docker_password - image: grafana/agent-build-image:0.30.4-windows + image: grafana/agent-build-image:0.31.0-windows name: Build containers volumes: - name: docker @@ -1079,7 +1079,7 @@ steps: from_secret: docker_login DOCKER_PASSWORD: from_secret: docker_password - image: grafana/agent-build-image:0.30.4-windows + image: grafana/agent-build-image:0.31.0-windows name: Build containers volumes: - name: docker @@ -1196,7 +1196,7 @@ steps: from_secret: gpg_private_key GPG_PUBLIC_KEY: from_secret: gpg_public_key - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Publish release volumes: - name: docker @@ -1221,7 +1221,7 @@ steps: - DOCKER_OPTS="" make dist/grafana-agentctl-linux-amd64 - DOCKER_OPTS="" make dist.temp/grafana-agent-flow-linux-amd64 - DOCKER_OPTS="" make test-packages - image: grafana/agent-build-image:0.30.4 + image: grafana/agent-build-image:0.31.0 name: Test Linux system packages volumes: - name: docker @@ -1317,6 +1317,6 @@ kind: secret name: updater_private_key --- kind: signature -hmac: b4b3bb3578124bba1758f323695216281365054c623738d38e51cc37125277ae +hmac: a77b4f7b2708cc4417edd42fae39c307abcaec2c4f0f6176212665133bd20d5d ... diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 4b9f7077ed57..823ce60c2194 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.21" + go-version: "1.22" - name: Set OTEL Exporter Endpoint run: echo "OTEL_EXPORTER_ENDPOINT=172.17.0.1:4318" >> $GITHUB_ENV - name: Run tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59d4fbe34540..8778ce4154e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" cache: true - name: Test run: make GO_TAGS="nodocker" test diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f969b21822e..1805a76bca0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,9 +22,9 @@ Main (unreleased) - A new `pyroscope.java` component for profiling Java processes using async-profiler. (@korniltsev) -- A new `otelcol.processor.resourcedetection` component which inserts resource attributes +- A new `otelcol.processor.resourcedetection` component which inserts resource attributes to OTLP telemetry based on the host on which Grafana Agent is running. (@ptodev) - + - Expose track_timestamps_staleness on Prometheus scraping, to fix the issue where container metrics live for 5 minutes after the container disappears. (@ptodev) ### Enhancements @@ -35,7 +35,7 @@ Main (unreleased) - Sort kubelet endpoint to reduce pressure on K8s's API server and watcher endpoints. (@hainenber) -- Expose `physical_disk` collector from `windows_exporter` v0.24.0 to +- Expose `physical_disk` collector from `windows_exporter` v0.24.0 to Flow configuration. (@hainenber) - Renamed Grafana Agent Mixin's "prometheus.remote_write" dashboard to @@ -47,8 +47,8 @@ Main (unreleased) - Increased clustering alert periods to 10 minutes to improve the signal-to-noise ratio in Grafana Agent Mixin. (@thampiotr) - -- `mimir.rules.kubernetes` has a new `prometheus_http_prefix` argument to configure + +- `mimir.rules.kubernetes` has a new `prometheus_http_prefix` argument to configure the HTTP endpoint on which to connect to Mimir's API. (@hainenber) - `service_name` label is inferred from discovery meta labels in `pyroscope.java` (@korniltsev) @@ -81,6 +81,8 @@ Main (unreleased) - Updated dependency to add support for Go 1.22 (@stefanb) +- Use Go 1.22 for builds. (@rfratto) + v0.39.2 (2024-1-31) -------------------- @@ -125,7 +127,7 @@ v0.39.0 (2024-01-09) - This change will not break any existing configurations and you can opt in to validation via the `validate_dimensions` configuration option. - Before this change, pulling metrics for azure resources with variable dimensions required one configuration per metric + dimension combination to avoid an error. - After this change, you can include all metrics and dimensions in a single configuration and the Azure APIs will only return dimensions which are valid for the various metrics. - + ### Features - A new `discovery.ovhcloud` component for discovering scrape targets on OVHcloud. (@ptodev) @@ -222,7 +224,7 @@ v0.39.0 (2024-01-09) - Attach unique Agent ID header to remote-write requests. (@captncraig) - Update to v2.48.1 of `github.com/prometheus/prometheus`. - Previously, a custom fork of v2.47.2 was used. + Previously, a custom fork of v2.47.2 was used. The custom fork of v2.47.2 also contained prometheus#12729 and prometheus#12677. v0.38.1 (2023-11-30) diff --git a/tools/make/build-container.mk b/tools/make/build-container.mk index 36ed221bb961..be1d4be9ca49 100644 --- a/tools/make/build-container.mk +++ b/tools/make/build-container.mk @@ -34,7 +34,7 @@ # variable names should be passed through to the container. USE_CONTAINER ?= 0 -BUILD_IMAGE_VERSION ?= 0.30.4 +BUILD_IMAGE_VERSION ?= 0.31.0 BUILD_IMAGE ?= grafana/agent-build-image:$(BUILD_IMAGE_VERSION) DOCKER_OPTS ?= -it