Skip to content

Commit 7ec8a16

Browse files
Added - Reverting 429 retries changes which were causing regression
1 parent 648f391 commit 7ec8a16

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

internal/tfresource/retry.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,7 @@ func init() {
6565
}
6666

6767
func GetRetryBackoffDuration(response oci_common.OCIOperationResponse, disableNotFoundRetries bool, service string, startTime time.Time, optionals ...interface{}) time.Duration {
68-
backoffDuration := getRetryBackoffDurationWithExpectedRetryDurationFn(response, disableNotFoundRetries, service, startTime, getExpectedRetryDuration, optionals...)
69-
// Do nothing if service specific retry duration exists
70-
if _, ok := serviceExpectedRetryDurationMap[service]; ok {
71-
return backoffDuration
72-
}
73-
if response.Response != nil && response.Response.HTTPResponse() != nil {
74-
statusCode := response.Response.HTTPResponse().StatusCode
75-
switch statusCode {
76-
case 429:
77-
utils.Logf("[DEGUG] Handling Retry Timeout for API Response Error Code 429")
78-
utils.Logf("[DEGUG] Retry Timeout before handling API Response Error Code 429 is %s", backoffDuration)
79-
expectedRetryDuration := getExpectedRetryDuration(response, disableNotFoundRetries, service, optionals...)
80-
backoffDuration = backoffDuration + expectedRetryDuration
81-
utils.Logf("[DEGUG] Retry Timeout after handling API Response Error Code 429 is %s", backoffDuration)
82-
}
83-
}
84-
return backoffDuration
68+
return getRetryBackoffDurationWithExpectedRetryDurationFn(response, disableNotFoundRetries, service, startTime, getExpectedRetryDuration, optionals...)
8569
}
8670

8771
func getRetryBackoffDurationWithExpectedRetryDurationFn(response oci_common.OCIOperationResponse, disableNotFoundRetries bool, service string, startTime time.Time, expectedRetryDurationFn expectedRetryDurationFn, optionals ...interface{}) time.Duration {

0 commit comments

Comments
 (0)