Skip to content

Commit 8b404a7

Browse files
Merge branch 'main' into main-to-serverless
2 parents 50b57ed + 77c5f51 commit 8b404a7

20 files changed

+1577
-385
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ updates:
99
- automation
1010
- skip-changelog
1111
- Team:Elastic-Agent-Control-Plane
12+
- backport-active-all
1213
allow:
1314
# Only update internal dependencies for now while we evaluate this workflow.
1415
- dependency-name: "github.com/elastic/*"
@@ -29,4 +30,5 @@ updates:
2930
- automation
3031
- skip-changelog
3132
- Team:Elastic-Agent-Control-Plane
33+
- backport-active-all
3234
open-pull-requests-limit: 10

.package-version

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "9.2.0-SNAPSHOT",
3-
"build_id": "9.2.0-021aded8",
4-
"manifest_url": "https://snapshots.elastic.co/9.2.0-021aded8/manifest-9.2.0-SNAPSHOT.json",
5-
"summary_url": "https://snapshots.elastic.co/9.2.0-021aded8/summary-9.2.0-SNAPSHOT.html",
3+
"build_id": "9.2.0-0df011a0",
4+
"manifest_url": "https://snapshots.elastic.co/9.2.0-0df011a0/manifest-9.2.0-SNAPSHOT.json",
5+
"summary_url": "https://snapshots.elastic.co/9.2.0-0df011a0/summary-9.2.0-SNAPSHOT.html",
66
"core_version": "9.2.0",
7-
"stack_build_id": "9.2.0-021aded8-SNAPSHOT"
7+
"stack_build_id": "9.2.0-0df011a0-SNAPSHOT"
88
}

NOTICE-fips.txt

Lines changed: 426 additions & 4 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 426 additions & 4 deletions
Large diffs are not rendered by default.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Add the dockerstats OpenTelemetry receiver
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
#pr: https://github.com/owner/repo/1234
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: security
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: redact secrets from pre-config, computed-config, components-expected, and components-actual files in diagnostics archive
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
pr: https://github.com/elastic/elastic-agent/pull/9560
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/docker/docker v28.2.2+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.20250822231535-5c4aea744997
17+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250826200704-344c05cb956d
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
@@ -31,7 +31,7 @@ require (
3131
github.com/elastic/opentelemetry-collector-components/extension/apmconfigextension v0.5.0
3232
github.com/elastic/opentelemetry-collector-components/processor/elasticinframetricsprocessor v0.16.0
3333
github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor v0.9.0
34-
github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.2.0
34+
github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.2.1
3535
github.com/fatih/color v1.18.0
3636
github.com/fsnotify/fsnotify v1.9.0
3737
github.com/go-viper/mapstructure/v2 v2.3.0
@@ -128,6 +128,7 @@ require (
128128
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.130.0
129129
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.130.0
130130
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.130.0
131+
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.130.0
131132
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.130.0
132133
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.130.0
133134
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.130.0
@@ -505,7 +506,6 @@ require (
505506
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
506507
github.com/mitchellh/reflectwalk v1.0.2 // indirect
507508
github.com/moby/docker-image-spec v1.3.1 // indirect
508-
github.com/moby/go-archive v0.1.0 // indirect
509509
github.com/moby/locker v1.0.1 // indirect
510510
github.com/moby/spdystream v0.5.0 // indirect
511511
github.com/moby/sys/mountinfo v0.7.2 // indirect
@@ -528,6 +528,7 @@ require (
528528
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.130.0 // indirect
529529
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.130.0 // indirect
530530
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.130.0 // indirect
531+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.130.0 // indirect
531532
github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.130.0 // indirect
532533
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.130.0 // indirect
533534
github.com/open-telemetry/opentelemetry-collector-contrib/internal/gopsutilenv v0.130.0 // indirect

go.sum

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti
487487
github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk=
488488
github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
489489
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
490-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250822231535-5c4aea744997 h1:v5Hc8SkU9N+HCGx+G2nfvfeFZpuK/KovAQ8kScsQBKs=
491-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250822231535-5c4aea744997/go.mod h1:pkd9sbgefnW9S/YlGBo79EoWZiohxbECjHE35fpUf94=
490+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250826200704-344c05cb956d h1:B26iRJoWBd3LcKWXDfJfY8/X1CevgbH7Dt/0wLU1WN4=
491+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250826200704-344c05cb956d/go.mod h1:IThpxJYXUYsJZ/XjllGJ1rUp64/c6ii/sM1FE+G2ieI=
492492
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae h1:OiShmbWAyGU0MS0ADJWr1/QgeLIZliMk9xsrFicR3/s=
493493
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae/go.mod h1:D2IckZVXARugvikE4fv1glvaJMohKSZRzrPsxCjo9O0=
494494
github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0=
@@ -557,8 +557,8 @@ github.com/elastic/opentelemetry-collector-components/processor/elastictraceproc
557557
github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor v0.9.0/go.mod h1:abeJCmXXWoNdCqyIFkzgZAnvK9QkxAqyBLMonlKxAZ0=
558558
github.com/elastic/opentelemetry-collector-components/processor/lsmintervalprocessor v0.8.0 h1:m2RieHXVTRykAd7VdpryuAV56Ia/eidgtlEutnG/m5w=
559559
github.com/elastic/opentelemetry-collector-components/processor/lsmintervalprocessor v0.8.0/go.mod h1:uQHpGpKwGHhdO5fm2hx1mthiPMiScmFOp5XNwD0EqVw=
560-
github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.2.0 h1:h1gGRol15HQupkhVW+x5GSI9DcZrjEqPlJCTmf5A9kg=
561-
github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.2.0/go.mod h1:6GD6slW/fYTxZkhBfjk2TaSJHmyevZfyuudIyqXAfwc=
560+
github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.2.1 h1:kcwYI2wQVFYnZojkKtFky3lrFZB1BDmw6SivDffP+qs=
561+
github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.2.1/go.mod h1:6GD6slW/fYTxZkhBfjk2TaSJHmyevZfyuudIyqXAfwc=
562562
github.com/elastic/opentelemetry-lib v0.21.0 h1:aktZQ6hocz/yVMOikDrdcjWtl/qcK/AfMBundZJTCcQ=
563563
github.com/elastic/opentelemetry-lib v0.21.0/go.mod h1:mNcdHi6ivTn5w4bE18as43gzKt2rVmK4HCeJZ9JmFXk=
564564
github.com/elastic/pkcs8 v1.0.0 h1:HhitlUKxhN288kcNcYkjW6/ouvuwJWd9ioxpjnD9jVA=
@@ -1218,6 +1218,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.130
12181218
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.130.0/go.mod h1:LSII2PtNQrizYmbcpUl8b1zHF3+xPkJL3F+ITZ1j25Y=
12191219
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.130.0 h1:UoR/xVnYwybPDA4FhJbuPwU7HvP00Tpgu0YaHEPIOaU=
12201220
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.130.0/go.mod h1:85OEk8e0NURYWjBzmXxoNRlpLTxWA1YwFjcBll1uAFk=
1221+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.130.0 h1:wkRGpP4jht7Dmboa/0ZKfVjfYzZU3BsySRfK3vblcUo=
1222+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.130.0/go.mod h1:hbeMduPd1RYmljh9Z2/NgbKvFIfp7U4J3IGGOYLZE5c=
12211223
github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.130.0 h1:uj6ai6KVAY0KFeXn0tTTfvnFCF+WCMM7jfSMk7uZa3g=
12221224
github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.130.0/go.mod h1:vggHY5WvnwKCuPW0hEIkWtctseFY6MjRLC+x7C2eN4k=
12231225
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.130.0 h1:imJFA+dRC4qVtza0SL/UuYTrnc68zpt2uvUkh9QAXI4=
@@ -1294,6 +1296,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceproc
12941296
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.130.0/go.mod h1:wU38xs5JMy8FYLVDw5F1/ShVgN0nYauna5Wj0qyL/Vk=
12951297
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.130.0 h1:/UagoKsz1+NAOkNIaoSiE5nW+7OiT/3tG91WsIDuHeU=
12961298
github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.130.0/go.mod h1:4VAXR5a89aHYFQYvNGkO/5yv1QYfF+sc8+fcMyWdRLE=
1299+
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.130.0 h1:c4YGI4SI5xZJbW23/SAoclPbpg/0v7qgugOs3rztRfM=
1300+
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.130.0/go.mod h1:2M2fJOvju5DAPgCceMDrX0xQwMipstgEbW6MrtwadhY=
12971301
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.130.0 h1:44PeSCFt4J6i84dgB+Elme7YmC2PlL0Os0tMIx1gcFU=
12981302
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.130.0/go.mod h1:3yzRJ95JrcxqLE9d6HnYIf9ONtTIeUIDP/A9EiKF1h4=
12991303
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.130.0 h1:OuaYQSPAMuXGPyClRWk044zxQVlzOoAftqJs304vLB4=

internal/pkg/agent/application/coordinator/coordinator.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ type Coordinator struct {
357357
// run a ticker that checks to see if we have a new PID.
358358
componentPIDTicker *time.Ticker
359359
componentPidRequiresUpdate *atomic.Bool
360+
361+
// Abstraction for diagnostics AddSecretMarkers function for testability
362+
secretMarkerFunc func(*logger.Logger, *config.Config) error
360363
}
361364

362365
// The channels Coordinator reads to receive updates from the various managers.
@@ -476,7 +479,8 @@ func New(
476479
componentPIDTicker: time.NewTicker(time.Second * 30),
477480
componentPidRequiresUpdate: &atomic.Bool{},
478481

479-
fleetAcker: fleetAcker,
482+
fleetAcker: fleetAcker,
483+
secretMarkerFunc: diagnostics.AddSecretMarkers,
480484
}
481485
// Setup communication channels for any non-nil components. This pattern
482486
// lets us transparently accept nil managers / simulated events during
@@ -1475,6 +1479,10 @@ func (c *Coordinator) processConfigAgent(ctx context.Context, cfg *config.Config
14751479
return err
14761480
}
14771481

1482+
if err = c.secretMarkerFunc(c.logger, cfg); err != nil {
1483+
c.logger.Errorf("failed to add secret markers: %v", err)
1484+
}
1485+
14781486
// perform and verify ast translation
14791487
m, err := cfg.ToMapStr()
14801488
if err != nil {

internal/pkg/agent/application/coordinator/coordinator_unit_test.go

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,16 @@ import (
5757
"github.com/elastic/elastic-agent/pkg/component"
5858
"github.com/elastic/elastic-agent/pkg/component/runtime"
5959
agentclient "github.com/elastic/elastic-agent/pkg/control/v2/client"
60+
"github.com/elastic/elastic-agent/pkg/core/logger"
6061
"github.com/elastic/elastic-agent/pkg/core/logger/loggertest"
6162
"github.com/elastic/elastic-agent/pkg/utils/broadcaster"
6263
)
6364

65+
var testSecretMarkerFunc = func(*logger.Logger, *config.Config) error {
66+
// no-op secret marker function for testing
67+
return nil
68+
}
69+
6470
func TestVarsManagerError(t *testing.T) {
6571
// Set a one-second timeout -- nothing here should block, but if it
6672
// does let's report a failure instead of timing out the test runner.
@@ -491,6 +497,7 @@ func TestCoordinatorReportsInvalidPolicy(t *testing.T) {
491497
vars: emptyVars(t),
492498
ast: emptyAST(t),
493499
componentPIDTicker: time.NewTicker(time.Second * 30),
500+
secretMarkerFunc: testSecretMarkerFunc,
494501
}
495502

496503
// Send an invalid config update and confirm that Coordinator reports
@@ -607,6 +614,7 @@ func TestCoordinatorReportsComponentModelError(t *testing.T) {
607614
vars: emptyVars(t),
608615
ast: emptyAST(t),
609616
componentPIDTicker: time.NewTicker(time.Second * 30),
617+
secretMarkerFunc: testSecretMarkerFunc,
610618
}
611619

612620
// This configuration produces a valid AST but its EQL condition is
@@ -675,7 +683,7 @@ func TestCoordinatorPolicyChangeUpdatesMonitorReloader(t *testing.T) {
675683
// does let's report a failure instead of timing out the test runner.
676684
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
677685
defer cancel()
678-
logger := logp.NewLogger("testing")
686+
log := logp.NewLogger("testing")
679687

680688
configChan := make(chan ConfigChange, 1)
681689

@@ -690,10 +698,16 @@ func TestCoordinatorPolicyChangeUpdatesMonitorReloader(t *testing.T) {
690698
newServerFn := func(*monitoringCfg.MonitoringConfig) (reload.ServerController, error) {
691699
return monitoringServer, nil
692700
}
693-
monitoringReloader := reload.NewServerReloader(newServerFn, logger, monitoringCfg.DefaultConfig())
701+
monitoringReloader := reload.NewServerReloader(newServerFn, log, monitoringCfg.DefaultConfig())
702+
703+
secretMarkerCalled := false
704+
mockSecretMarkerFunc := func(*logger.Logger, *config.Config) error {
705+
secretMarkerCalled = true
706+
return nil
707+
}
694708

695709
coord := &Coordinator{
696-
logger: logger,
710+
logger: log,
697711
agentInfo: &info.AgentInfo{},
698712
stateBroadcaster: broadcaster.New(State{}, 0, 0),
699713
managerChans: managerChans{
@@ -703,6 +717,7 @@ func TestCoordinatorPolicyChangeUpdatesMonitorReloader(t *testing.T) {
703717
otelMgr: &fakeOTelManager{},
704718
vars: emptyVars(t),
705719
componentPIDTicker: time.NewTicker(time.Second * 30),
720+
secretMarkerFunc: mockSecretMarkerFunc,
706721
}
707722
coord.RegisterMonitoringServer(monitoringReloader)
708723

@@ -723,6 +738,8 @@ inputs:
723738
coord.runLoopIteration(ctx)
724739
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change")
725740

741+
assert.True(t, secretMarkerCalled, "secret marker should be called")
742+
726743
// server is started by default
727744
assert.True(t, monitoringServer.startTriggered)
728745
assert.True(t, monitoringServer.isRunning)
@@ -842,6 +859,7 @@ func TestCoordinatorPolicyChangeUpdatesRuntimeAndOTelManager(t *testing.T) {
842859
otelMgr: otelManager,
843860
vars: emptyVars(t),
844861
componentPIDTicker: time.NewTicker(time.Second * 30),
862+
secretMarkerFunc: testSecretMarkerFunc,
845863
}
846864

847865
// Create a policy with one input and one output (no otel configuration)
@@ -1014,6 +1032,7 @@ func TestCoordinatorPolicyChangeUpdatesRuntimeAndOTelManagerWithOtelComponents(t
10141032
specs: specs,
10151033
vars: emptyVars(t),
10161034
componentPIDTicker: time.NewTicker(time.Second * 30),
1035+
secretMarkerFunc: testSecretMarkerFunc,
10171036
}
10181037

10191038
// Create a policy with one input and one output (no otel configuration)
@@ -1112,6 +1131,7 @@ func TestCoordinatorReportsRuntimeManagerUpdateFailure(t *testing.T) {
11121131

11131132
vars: emptyVars(t),
11141133
componentPIDTicker: time.NewTicker(time.Second * 30),
1134+
secretMarkerFunc: testSecretMarkerFunc,
11151135
}
11161136

11171137
// Send an empty policy which should forward an empty component model to
@@ -1173,6 +1193,7 @@ func TestCoordinatorReportsOTelManagerUpdateFailure(t *testing.T) {
11731193
otelMgr: otelManager,
11741194
vars: emptyVars(t),
11751195
componentPIDTicker: time.NewTicker(time.Second * 30),
1196+
secretMarkerFunc: testSecretMarkerFunc,
11761197
}
11771198

11781199
// Send an empty policy which should forward an empty component model to
@@ -1237,6 +1258,7 @@ func TestCoordinatorAppliesVarsToPolicy(t *testing.T) {
12371258
otelMgr: &fakeOTelManager{},
12381259
vars: emptyVars(t),
12391260
componentPIDTicker: time.NewTicker(time.Second * 30),
1261+
secretMarkerFunc: testSecretMarkerFunc,
12401262
}
12411263

12421264
// Create a policy with one input and one output

0 commit comments

Comments
 (0)