diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 69db79fc954..7057563564f 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/.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, 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/.golangci.yml b/.golangci.yml index 50a2b2b7f88..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 - - copyloopvar # checks for unnecessary loop variable copies - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports - gosec # inspects source code for security problems - importas # enforces consistent import aliases @@ -84,7 +83,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 +130,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. 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 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/Makefile b/Makefile index b5d3cbba6f2..3e9e72669f4 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,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. 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 4e0235387e8..6f108f18b23 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