Skip to content

Commit

Permalink
reverting the runner changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LiniSusan committed Feb 9, 2024
1 parent cd90f3a commit 8696c0f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions pkg/util/steps/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ package steps

import (
"context"
"fmt"
"net/http"
"reflect"
"runtime"
"strings"
Expand All @@ -15,7 +13,6 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/sirupsen/logrus"

"github.com/Azure/ARO-RP/pkg/api"
msgraph_errors "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models/odataerrors"
)

Expand Down Expand Up @@ -57,16 +54,6 @@ func Run(ctx context.Context, log *logrus.Entry, pollInterval time.Duration, ste

if err != nil {
log.Errorf("step %s encountered error: %s", step, err.Error())
if strings.Contains(err.Error(), "ThrottlingLimitExceeded") || strings.Contains(err.Error(), "TooManyRequests") {
correlation_id := fmt.Sprintf("%v", log.Data["correlation_id"])
message := fmt.Sprintf("Requests are being throttled due to Azure Storage limits being exceeded. Please visit https://learn.microsoft.com/en-us/azure/openshift/troubleshoot#exceeding-azure-storage-limits for more details. CorrelationId: " + correlation_id)
err = api.NewCloudError(
http.StatusTooManyRequests,
api.CloudErrorCodeThrottlingLimitExceeded,
"",
message)
return nil, err
}
if oDataError, ok := err.(msgraph_errors.ODataErrorable); ok {
spew.Fdump(log.Writer(), oDataError.GetErrorEscaped())
}
Expand Down

0 comments on commit 8696c0f

Please sign in to comment.