fix(deps): update avast/retry-go to v5

The v5 API replaces retry.Do(fn, opts...) with retry.New(opts...).Do(fn).
The retry call in proxy.go uses the new form with the same options.
This commit is contained in:
2026-10-04 10:15:21 +01:00
parent 67cc71bbf8
commit 02780d942c
3 changed files with 9 additions and 7 deletions
+5 -6
View File
@@ -17,7 +17,7 @@ import (
"go.opentelemetry.io/otel/trace"
"github.com/avast/retry-go/v4"
"github.com/avast/retry-go/v5"
"github.com/gofiber/fiber/v3"
libpack_cache "github.com/lukaszraczylo/graphql-monitoring-proxy/cache"
libpack_logger "github.com/lukaszraczylo/graphql-monitoring-proxy/logging"
@@ -978,10 +978,7 @@ func performProxyRequestWithEnhancedRetries(c fiber.Ctx, proxyURL string, backen
maxDelayTime = time.Duration(maxDelayMs) * time.Millisecond
}
return retry.Do(
func() error {
return executeProxyAttempt(c, req)
},
return retry.New(
retry.Attempts(attempts),
retry.DelayType(retry.BackOffDelay),
retry.Delay(initialDelay),
@@ -1056,7 +1053,9 @@ func performProxyRequestWithEnhancedRetries(c fiber.Ctx, proxyURL string, backen
}
return true
}),
)
).Do(func() error {
return executeProxyAttempt(c, req)
})
}
// isConnectionError checks if the error is a connection-related error