fix: return an error from CheckForUpdate instead of conflating failure with no-update - #242
Conversation
…e with no-update CheckForUpdate now returns (string, error) so callers can distinguish "no newer version" from "the check itself failed". HTTP/API failures are wrapped and logged by the TUI update check instead of being silently swallowed. Closes DevopsArtFactory#206 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BFhLrnpVxivu62cC3k9NZB
|
Warning Review limit reached
Next review available in: 30 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Recreated as #255 from an in-repo branch under the maintainer account; this PR is superseded. |
Summary
Implements #206:
CheckForUpdate()returned an empty string for both "you are on the latest version" and "the update check failed", so broken checks were silently swallowed.CheckForUpdate(currentVersion string) (string, error); HTTP/API/parse failures are wrapped asupdate check failed: ....internal/app/app.go) logs the error through the structured logger and still proceeds with an empty version, so startup behavior is unchanged for users.("", nil).Testing
go test ./...passes; new tests cover the error path (wrapped error, empty version) and the newer-version path via a seam for the GitHub API call.Closes #206