diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go index c70b67e941..271ab0acac 100644 --- a/managed/services/inventory/agents.go +++ b/managed/services/inventory/agents.go @@ -271,10 +271,10 @@ func (as *AgentsService) AddMySQLdExporter(ctx context.Context, req *inventorypb if err = as.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row) @@ -336,10 +336,10 @@ func (as *AgentsService) AddMongoDBExporter(ctx context.Context, req *inventoryp if err = as.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row) @@ -530,10 +530,10 @@ func (as *AgentsService) AddPostgresExporter(ctx context.Context, req *inventory if err = as.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row) @@ -658,10 +658,10 @@ func (as *AgentsService) AddProxySQLExporter(ctx context.Context, req *inventory if err = as.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row) diff --git a/managed/services/management/mongodb.go b/managed/services/management/mongodb.go index 3020c14a2a..450b526fd4 100644 --- a/managed/services/management/mongodb.go +++ b/managed/services/management/mongodb.go @@ -105,10 +105,10 @@ func (s *MongoDBService) Add(ctx context.Context, req *managementpb.AddMongoDBRe if err = s.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = s.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = s.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row) diff --git a/managed/services/management/postgresql.go b/managed/services/management/postgresql.go index 910bc34cdc..33e7c002ef 100644 --- a/managed/services/management/postgresql.go +++ b/managed/services/management/postgresql.go @@ -103,10 +103,10 @@ func (s *PostgreSQLService) Add(ctx context.Context, req *managementpb.AddPostgr if err = s.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = s.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = s.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row) diff --git a/managed/services/management/proxysql.go b/managed/services/management/proxysql.go index 2c89d32216..b6809c925a 100644 --- a/managed/services/management/proxysql.go +++ b/managed/services/management/proxysql.go @@ -100,10 +100,10 @@ func (s *ProxySQLService) Add(ctx context.Context, req *managementpb.AddProxySQL if err = s.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { return err } - } - if err = s.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { - return err + if err = s.sib.GetInfoFromService(ctx, tx.Querier, service, row); err != nil { + return err + } } agent, err := services.ToAPIAgent(tx.Querier, row)