Skip to content

Commit 75e86ab

Browse files
Merge branch 'main' into otel/added-k8s-comps
2 parents 34b18bf + 1a05982 commit 75e86ab

File tree

10 files changed

+296
-173
lines changed

10 files changed

+296
-173
lines changed

.github/workflows/bump-golang.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v4
2323

2424
- name: Install Updatecli in the runner
25-
uses: updatecli/updatecli-action@4922d58d06f0d096428933f153275e15a3eb49de # v0.76.1
25+
uses: updatecli/updatecli-action@eb158f6fd9e425b940a6750d6318f98e050ac390 # v0.76.1
2626

2727
- name: Run Updatecli in Apply mode
2828
run: updatecli apply --config .github/updatecli-bump-golang.yml

NOTICE.txt

+39-39
Original file line numberDiff line numberDiff line change
@@ -13387,43 +13387,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1338713387
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1338813388

1338913389

13390-
--------------------------------------------------------------------------------
13391-
Dependency : golang.org/x/exp
13392-
Version: v0.0.0-20240506185415-9bf2ced13842
13393-
Licence type (autodetected): BSD-3-Clause
13394-
--------------------------------------------------------------------------------
13395-
13396-
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/LICENSE:
13397-
13398-
Copyright (c) 2009 The Go Authors. All rights reserved.
13399-
13400-
Redistribution and use in source and binary forms, with or without
13401-
modification, are permitted provided that the following conditions are
13402-
met:
13403-
13404-
* Redistributions of source code must retain the above copyright
13405-
notice, this list of conditions and the following disclaimer.
13406-
* Redistributions in binary form must reproduce the above
13407-
copyright notice, this list of conditions and the following disclaimer
13408-
in the documentation and/or other materials provided with the
13409-
distribution.
13410-
* Neither the name of Google Inc. nor the names of its
13411-
contributors may be used to endorse or promote products derived from
13412-
this software without specific prior written permission.
13413-
13414-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13415-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13416-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13417-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13418-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13419-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13420-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13421-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13422-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13423-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13424-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13425-
13426-
1342713390
--------------------------------------------------------------------------------
1342813391
Dependency : golang.org/x/lint
1342913392
Version: v0.0.0-20210508222113-6edffad5e616
@@ -18013,11 +17976,11 @@ Contents of probable licence file $GOMODCACHE/github.com/docker/go-connections@v
1801317976

1801417977
--------------------------------------------------------------------------------
1801517978
Dependency : github.com/elastic/go-docappender/v2
18016-
Version: v2.1.2
17979+
Version: v2.1.4
1801717980
Licence type (autodetected): Apache-2.0
1801817981
--------------------------------------------------------------------------------
1801917982

18020-
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender/v2@v2.1.2/LICENSE:
17983+
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender/v2@v2.1.4/LICENSE:
1802117984

1802217985
Apache License
1802317986
Version 2.0, January 2004
@@ -48591,6 +48554,43 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4859148554
THE SOFTWARE.
4859248555

4859348556

48557+
--------------------------------------------------------------------------------
48558+
Dependency : golang.org/x/exp
48559+
Version: v0.0.0-20240506185415-9bf2ced13842
48560+
Licence type (autodetected): BSD-3-Clause
48561+
--------------------------------------------------------------------------------
48562+
48563+
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/LICENSE:
48564+
48565+
Copyright (c) 2009 The Go Authors. All rights reserved.
48566+
48567+
Redistribution and use in source and binary forms, with or without
48568+
modification, are permitted provided that the following conditions are
48569+
met:
48570+
48571+
* Redistributions of source code must retain the above copyright
48572+
notice, this list of conditions and the following disclaimer.
48573+
* Redistributions in binary form must reproduce the above
48574+
copyright notice, this list of conditions and the following disclaimer
48575+
in the documentation and/or other materials provided with the
48576+
distribution.
48577+
* Neither the name of Google Inc. nor the names of its
48578+
contributors may be used to endorse or promote products derived from
48579+
this software without specific prior written permission.
48580+
48581+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
48582+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
48583+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
48584+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
48585+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48586+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48587+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
48588+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48589+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48590+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
48591+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48592+
48593+
4859448594
--------------------------------------------------------------------------------
4859548595
Dependency : golang.org/x/mod
4859648596
Version: v0.17.0

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pr: https://github.com/elastic/elastic-agent/pull/823
4747
Prerequisites:
4848
- installed [mage](https://github.com/magefile/mage)
4949
- [Docker](https://docs.docker.com/get-docker/)
50-
- [X-pack](https://github.com/elastic/beats/tree/main/x-pack) to pre-exist in the parent folder of the local Git repository checkout
50+
- [beats](https://github.com/elastic/beats) to pre-exist in the parent folder of the local Git repository checkout if, and only if, packaging with `EXTERNAL=false` to package the beats as well
5151
- [elastic-agent-changelog-tool](https://github.com/elastic/elastic-agent-changelog-tool) to add changelog fragments for changelog generation
5252

5353
To build a local version of the agent for development, run the command below. The following platforms are supported:

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ require (
7979
go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1
8080
go.uber.org/zap v1.27.0
8181
golang.org/x/crypto v0.23.0
82-
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
8382
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
8483
golang.org/x/sync v0.7.0
8584
golang.org/x/sys v0.20.0
@@ -139,7 +138,7 @@ require (
139138
github.com/dnephin/pflag v1.0.7 // indirect
140139
github.com/docker/docker v25.0.5+incompatible // indirect
141140
github.com/docker/go-connections v0.5.0 // indirect
142-
github.com/elastic/go-docappender/v2 v2.1.2 // indirect
141+
github.com/elastic/go-docappender/v2 v2.1.4 // indirect
143142
github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect
144143
github.com/elastic/go-structform v0.0.10 // indirect
145144
github.com/elastic/go-windows v1.0.1 // indirect
@@ -289,6 +288,7 @@ require (
289288
go.opentelemetry.io/otel/trace v1.27.0 // indirect
290289
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
291290
go.uber.org/multierr v1.11.0 // indirect
291+
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
292292
golang.org/x/mod v0.17.0 // indirect
293293
golang.org/x/net v0.25.0 // indirect
294294
golang.org/x/oauth2 v0.20.0 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,8 @@ github.com/elastic/elastic-integration-corpus-generator-tool v0.5.0/go.mod h1:uf
823823
github.com/elastic/elastic-package v0.77.0/go.mod h1:Xeqx0OOVnKBfFoSHsHmKI74RxgRGiDhU6yXEu8BkJJM=
824824
github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA=
825825
github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
826-
github.com/elastic/go-docappender/v2 v2.1.2 h1:zkEh+g/CxpJdQR6BqdcApa/A4oRQiiG3iFiIhNCoovs=
827-
github.com/elastic/go-docappender/v2 v2.1.2/go.mod h1:oHi6MsHriWaG8W6T9iyJ/PkEo2+182HIzq+0RRAzzgA=
826+
github.com/elastic/go-docappender/v2 v2.1.4 h1:R6TN4udeC5pap+uA7Lrb3pzeOm03vx6K3+yQdczviH0=
827+
github.com/elastic/go-docappender/v2 v2.1.4/go.mod h1:eixVwyxvjJJLMditD/9630jjPbN6nHtSkVjae8nqJsY=
828828
github.com/elastic/go-elasticsearch/v7 v7.17.7/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4=
829829
github.com/elastic/go-elasticsearch/v7 v7.17.10 h1:TCQ8i4PmIJuBunvBS6bwT2ybzVFxxUhhltAs3Gyu1yo=
830830
github.com/elastic/go-elasticsearch/v7 v7.17.10/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4=

internal/pkg/agent/application/gateway/fleet/fleet_gateway.go

+4
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ func (f *FleetGateway) execute(ctx context.Context) (*fleetapi.CheckinResponse,
329329
// convert components into checkin components structure
330330
components := f.convertToCheckinComponents(state.Components)
331331

332+
f.log.Debugf("correcting agent loglevel from %s to %s using coordinator state", ecsMeta.Elastic.Agent.LogLevel, state.LogLevel.String())
333+
// Fix loglevel with the current log level used by coordinator
334+
ecsMeta.Elastic.Agent.LogLevel = state.LogLevel.String()
335+
332336
// checkin
333337
cmd := fleetapi.NewCheckinCmd(f.agentInfo, f.client)
334338
req := &fleetapi.CheckinRequest{

internal/pkg/agent/application/info/agent_metadata_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ func TestECSMetadata(t *testing.T) {
2929
metadata, err := agentInfo.ECSMetadata(l)
3030
require.NoError(t, err)
3131

32+
if assert.NotNil(t, metadata.Elastic, "metadata.Elastic must not be nil") {
33+
assert.NotNil(t, metadata.Elastic.Agent, "metadata.Elastic.Agent must not be nil")
34+
}
35+
3236
sysInfo, err := sysinfo.Host()
3337
require.NoError(t, err)
3438

internal/pkg/agent/application/upgrade/artifact/config_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ package artifact
66

77
import (
88
"reflect"
9+
"slices"
910
"testing"
1011
"time"
1112

1213
"github.com/stretchr/testify/assert"
1314
"github.com/stretchr/testify/require"
14-
"golang.org/x/exp/slices"
1515

1616
agentlibsconfig "github.com/elastic/elastic-agent-libs/config"
1717
"github.com/elastic/elastic-agent-libs/transport/httpcommon"

0 commit comments

Comments
 (0)