Add a 5x exponential backoff on 429s & 5xxs to the webhook Authenticator/Authorizer.
This commit is contained in:
@@ -183,7 +183,7 @@ current-context: default
|
||||
return fmt.Errorf("failed to execute test template: %v", err)
|
||||
}
|
||||
// Create a new authorizer
|
||||
_, err = New(p, 0, 0)
|
||||
_, err = newWithBackoff(p, 0, 0, 0)
|
||||
return err
|
||||
}()
|
||||
if err != nil && !tt.wantErr {
|
||||
@@ -291,7 +291,7 @@ func newAuthorizer(callbackURL string, clientCert, clientKey, ca []byte, cacheTi
|
||||
if err := json.NewEncoder(tempfile).Encode(config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return New(p, cacheTime, cacheTime)
|
||||
return newWithBackoff(p, cacheTime, cacheTime, 0)
|
||||
}
|
||||
|
||||
func TestTLSConfig(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user