From 397eb0e89557443ae94a567d0b467825f05f8e08 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Tue, 12 Nov 2024 00:24:53 +0100 Subject: [PATCH] fix: get CrossAccountRoleARN from labels --- services/integration/api/integrations/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/integration/api/integrations/api.go b/services/integration/api/integrations/api.go index fe7b7fd57..e161c9082 100644 --- a/services/integration/api/integrations/api.go +++ b/services/integration/api/integrations/api.go @@ -207,7 +207,7 @@ func (h API) DiscoverIntegrations(c echo.Context) error { return echo.NewHTTPError(http.StatusInternalServerError, "failed to create integration api") } - healthy, err := integration.HealthCheck(jsonData, integrationAPI.ProviderID, integrationAPI.Labels) + healthy, err := integration.HealthCheck(jsonData, integrationAPI.ProviderID, integrationAPI.Labels, integrationAPI.Annotations) if err != nil || !healthy { h.logger.Info("integration is not healthy", zap.String("integration_id", i.IntegrationID.String()), zap.Error(err)) integrationAPI.State = models.IntegrationStateInactive @@ -300,7 +300,7 @@ func (h API) AddIntegrations(c echo.Context) error { h.logger.Error("failed to create integration api", zap.Error(err)) return echo.NewHTTPError(http.StatusInternalServerError, "failed to create integration api") } - healthy, err := integration.HealthCheck(jsonData, i.ProviderID, iApi.Annotations) + healthy, err := integration.HealthCheck(jsonData, i.ProviderID, iApi.Labels, iApi.Annotations) if err != nil || !healthy { h.logger.Info("integration is not healthy", zap.String("integration_id", i.IntegrationID.String()), zap.Error(err)) i.State = models2.IntegrationStateInactive @@ -379,7 +379,7 @@ func (h API) IntegrationHealthcheck(c echo.Context) error { return echo.NewHTTPError(http.StatusInternalServerError, "failed to create integration api") } - healthy, err := integrationType.HealthCheck(jsonData, integrationApi.ProviderID, integrationApi.Labels) + healthy, err := integrationType.HealthCheck(jsonData, integrationApi.ProviderID, integrationApi.Labels, integrationApi.Annotations) if err != nil || !healthy { h.logger.Error("healthcheck failed", zap.Error(err)) if integration.State != models2.IntegrationStateArchived {