Skip to content

Commit 895d629

Browse files
authored
Merge branch 'main' into improve-TestKubernetesJournaldInput
2 parents 1bc598e + 1fa0972 commit 895d629

File tree

11 files changed

+124
-45
lines changed

11 files changed

+124
-45
lines changed

NOTICE-fips.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0.
787787

788788
--------------------------------------------------------------------------------
789789
Dependency : github.com/elastic/beats/v7
790-
Version: v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d
790+
Version: v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2
791791
Licence type (autodetected): Elastic
792792
--------------------------------------------------------------------------------
793793

794-
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251117222225-3d17cad1ab6d/LICENSE.txt:
794+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251118234110-a4e336c8b5b2/LICENSE.txt:
795795

796796
Source code in this repository is variously licensed under the Apache License
797797
Version 2.0, an Apache compatible license, or the Elastic License. Outside of

NOTICE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0.
787787

788788
--------------------------------------------------------------------------------
789789
Dependency : github.com/elastic/beats/v7
790-
Version: v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d
790+
Version: v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2
791791
Licence type (autodetected): Elastic
792792
--------------------------------------------------------------------------------
793793

794-
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251117222225-3d17cad1ab6d/LICENSE.txt:
794+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251118234110-a4e336c8b5b2/LICENSE.txt:
795795

796796
Source code in this repository is variously licensed under the Apache License
797797
Version 2.0, an Apache compatible license, or the Elastic License. Outside of

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/docker/docker v28.4.0+incompatible
1515
github.com/docker/go-units v0.5.0
1616
github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5
17-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d
17+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2
1818
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae
1919
github.com/elastic/elastic-agent-autodiscover v0.10.0
2020
github.com/elastic/elastic-agent-client/v7 v7.17.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti
511511
github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk=
512512
github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
513513
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
514-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d h1:WiLFsGBR7P1ErPCUngBbOWU3poKF7WAdycwWcp5HeIA=
515-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d/go.mod h1:c8O8MuFlYOkEbT1qdC/iaiTHD2u2mCrCJZtkl4+shTg=
514+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2 h1:0VrGnx4wwU2K16wDOVAKxSI+TkJQQvYmQ+SJQQw/0rM=
515+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2/go.mod h1:c8O8MuFlYOkEbT1qdC/iaiTHD2u2mCrCJZtkl4+shTg=
516516
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae h1:OiShmbWAyGU0MS0ADJWr1/QgeLIZliMk9xsrFicR3/s=
517517
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae/go.mod h1:D2IckZVXARugvikE4fv1glvaJMohKSZRzrPsxCjo9O0=
518518
github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0=

internal/edot/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.10
55
replace github.com/elastic/elastic-agent => ../../
66

77
require (
8-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d
8+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2
99
github.com/elastic/elastic-agent v0.0.0-00010101000000-000000000000
1010
github.com/elastic/elastic-agent-libs v0.26.1
1111
github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.8.0

internal/edot/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti
440440
github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk=
441441
github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
442442
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
443-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d h1:WiLFsGBR7P1ErPCUngBbOWU3poKF7WAdycwWcp5HeIA=
444-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251117222225-3d17cad1ab6d/go.mod h1:c8O8MuFlYOkEbT1qdC/iaiTHD2u2mCrCJZtkl4+shTg=
443+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2 h1:0VrGnx4wwU2K16wDOVAKxSI+TkJQQvYmQ+SJQQw/0rM=
444+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251118234110-a4e336c8b5b2/go.mod h1:c8O8MuFlYOkEbT1qdC/iaiTHD2u2mCrCJZtkl4+shTg=
445445
github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0=
446446
github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE=
447447
github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA=

internal/pkg/agent/application/upgrade/watcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func (ch *AgentWatcher) Run(ctx context.Context) {
8686

8787
ch.connectCounter = 0
8888
ch.lostCounter = 0
89+
ch.lastPid = -1
8990

9091
// tracking of an error runs in a separate goroutine, because
9192
// the call to `watch.Recv` blocks and a timer is needed
@@ -143,7 +144,6 @@ func (ch *AgentWatcher) Run(ctx context.Context) {
143144

144145
LOOP:
145146
for {
146-
ch.lastPid = -1
147147
connectTimer := time.NewTimer(ch.checkInterval)
148148
select {
149149
case <-ctx.Done():

pkg/testing/fixture.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type Fixture struct {
5555
srcPackage string
5656
workDir string
5757
extractDir string
58+
socketPath string
5859

5960
installed bool
6061
installOpts *InstallOpts
@@ -186,12 +187,21 @@ func NewFixture(t *testing.T, version string, opts ...FixtureOpt) (*Fixture, err
186187
}
187188

188189
// Client returns the Elastic Agent communication client.
190+
// This client is shared across multiple calls to Client()
189191
func (f *Fixture) Client() client.Client {
190192
f.cMx.RLock()
191193
defer f.cMx.RUnlock()
192194
return f.c
193195
}
194196

197+
// NewClient returns a new Elastic Agent communication client.
198+
// The client is NOT shared across multiple calls but a new instance is allocated every time
199+
func (f *Fixture) NewClient() client.Client {
200+
f.cMx.Lock()
201+
defer f.cMx.Unlock()
202+
return client.New(client.WithAddress(f.socketPath))
203+
}
204+
195205
// Version returns the Elastic Agent version.
196206
func (f *Fixture) Version() string {
197207
return f.version
@@ -1136,6 +1146,12 @@ func (f *Fixture) prepareComponents(workDir string, components ...UsableComponen
11361146
return nil
11371147
}
11381148

1149+
func (f *Fixture) setSocketPath(socketPath string) {
1150+
f.cMx.Lock()
1151+
defer f.cMx.Unlock()
1152+
f.socketPath = socketPath
1153+
}
1154+
11391155
func (f *Fixture) setClient(c client.Client) {
11401156
f.cMx.Lock()
11411157
defer f.cMx.Unlock()
@@ -1605,6 +1621,7 @@ type AgentBinaryVersion struct {
16051621
Commit string `yaml:"commit"`
16061622
BuildTime string `yaml:"build_time"`
16071623
Snapshot bool `yaml:"snapshot"`
1624+
Fips bool `yaml:"fips"`
16081625
}
16091626

16101627
// String returns the version string.

pkg/testing/fixture_install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ func (f *Fixture) installNoPkgManager(ctx context.Context, installOpts *InstallO
278278
socketPath = paths.ControlSocketFromPath(runtime.GOOS, f.workDir)
279279
}
280280
c := client.New(client.WithAddress(socketPath))
281+
f.setSocketPath(socketPath)
281282
f.setClient(c)
282283

283284
f.t.Cleanup(func() {

testing/integration/ess/monitoring_probe_preserve_text_cfg_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ outputs:
3333
api_key: "example-key"
3434
preset: balanced
3535
allow_older_versions: true
36+
status_reporting:
37+
enabled: false
3638
3739
inputs:
3840
- type: system/metrics

0 commit comments

Comments
 (0)