Skip to content

Commit f9508a2

Browse files
chouetzgithub-actions[bot]KSerraniapgimalacCelianR
authored
[Agent6] Revert test-infra-bump to fix new-e2e-containers (#35122)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: KSerrania <[email protected]> Co-authored-by: pgimalac <[email protected]> Co-authored-by: CelianR <[email protected]>
1 parent 00f113a commit f9508a2

File tree

294 files changed

+1253
-1222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+1253
-1222
lines changed

.github/CODEOWNERS

Lines changed: 153 additions & 107 deletions
Large diffs are not rendered by default.

.gitlab-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ include:
1818
- .gitlab/deps_fetch/deps_fetch.yml
1919
- .gitlab/dev_container_deploy/include.yml
2020
- .gitlab/e2e/e2e.yml
21-
- .gitlab/e2e_pre_test/e2e_pre_test.yml
2221
- .gitlab/functional_test/include.yml
2322
- .gitlab/functional_test_cleanup/functional_test_cleanup.yml
2423
- .gitlab/install_script_testing/install_script_testing.yml
@@ -172,7 +171,7 @@ variables:
172171
# and check the job creating the image to make sure you have the right SHA prefix
173172
TEST_INFRA_DEFINITIONS_BUILDIMAGES_SUFFIX: ""
174173
# Make sure to update test-infra-definitions version in go.mod as well
175-
TEST_INFRA_DEFINITIONS_BUILDIMAGES: fc57c00046a6
174+
TEST_INFRA_DEFINITIONS_BUILDIMAGES: eefd2de87300
176175
DATADOG_AGENT_BUILDERS: v28719426-b6a4fd9
177176

178177
DATADOG_AGENT_EMBEDDED_PATH: /opt/datadog-agent/embedded

cmd/agent/common/loader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/DataDog/datadog-agent/comp/core/workloadmeta"
1717
"github.com/DataDog/datadog-agent/pkg/config"
1818
"github.com/DataDog/datadog-agent/pkg/sbom/scanner"
19-
"github.com/DataDog/datadog-agent/pkg/util/option"
19+
"github.com/DataDog/datadog-agent/pkg/util/optional"
2020
)
2121

2222
// GetWorkloadmetaInit provides the InitHelper for workloadmeta so it can be injected as a Param
@@ -25,7 +25,7 @@ func GetWorkloadmetaInit() workloadmeta.InitHelper {
2525
return workloadmeta.InitHelper(func(ctx context.Context, wm workloadmeta.Component) error {
2626
// SBOM scanner needs to be called here as initialization is required prior to the
2727
// catalog getting instantiated and initialized.
28-
sbomScanner, err := scanner.CreateGlobalScanner(config.Datadog, option.New(wm))
28+
sbomScanner, err := scanner.CreateGlobalScanner(config.Datadog, optional.NewOption(wm))
2929
if err != nil {
3030
return fmt.Errorf("failed to create SBOM scanner: %s", err)
3131
} else if sbomScanner != nil {

cmd/agent/common/test_helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/DataDog/datadog-agent/cmd/agent/common/path"
1818
"github.com/DataDog/datadog-agent/comp/core/secrets"
1919
"github.com/DataDog/datadog-agent/pkg/config"
20-
"github.com/DataDog/datadog-agent/pkg/util/option"
20+
"github.com/DataDog/datadog-agent/pkg/util/optional"
2121
)
2222

2323
// SetupConfigForTest fires up the configuration system and returns warnings if any.
@@ -36,7 +36,7 @@ func SetupConfigForTest(confFilePath string) (*config.Warnings, error) {
3636
}
3737
cfg.AddConfigPath(path.DefaultConfPath)
3838
// load the configuration
39-
warnings, err := config.LoadDatadogCustom(cfg, origin, option.None[secrets.Component](), nil)
39+
warnings, err := config.LoadDatadogCustom(cfg, origin, optional.NewNoneOption[secrets.Component](), nil)
4040
if err != nil {
4141
// special-case permission-denied with a clearer error message
4242
if errors.Is(err, fs.ErrPermission) {

cmd/agent/subcommands/diagnose/command.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"github.com/DataDog/datadog-agent/pkg/diagnose/diagnosis"
3434
"github.com/DataDog/datadog-agent/pkg/util/fxutil"
3535
utillog "github.com/DataDog/datadog-agent/pkg/util/log"
36-
"github.com/DataDog/datadog-agent/pkg/util/option"
36+
"github.com/DataDog/datadog-agent/pkg/util/optional"
3737

3838
"github.com/cihub/seelog"
3939
"github.com/fatih/color"
@@ -99,7 +99,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
9999
NoInstance: !cliParams.runLocal,
100100
}
101101
}),
102-
fx.Supply(option.None[collector.Component]()),
102+
fx.Supply(optional.NewNoneOption[collector.Component]()),
103103
workloadmeta.Module(),
104104
tagger.Module(),
105105
fx.Provide(func(config config.Component) tagger.Params { return tagger.NewTaggerParamsForCoreAgent(config) }),
@@ -234,9 +234,9 @@ This command print the package-signing metadata payload. This payload is used by
234234

235235
func cmdDiagnose(cliParams *cliParams,
236236
senderManager diagnosesendermanager.Component,
237-
wmeta option.Option[workloadmeta.Component],
237+
wmeta optional.Option[workloadmeta.Component],
238238
ac autodiscovery.Component,
239-
collector option.Option[collector.Component],
239+
collector optional.Option[collector.Component],
240240
secretResolver secrets.Component) error {
241241
diagCfg := diagnosis.Config{
242242
Verbose: cliParams.verbose,
@@ -245,7 +245,7 @@ func cmdDiagnose(cliParams *cliParams,
245245
Exclude: cliParams.exclude,
246246
}
247247

248-
diagnoseDeps := diagnose.NewSuitesDeps(senderManager, collector, secretResolver, wmeta, option.New(ac))
248+
diagnoseDeps := diagnose.NewSuitesDeps(senderManager, collector, secretResolver, wmeta, optional.NewOption(ac))
249249
// Is it List command
250250
if cliParams.listSuites {
251251
diagnose.ListStdOut(color.Output, diagCfg, diagnoseDeps)

cmd/agent/subcommands/flare/command.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import (
4747
"github.com/DataDog/datadog-agent/pkg/serializer"
4848
"github.com/DataDog/datadog-agent/pkg/util/fxutil"
4949
"github.com/DataDog/datadog-agent/pkg/util/input"
50-
"github.com/DataDog/datadog-agent/pkg/util/option"
50+
"github.com/DataDog/datadog-agent/pkg/util/optional"
5151
)
5252

5353
// cliParams are the command-line arguments for this subcommand
@@ -116,7 +116,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
116116
tagger.OptionalModule(),
117117
autodiscoveryimpl.OptionalModule(), // if forceLocal is true, we will start autodiscovery (loadComponents) later
118118
flare.Module(),
119-
fx.Supply(option.None[collector.Component]()),
119+
fx.Supply(optional.NewNoneOption[collector.Component]()),
120120
diagnosesendermanagerimpl.Module(),
121121
// We need inventoryagent to fill the status page generated by the flare.
122122
inventoryagentimpl.Module(),
@@ -239,8 +239,8 @@ func makeFlare(flareComp flare.Component,
239239
config config.Component,
240240
_ sysprobeconfig.Component,
241241
cliParams *cliParams,
242-
_ option.Option[workloadmeta.Component],
243-
_ option.Option[tagger.Component]) error {
242+
_ optional.Option[workloadmeta.Component],
243+
_ optional.Option[tagger.Component]) error {
244244
var (
245245
profile flare.ProfileData
246246
err error

cmd/agent/subcommands/jmx/command.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import (
5858
pkgconfig "github.com/DataDog/datadog-agent/pkg/config"
5959
"github.com/DataDog/datadog-agent/pkg/config/model"
6060
"github.com/DataDog/datadog-agent/pkg/util/fxutil"
61-
"github.com/DataDog/datadog-agent/pkg/util/option"
61+
"github.com/DataDog/datadog-agent/pkg/util/optional"
6262
)
6363

6464
type cliParams struct {
@@ -147,11 +147,11 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
147147
fx.Provide(func() demultiplexer.Component { return nil }),
148148
fx.Provide(func() inventorychecks.Component { return nil }),
149149
fx.Provide(func() packagesigning.Component { return nil }),
150-
fx.Provide(func() option.Option[rcservice.Component] { return option.None[rcservice.Component]() }),
151-
fx.Provide(func() option.Option[rcserviceha.Component] { return option.None[rcserviceha.Component]() }),
150+
fx.Provide(func() optional.Option[rcservice.Component] { return optional.NewNoneOption[rcservice.Component]() }),
151+
fx.Provide(func() optional.Option[rcserviceha.Component] { return optional.NewNoneOption[rcserviceha.Component]() }),
152152
fx.Provide(func() status.Component { return nil }),
153153
fx.Provide(func() eventplatformreceiver.Component { return nil }),
154-
fx.Provide(func() option.Option[collector.Component] { return option.None[collector.Component]() }),
154+
fx.Provide(func() optional.Option[collector.Component] { return optional.NewNoneOption[collector.Component]() }),
155155
fx.Provide(tagger.NewTaggerParamsForCoreAgent),
156156
tagger.Module(),
157157
autodiscoveryimpl.Module(),
@@ -291,7 +291,7 @@ func runJmxCommandConsole(config config.Component,
291291
diagnoseSendermanager diagnosesendermanager.Component,
292292
secretResolver secrets.Component,
293293
agentAPI internalAPI.Component,
294-
collector option.Option[collector.Component]) error {
294+
collector optional.Option[collector.Component]) error {
295295
// This prevents log-spam from "comp/core/workloadmeta/collectors/internal/remote/process_collector/process_collector.go"
296296
// It appears that this collector creates some contention in AD.
297297
// Disabling it is both more efficient and gets rid of this log spam

cmd/agent/subcommands/run/command.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ import (
127127
"github.com/DataDog/datadog-agent/pkg/util/installinfo"
128128
"github.com/DataDog/datadog-agent/pkg/util/kubernetes/apiserver/leaderelection"
129129
pkglog "github.com/DataDog/datadog-agent/pkg/util/log"
130-
"github.com/DataDog/datadog-agent/pkg/util/option"
130+
"github.com/DataDog/datadog-agent/pkg/util/optional"
131131
"github.com/DataDog/datadog-agent/pkg/version"
132132

133133
// runtime init routines
@@ -203,7 +203,7 @@ func run(log log.Component,
203203
demultiplexer demultiplexer.Component,
204204
sharedSerializer serializer.MetricSerializer,
205205
cliParams *cliParams,
206-
logsAgent option.Option[logsAgent.Component],
206+
logsAgent optional.Option[logsAgent.Component],
207207
processAgent processAgent.Component,
208208
otelcollector otelcollector.Component,
209209
_ host.Component,
@@ -347,8 +347,8 @@ func getSharedFxOption() fx.Option {
347347
fx.Provide(tagger.NewTaggerParamsForCoreAgent),
348348
tagger.Module(),
349349
autodiscoveryimpl.Module(),
350-
fx.Provide(func(ac autodiscovery.Component) option.Option[autodiscovery.Component] {
351-
return option.New[autodiscovery.Component](ac)
350+
fx.Provide(func(ac autodiscovery.Component) optional.Option[autodiscovery.Component] {
351+
return optional.NewOption[autodiscovery.Component](ac)
352352
}),
353353

354354
// TODO: (components) - some parts of the agent (such as the logs agent) implicitly depend on the global state
@@ -409,7 +409,7 @@ func startAgent(
409409
taggerComp tagger.Component,
410410
ac autodiscovery.Component,
411411
rcclient rcclient.Component,
412-
logsAgent option.Option[logsAgent.Component],
412+
logsAgent optional.Option[logsAgent.Component],
413413
_ processAgent.Component,
414414
_ defaultforwarder.Component,
415415
_ serializer.MetricSerializer,
@@ -559,7 +559,7 @@ func startAgent(
559559
ac,
560560
logsAgent,
561561
demultiplexer,
562-
option.New(collector),
562+
optional.NewOption(collector),
563563
); err != nil {
564564
return log.Errorf("Error while starting api server, exiting: %v", err)
565565
}
@@ -604,7 +604,7 @@ func startAgent(
604604

605605
// Set up check collector
606606
commonchecks.RegisterChecks(wmeta)
607-
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(option.New(collector), demultiplexer), true)
607+
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer), true)
608608

609609
demultiplexer.AddAgentStartupTelemetry(version.AgentVersion)
610610

cmd/agent/subcommands/run/command_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import (
6666
"github.com/DataDog/datadog-agent/comp/remote-config/rcclient"
6767
"github.com/DataDog/datadog-agent/pkg/serializer"
6868
"github.com/DataDog/datadog-agent/pkg/util/fxutil"
69-
"github.com/DataDog/datadog-agent/pkg/util/option"
69+
"github.com/DataDog/datadog-agent/pkg/util/optional"
7070
// runtime init routines
7171
)
7272

@@ -97,7 +97,7 @@ func StartAgentWithDefaults(ctxChan <-chan context.Context) (<-chan error, error
9797
ac autodiscovery.Component,
9898
rcclient rcclient.Component,
9999
forwarder defaultforwarder.Component,
100-
logsAgent option.Option[logsAgent.Component],
100+
logsAgent optional.Option[logsAgent.Component],
101101
processAgent processAgent.Component,
102102
metadataRunner runner.Component,
103103
sharedSerializer serializer.MetricSerializer,

cmd/cluster-agent-cloudfoundry/subcommands/run/command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import (
5555
"github.com/DataDog/datadog-agent/pkg/util/fxutil"
5656
"github.com/DataDog/datadog-agent/pkg/util/hostname"
5757
pkglog "github.com/DataDog/datadog-agent/pkg/util/log"
58-
"github.com/DataDog/datadog-agent/pkg/util/option"
58+
"github.com/DataDog/datadog-agent/pkg/util/optional"
5959
"github.com/DataDog/datadog-agent/pkg/version"
6060

6161
"go.uber.org/fx"
@@ -159,12 +159,12 @@ func run(log log.Component,
159159
common.LoadComponents(secretResolver, wmeta, ac, pkgconfig.Datadog.GetString("confd_path"))
160160

161161
// Set up check collector
162-
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(option.New(collector), demultiplexer), true)
162+
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer), true)
163163

164164
// start the autoconfig, this will immediately run any configured check
165165
ac.LoadAndRun(mainCtx)
166166

167-
if err = api.StartServer(wmeta, taggerComp, ac, demultiplexer, option.New(collector), statusComponent, secretResolver); err != nil {
167+
if err = api.StartServer(wmeta, taggerComp, ac, demultiplexer, optional.NewOption(collector), statusComponent, secretResolver); err != nil {
168168
return log.Errorf("Error while starting agent API, exiting: %v", err)
169169
}
170170

0 commit comments

Comments
 (0)