Skip to content

Commit 2c455d6

Browse files
matthewleeseclaude
andcommitted
refactor(ndm): only provide the workloadbalancing module where the collector is built
The first pass mirrored haagent's twelve fx sites, but haagent is provided in several of them for reasons unrelated to the collector, such as the haagent inventory metadata component. Only the collector component depends on workloadbalancing, so the module belongs in the three graphs that build it: the agent run subcommand, the cluster agent, and the cloudfoundry cluster agent. The other nine either use the noop collector or never construct one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 2b694d7 commit 2c455d6

17 files changed

Lines changed: 0 additions & 27 deletions

File tree

cmd/agent/subcommands/diagnose/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ go_library(
3535
"//comp/healthplatform",
3636
"//comp/serializer/logscompression/fx",
3737
"//comp/serializer/metricscompression/fx",
38-
"//comp/workloadbalancing/fx",
3938
"//pkg/config/helper",
4039
"//pkg/config/setup",
4140
"//pkg/process/util/containers",

cmd/agent/subcommands/diagnose/command.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import (
5050
healthplatform "github.com/DataDog/datadog-agent/comp/healthplatform"
5151
logscompressorfx "github.com/DataDog/datadog-agent/comp/serializer/logscompression/fx"
5252
metricscompressorfx "github.com/DataDog/datadog-agent/comp/serializer/metricscompression/fx"
53-
workloadbalancingfx "github.com/DataDog/datadog-agent/comp/workloadbalancing/fx"
5453
pkgconfighelper "github.com/DataDog/datadog-agent/pkg/config/helper"
5554
pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup"
5655
proccontainers "github.com/DataDog/datadog-agent/pkg/process/util/containers"
@@ -127,7 +126,6 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
127126
}),
128127
adfx.Module(),
129128
haagentfx.Module(),
130-
workloadbalancingfx.Module(),
131129
healthplatform.Bundle(),
132130
hostnameimpl.Module(),
133131
logscompressorfx.Module(),

cmd/agent/subcommands/flare/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ go_library(
4949
"//comp/metadata/resources/fx",
5050
"//comp/serializer/logscompression/fx",
5151
"//comp/serializer/metricscompression/fx",
52-
"//comp/workloadbalancing/fx",
5352
"//pkg/config/helper",
5453
"//pkg/config/settings",
5554
"//pkg/config/setup",

cmd/agent/subcommands/flare/command.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import (
6464
resourcesfx "github.com/DataDog/datadog-agent/comp/metadata/resources/fx"
6565
logscompressorfx "github.com/DataDog/datadog-agent/comp/serializer/logscompression/fx"
6666
metricscompressorfx "github.com/DataDog/datadog-agent/comp/serializer/metricscompression/fx"
67-
workloadbalancingfx "github.com/DataDog/datadog-agent/comp/workloadbalancing/fx"
6867
pkgconfighelper "github.com/DataDog/datadog-agent/pkg/config/helper"
6968
"github.com/DataDog/datadog-agent/pkg/config/settings"
7069
pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup"
@@ -177,7 +176,6 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
177176
core.Bundle(core.WithSecrets()),
178177
hostnameimpl.Module(),
179178
haagentfx.Module(),
180-
workloadbalancingfx.Module(),
181179
logscompressorfx.Module(),
182180
metricscompressorfx.Module(),
183181
diagnosefx.Module(),

cmd/agent/subcommands/jmx/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ go_library(
3939
"//comp/healthplatform",
4040
"//comp/serializer/logscompression/fx",
4141
"//comp/serializer/metricscompression/fx",
42-
"//comp/workloadbalancing/fx",
4342
"//pkg/cli/standalone",
4443
"//pkg/config/model",
4544
"//pkg/process/util/containers",

cmd/agent/subcommands/jmx/command.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import (
4646
healthplatform "github.com/DataDog/datadog-agent/comp/healthplatform"
4747
logscompression "github.com/DataDog/datadog-agent/comp/serializer/logscompression/fx"
4848
metricscompression "github.com/DataDog/datadog-agent/comp/serializer/metricscompression/fx"
49-
workloadbalancingfx "github.com/DataDog/datadog-agent/comp/workloadbalancing/fx"
5049
"github.com/DataDog/datadog-agent/pkg/cli/standalone"
5150
"github.com/DataDog/datadog-agent/pkg/config/model"
5251
proccontainers "github.com/DataDog/datadog-agent/pkg/process/util/containers"
@@ -137,7 +136,6 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
137136
proccontainers.InitSharedContainerProvider(wmeta, tagger, filterStore)
138137
}),
139138
haagentfx.Module(),
140-
workloadbalancingfx.Module(),
141139
logscompression.Module(),
142140
metricscompression.Module(),
143141
ipcfx.ModuleReadOnly(),

cmd/agent/subcommands/snmp/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ go_library(
2828
"//comp/serializer/metricscompression/fx",
2929
"//comp/snmpscan/def",
3030
"//comp/snmpscan/fx",
31-
"//comp/workloadbalancing/fx",
3231
"//pkg/networkdevice/metadata",
3332
"//pkg/snmp/analyzer",
3433
"//pkg/snmp/snmpparse",

cmd/agent/subcommands/snmp/command.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import (
4040
metricscompression "github.com/DataDog/datadog-agent/comp/serializer/metricscompression/fx"
4141
snmpscan "github.com/DataDog/datadog-agent/comp/snmpscan/def"
4242
snmpscanfx "github.com/DataDog/datadog-agent/comp/snmpscan/fx"
43-
workloadbalancingfx "github.com/DataDog/datadog-agent/comp/workloadbalancing/fx"
4443
"github.com/DataDog/datadog-agent/pkg/networkdevice/metadata"
4544
"github.com/DataDog/datadog-agent/pkg/snmp/analyzer"
4645
"github.com/DataDog/datadog-agent/pkg/snmp/snmpparse"
@@ -127,7 +126,6 @@ With --analyze, the walk is matched against SNMP device profiles and a summary r
127126
nooptagger.Module(),
128127
eventplatformreceiverimpl.Module(),
129128
haagentfx.Module(),
130-
workloadbalancingfx.Module(),
131129
metricscompression.Module(),
132130
logscompression.Module(),
133131
ipcfx.ModuleReadOnly(),
@@ -193,7 +191,6 @@ With --analyze, the walk is matched against SNMP device profiles and a summary r
193191
nooptagger.Module(),
194192
snmpscanfx.Module(),
195193
haagentfx.Module(),
196-
workloadbalancingfx.Module(),
197194
metricscompression.Module(),
198195
logscompression.Module(),
199196
ipcfx.ModuleReadOnly(),

cmd/dogstatsd/subcommands/start/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ go_library(
5151
"//comp/metadata/runner/fx",
5252
"//comp/serializer/logscompression/fx",
5353
"//comp/serializer/metricscompression/fx",
54-
"//comp/workloadbalancing/fx",
5554
"//pkg/serializer",
5655
"//pkg/status/health",
5756
"//pkg/util/coredump",

cmd/dogstatsd/subcommands/start/command.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import (
6161
metadatarunnerfx "github.com/DataDog/datadog-agent/comp/metadata/runner/fx"
6262
logscompressionfx "github.com/DataDog/datadog-agent/comp/serializer/logscompression/fx"
6363
metricscompressionfx "github.com/DataDog/datadog-agent/comp/serializer/metricscompression/fx"
64-
workloadbalancingfx "github.com/DataDog/datadog-agent/comp/workloadbalancing/fx"
6564
"github.com/DataDog/datadog-agent/pkg/serializer"
6665
"github.com/DataDog/datadog-agent/pkg/status/health"
6766
"github.com/DataDog/datadog-agent/pkg/util/coredump"
@@ -179,7 +178,6 @@ func RunDogstatsdFct(cliParams *CLIParams, defaultConfPath string, defaultLogFil
179178
}),
180179
healthprobefx.Module(),
181180
haagentfx.Module(),
182-
workloadbalancingfx.Module(),
183181
)
184182
}
185183

0 commit comments

Comments
 (0)