Skip to content

fix: gitter falls back to reclone too often - #5890

Open
Ly-Joey wants to merge 7 commits into
masterfrom
fix-gitter-reclone-too-much
Open

fix: gitter falls back to reclone too often#5890
Ly-Joey wants to merge 7 commits into
masterfrom
fix-gitter-reclone-too-much

Conversation

@Ly-Joey

@Ly-Joey Ly-Joey commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Currently, when a fetch fails for any reason, gitter basically immediately falls back to doing a full reclone of the repository as recovery.
But this is problematic when the failure is due to upstream issues, such as getting rate-limited or when the remote server has an intermittent failure (we've seen some upstream OOM in our logs).

This PR:

  • adds better error classification with helper to attempt to extract HTTP status code from the error output
  • update the refreshRepo function to skip reclone fallback when it's a rate-limit or upstream error.
  • a new home for all the error-related logic and tests

Fixes: #5807


Stack created with GitHub Stacks CLIGive Feedback 💬

@Ly-Joey
Ly-Joey force-pushed the fix-gitter-reclone-too-much branch 2 times, most recently from ceb5156 to 79cc3de Compare August 24, 2026 03:52
@Ly-Joey
Ly-Joey requested a review from another-rex August 24, 2026 03:57
Comment thread go/cmd/gitter/errors.go Outdated
@Ly-Joey
Ly-Joey requested a review from another-rex August 24, 2026 04:16

@another-rex another-rex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, some small notes

Comment thread go/cmd/gitter/errors.go Outdated
Comment thread go/cmd/gitter/errors.go
Comment thread go/cmd/gitter/errors.go
Comment thread go/cmd/gitter/git.go Outdated
@Ly-Joey
Ly-Joey force-pushed the fix-gitter-reclone-too-much branch from b7f1ad4 to b789eb0 Compare August 24, 2026 06:34
@Ly-Joey
Ly-Joey requested a review from another-rex August 25, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gitter: Less aggressive reclone fallback

2 participants