diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index afb6e84dca5..542a4911204 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -196,7 +196,7 @@ steps: artifact_paths: - "build/TEST-go-unit.cov" agents: - image: "golang:1.22.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 87356de2458..9c7f14aaecb 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.1.1 + uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # 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 2560439f071..f9e8384bb6c 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.22.12 +1.24.1 diff --git a/.golangci.yml b/.golangci.yml index bf7d733c141..f76beb64fcc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -128,10 +128,6 @@ linters-settings: - github.com/fsnotify/fsnotify - github.com/openshift/api - gosimple: - # Select the Go version to target. The default is '1.13'. - go: "1.22.12" - nolintlint: # Enable to ensure that nolint directives are all used. Default is true. allow-unused: false @@ -145,19 +141,11 @@ linters-settings: require-specific: false staticcheck: - # Select the Go version to target. The default is '1.13'. - go: "1.22.12" checks: ["all"] stylecheck: - # Select the Go version to target. The default is '1.13'. - go: "1.22.12" checks: ["all"] - unused: - # Select the Go version to target. The default is '1.13'. - go: "1.22.12" - gosec: excludes: - G306 # Expect WriteFile permissions to be 0600 or less diff --git a/Dockerfile b/Dockerfile index d14b635a4dd..7e76b43a012 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.22.12 +ARG GO_VERSION=1.24.1 FROM circleci/golang:${GO_VERSION} diff --git a/Dockerfile.skaffold b/Dockerfile.skaffold index 240406c9c06..ec0187b6de6 100644 --- a/Dockerfile.skaffold +++ b/Dockerfile.skaffold @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.22.12 +ARG GO_VERSION=1.24.1 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 b09cff1e74d..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.55.2 + @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/1739786378-Upgrade-to-Go-1.24.0.yaml b/changelog/fragments/1739786378-Upgrade-to-Go-1.24.0.yaml new file mode 100644 index 00000000000..3ae1603a643 --- /dev/null +++ b/changelog/fragments/1739786378-Upgrade-to-Go-1.24.0.yaml @@ -0,0 +1,32 @@ +# Kind can be one of: +# - breaking-change: a change to previously-documented behavior +# - deprecation: functionality that is being removed in a later release +# - bug-fix: fixes a problem in a previous version +# - enhancement: extends functionality but does not break or fix existing behavior +# - feature: new functionality +# - known-issue: problems that we are aware of in a given version +# - security: impacts on the security of a product or a user’s deployment. +# - upgrade: important information for someone upgrading from a prior version +# - other: does not fit into any of the other categories +kind: security + +# Change summary; a 80ish characters long description of the change. +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. +# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment. +#description: + +# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc. +component: "elastic-agent" + +# PR URL; optional; the PR number that added the changeset. +# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. +# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. +# Please provide it if you are adding a fragment for a different PR. +pr: https://github.com/elastic/elastic-agent/pull/6872 + +# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of). +# If not present is automatically filled by the tooling with the issue linked to the PR number. +#issue: https://github.com/owner/repo/1234 diff --git a/go.mod b/go.mod index bc6a449af88..8a408cb4314 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/elastic-agent -go 1.22.12 +go 1.24.1 require ( github.com/Jeffail/gabs/v2 v2.6.0 diff --git a/version/docs/version.asciidoc b/version/docs/version.asciidoc index c85ec7ac9c8..15482d5c64c 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.22.12 +:go-version: 1.24.1 :release-state: unreleased :python: 3.7 :docker: 1.12