Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaasman00 committed Dec 10, 2024
1 parent 72cc91c commit a617b26
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/opampsupervisor/supervisor/supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1013,14 +1013,17 @@ func (s *Supervisor) startAgent() (agentStartStatus, error) {
s.logger.Info("No config present, not starting agent.")
// need to manually trigger updating effective config
s.effectiveConfig.Store(s.cfgState.Load().(*configState).mergedConfig)
s.opampClient.UpdateEffectiveConfig(context.Background())
err := s.opampClient.UpdateEffectiveConfig(context.Background())
if err != nil {
s.logger.Error("The OpAMP client failed to update the effective config", zap.Error(err))
}
return agentNotStarting, nil
}

err := s.commander.Start(context.Background())
if err != nil {
s.logger.Error("Cannot start the agent", zap.Error(err))
startErr := fmt.Errorf("Cannot start the agent: %v", err)
startErr := fmt.Errorf("Cannot start the agent: %w", err)
err = s.opampClient.SetHealth(&protobufs.ComponentHealth{Healthy: false, LastError: startErr.Error()})
if err != nil {
s.logger.Error("Failed to report OpAMP client health", zap.Error(err))
Expand Down

0 comments on commit a617b26

Please sign in to comment.