From c87cd364479ab9bb5ed89ce3e13a0d05e8be4565 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:49:26 +0100 Subject: [PATCH 1/6] feat: bump go to 1.24.0 --- Dockerfile | 2 +- Dockerfile.skaffold | 2 +- changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml | 2 +- go.mod | 2 +- pkg/testing/runner/runner_test.go | 2 +- version/docs/version.asciidoc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5ca57727aa..ea46598b4a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.23.6 +ARG GO_VERSION=1.24.0 FROM circleci/golang:${GO_VERSION} diff --git a/Dockerfile.skaffold b/Dockerfile.skaffold index f68bde19030..edf8470e494 100644 --- a/Dockerfile.skaffold +++ b/Dockerfile.skaffold @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.23.6 +ARG GO_VERSION=1.24.0 ARG crossbuild_image="docker.elastic.co/beats-dev/golang-crossbuild" ARG AGENT_VERSION=8.9.0-SNAPSHOT ARG AGENT_IMAGE="docker.elastic.co/beats/elastic-agent" diff --git a/changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml b/changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml index a230b966b27..6bbea61d70d 100644 --- a/changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml +++ b/changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml @@ -11,7 +11,7 @@ kind: feature # Change summary; a 80ish characters long description of the change. -summary: Upgrade-to-Go-1.23.0 +summary: Upgrade-to-Go-1.24.0 # Long description; in case the summary is not enough to describe the change # this field accommodate a description without length limits. diff --git a/go.mod b/go.mod index ee1b986a506..c28f4026a1e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/elastic-agent -go 1.23.6 +go 1.24.0 require ( github.com/Jeffail/gabs/v2 v2.6.0 diff --git a/pkg/testing/runner/runner_test.go b/pkg/testing/runner/runner_test.go index 87ce2ff275b..5f40fbaa5a7 100644 --- a/pkg/testing/runner/runner_test.go +++ b/pkg/testing/runner/runner_test.go @@ -28,7 +28,7 @@ func TestNewRunner_Clean(t *testing.T) { AgentVersion: "8.10.0", StackVersion: "8.10.0-SNAPSHOT", BuildDir: filepath.Join(tmpdir, "build"), - GOVersion: "1.23.6", + GOVersion: "1.24.0", RepoDir: filepath.Join(tmpdir, "repo"), StateDir: stateDir, ExtraEnv: nil, diff --git a/version/docs/version.asciidoc b/version/docs/version.asciidoc index 6b85fc6c7ff..d5a71f627e6 100644 --- a/version/docs/version.asciidoc +++ b/version/docs/version.asciidoc @@ -3,7 +3,7 @@ // FIXME: once elastic.co docs have been switched over to use `main`, remove // the `doc-site-branch` line below as well as any references to it in the code. :doc-site-branch: master -:go-version: 1.23.6 +:go-version: 1.24.0 :release-state: unreleased :python: 3.7 :docker: 1.12 From 2dc8ab8b3863858ebf45d021c6c2f1b2a0bb9b95 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:56:23 +0100 Subject: [PATCH 2/6] lint: bump golangci-lint --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e45941ae274..e2a5029f22a 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ check: ## check-go: download and run the go linter. .PHONY: check-go check-go: ## - Run golangci-lint - @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.60.1 + @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.64.5 @./bin/golangci-lint run -v ## check-no-changes : Check there is no local changes. From cd9ad209daf3f2e15b1166c2baea839f43d33157 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 19 Feb 2025 21:17:54 +0100 Subject: [PATCH 3/6] lint: bump golangci-lint --- .github/workflows/golangci-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 8e764d26301..54f957ef856 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -25,10 +25,10 @@ jobs: go-version-file: .go-version - name: golangci-lint - uses: golangci/golangci-lint-action@v6.2.0 + uses: golangci/golangci-lint-action@v6.5.0 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.61.0 + version: v1.64.5 # Give the job more time to execute. # Regarding `--whole-files`, the linter is supposed to support linting of changed a patch only but, From fe33ee9a0aef328f05b67c0e56daba1c356525b8 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 19 Feb 2025 21:39:16 +0100 Subject: [PATCH 4/6] Update .golangci.yml --- .golangci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index f76beb64fcc..b007a914b3f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -84,7 +84,7 @@ linters-settings: forbid: - fmt.Print.* # too much log noise # Exclude godoc examples from forbidigo checks. Default is true. - exclude_godoc_examples: true + exclude-godoc-examples: true goimports: local-prefixes: github.com/elastic @@ -131,8 +131,6 @@ linters-settings: nolintlint: # Enable to ensure that nolint directives are all used. Default is true. allow-unused: false - # Disable to ensure that nolint directives don't have a leading space. Default is true. - allow-leading-space: false # Exclude following linters from requiring an explanation. Default is []. allow-no-explanation: [] # Enable to require an explanation of nonzero length after each nolint directive. Default is false. From 621f562fa66593315c4b19163dc775bbb0315a47 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 19 Feb 2025 21:54:00 +0100 Subject: [PATCH 5/6] Update .golangci.yml --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index b007a914b3f..3142e0c02c1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -46,7 +46,6 @@ linters: - asciicheck # simple linter to check that your code does not contain non-ASCII identifiers - bodyclose # checks whether HTTP response body is closed successfully - durationcheck # check for two durations multiplied together - - exportloopref # checks for pointers to enclosing loop variables - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports - gosec # inspects source code for security problems - importas # enforces consistent import aliases From d42b00c849661d1e5cc1308f37bfb077659072ed Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:16:52 +0100 Subject: [PATCH 6/6] build: bump go to 1.24.0 --- .buildkite/pipeline.yml | 2 +- .go-version | 2 +- .tool-versions | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index c89bd4043d8..0b4850f9016 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -212,7 +212,7 @@ steps: artifact_paths: - "build/TEST-go-unit.cov" agents: - image: "golang:1.23.6" + image: "golang:1.24.0" depends_on: - unit-tests - extended-windows diff --git a/.go-version b/.go-version index d8c40e539ce..53cc1a6f929 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.23.6 +1.24.0 diff --git a/.tool-versions b/.tool-versions index 0ad3edeffba..ff1caad8696 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ mage 1.14.0 -golang 1.23.6 +golang 1.24.0 terraform 1.9.3