feature: adopt retry-go for HTTP retry logic - #51
Conversation
PR Summary by QodoAdopt retry-go for catalog HTTP retries
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
|
🤖 Finished Review · ✅ Success · Started 5:14 PM UTC · Completed 5:30 PM UTC |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
ReviewFindingsLow
Previous runReviewFindingsLow
Previous run (2)ReviewFindingsLow
Labels: PR implements a feature (retry-go adoption) in the PLCC client package |
|
🤖 Finished Review · ✅ Success · Started 1:46 PM UTC · Completed 1:59 PM UTC |
Replace manual sleep-based retry loop in FetchFrom() with github.com/avast/retry-go/v4. Preserves 3 attempts with exponential backoff (60s initial delay). Tests override via retryOptions variable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Francesco Giudici <fgiudici@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 4:05 PM UTC · Completed 4:20 PM UTC |
| return fetch(url, client) | ||
| }, retryOptions...) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("after retries: %w", err) |
There was a problem hiding this comment.
[low] error-message-change
The error message changed from 'after 3 attempts: ' to 'after retries: ', losing the attempt count from the diagnostic message. No downstream code or test depends on this exact text, and the underlying error is still properly wrapped via %w, so errors.Is/errors.As continue to work. This is a minor loss of information in error diagnostics that could be useful when debugging production failures.
Suggested fix: Consider preserving the attempt count, e.g. fmt.Errorf("after 3 attempts: %w", err).
Replace manual sleep-based retry loop in FetchFrom() with github.com/avast/retry-go/v4.
Preserves 3 attempts with exponential backoff (60s initial delay).
Tests override via retryOptions variable.
Fixes #5