Skip to content

Commit

Permalink
Merge pull request #1943 from opengovern/fix-web-ui
Browse files Browse the repository at this point in the history
fix: get CrossAccountRoleARN from labels
  • Loading branch information
artaasadi authored Nov 11, 2024
2 parents 342ca9a + 397eb0e commit 0ed4e6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/integration/api/integrations/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0ed4e6f

Please sign in to comment.