Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ steps:
artifact_paths:
- "build/TEST-go-unit.cov"
agents:
image: "golang:1.23.6"
image: "golang:1.22.6"
depends_on:
- unit-tests
- extended-windows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-agent-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version: 1.21

- name: Set git config
run: |
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.6
1.22.12
12 changes: 12 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ 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
Expand All @@ -141,11 +145,19 @@ 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
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mage 1.14.0
golang 1.23.6
terraform 1.9.3
golang 1.22.9
terraform 1.9.3
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.23.6
ARG GO_VERSION=1.22.12
FROM circleci/golang:${GO_VERSION}


Expand All @@ -7,6 +7,7 @@ ARG TEST_RESULTS=/tmp/test-results
RUN mkdir -p ${TEST_RESULTS} && mkdir -p ./code
RUN go get github.com/magefile/mage

ENV GO111MODULE=on
WORKDIR ./code
#COPY --chown=circleci:circleci . .
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.skaffold
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.23.6
ARG GO_VERSION=1.22.12
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"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.55.2
@./bin/golangci-lint run -v

## check-no-changes : Check there is no local changes.
Expand Down
74 changes: 37 additions & 37 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18238,6 +18238,43 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/exp
Version: v0.0.0-20240719175910-8a7402abbf56
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240719175910-8a7402abbf56/LICENSE:

Copyright 2009 The Go Authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/net
Version: v0.34.0
Expand Down Expand Up @@ -104408,43 +104445,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/exp
Version: v0.0.0-20240719175910-8a7402abbf56
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240719175910-8a7402abbf56/LICENSE:

Copyright 2009 The Go Authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/mod
Version: v0.21.0
Expand Down
32 changes: 0 additions & 32 deletions changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/elastic/elastic-agent

go 1.23.6
go 1.22.12

require (
github.com/Jeffail/gabs/v2 v2.6.0
Expand Down Expand Up @@ -78,6 +78,7 @@ require (
go.opentelemetry.io/collector/receiver/nopreceiver v0.119.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.32.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/net v0.34.0
golang.org/x/sync v0.10.0
golang.org/x/sys v0.29.0
Expand Down Expand Up @@ -617,7 +618,6 @@ require (
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
Expand Down
9 changes: 4 additions & 5 deletions internal/pkg/agent/cmd/container_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ package cmd

import (
"errors"
"maps"
"os"
"path/filepath"
"slices"
"testing"

"github.com/stretchr/testify/require"

"golang.org/x/exp/maps"
"kernel.org/pub/linux/libs/security/libcap/cap"
)

Expand Down Expand Up @@ -193,8 +192,8 @@ func Test_raiseEffectiveCapabilities(t *testing.T) {
require.Error(t, err)
} else {
require.NoError(t, err)
require.ElementsMatch(t, tt.expectedCaps, slices.Collect(maps.Keys(tt.mockedProcCaps.effectiveCaps)))
require.ElementsMatch(t, tt.expectedCaps, slices.Collect(maps.Keys(tt.mockedProcCaps.inheritableCaps)))
require.ElementsMatch(t, tt.expectedCaps, maps.Keys(tt.mockedProcCaps.effectiveCaps))
require.ElementsMatch(t, tt.expectedCaps, maps.Keys(tt.mockedProcCaps.inheritableCaps))
}
})
}
Expand Down Expand Up @@ -292,7 +291,7 @@ func Test_raiseAmbientCapabilities(t *testing.T) {
require.Error(t, err)
} else {
require.NoError(t, err)
require.ElementsMatch(t, tt.expectedAmbientCaps, slices.Collect(maps.Keys(tt.mockedBoundCaps.ambientCaps)))
require.ElementsMatch(t, tt.expectedAmbientCaps, maps.Keys(tt.mockedBoundCaps.ambientCaps))
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testing/runner/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.20.7",
RepoDir: filepath.Join(tmpdir, "repo"),
StateDir: stateDir,
ExtraEnv: nil,
Expand Down
2 changes: 1 addition & 1 deletion version/docs/version.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.22.12
:release-state: unreleased
:python: 3.7
:docker: 1.12
Expand Down