Skip to content

Commit

Permalink
Fi missing autodiscovery component in agent diagnose command (#24604)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogaca-dd authored Apr 11, 2024
1 parent 09c6ece commit 23533d4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/agent/subcommands/diagnose/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
}
}),
fx.Supply(optional.NewNoneOption[collector.Component]()),
workloadmeta.OptionalModule(),
tagger.OptionalModule(),
autodiscoveryimpl.OptionalModule(),
workloadmeta.Module(),
tagger.Module(),
fx.Provide(func(config config.Component) tagger.Params { return tagger.NewTaggerParamsForCoreAgent(config) }),
autodiscoveryimpl.Module(),
compressionimpl.Module(),
diagnosesendermanagerimpl.Module(),
)
Expand Down Expand Up @@ -236,8 +237,7 @@ This command print the package-signing metadata payload. This payload is used by
func cmdDiagnose(cliParams *cliParams,
senderManager diagnosesendermanager.Component,
wmeta optional.Option[workloadmeta.Component],
_ optional.Option[tagger.Component],
ac optional.Option[autodiscovery.Component],
ac autodiscovery.Component,
collector optional.Option[collector.Component],
secretResolver secrets.Component) error {
diagCfg := diagnosis.Config{
Expand All @@ -247,7 +247,7 @@ func cmdDiagnose(cliParams *cliParams,
Exclude: cliParams.exclude,
}

diagnoseDeps := diagnose.NewSuitesDeps(senderManager, collector, secretResolver, wmeta, ac)
diagnoseDeps := diagnose.NewSuitesDeps(senderManager, collector, secretResolver, wmeta, optional.NewOption(ac))
// Is it List command
if cliParams.listSuites {
diagnose.ListStdOut(color.Output, diagCfg, diagnoseDeps)
Expand Down

0 comments on commit 23533d4

Please sign in to comment.