Alerting: Retry readiness check to the remote Alertmanager on 5xx status code responses (#81174)

This commit is contained in:
Santiago 2024-01-24 21:39:06 +01:00 committed by GitHub
parent c9ff6a9ab9
commit fbbda6c05e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ func (am *Alertmanager) IsReadyWithBackoff(ctx context.Context) (bool, error) {
}
if status != http.StatusOK {
if status/400 == 1 {
if status >= 400 && status < 500 {
am.logger.Debug("Ready check failed with non-retriable status code", "attempt", attempts, "status", status)
return false, fmt.Errorf("ready check failed with non-retriable status code %d", status)
}