Repository navigation
Announce the wait when the GitHub rate limit is reached - #64
Merged
Merged
Conversation
The GitHub client waits silently for the limit to reset, for up to an hour, so a run that reached it looked hung. A comment in GitHubService also claimed the limit propagated as an error, which it does not. Print a notice with the expected reset time before the unchanged wait, and suggest GITHUB_TOKEN when running anonymously. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric, scored against head
Notes:
Summary: no blocking findings. The notes above were judged acceptable for merge. This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GITHUB_TOKEN. Previously the run stalled with no output for up to an hour and looked hung.RateLimitNoticeHandlerdelegates to github-api's ownRateLimitHandler.WAITafter printing. Failing instead was rejected, because it would drop the remaining users of a daemon run until the next interval.GitHubBuilderrather thanGitHub.connectAnonymously(), since that method accepts no handler. The handler is installed on the token client, the anonymous client, and the fallback after a rejected token.GitHubServicethat said a rate limit propagates as an error was corrected.USER_GUIDE.md,COMMANDS.md(thePOST /api/backupsrequest stays open during a wait) andCHANGELOG.mdwere updated. No flag, property or endpoint was added.Closes #63
Evidence
The wait was observed by running github-api 1.318 against a loopback stub, recorded in #63. The same stub (a scratch test, not committed) was then used with the new handler. The notice was printed, the wait ran, and the retry succeeded with two requests received, so the real client does call the handler and the
X-RateLimit-Resetheader is read as expected.Not covered
GitHub's secondary (abuse) limits go through a separate default handler that also waits silently. They were left alone: the few list requests of a run are unlikely to reach them.
The reset time in the notice is approximate. The stub run resumed about 8 seconds after a reset 2 seconds ahead, so the notice says "until about".
Skipped issues
#8 (missing
LICENSEfile) was not picked: a license and copyright holder have to be chosen by the maintainer, as recorded on that issue.Test plan
mvn test: 222 tests run, 0 failures, 1 skipped (the live-token test, which needsGITHUB_TOKEN)GitHubService, the 3 new wiring tests failed; they passed again once it was restoredBuildworkflow is green on the PR head (buildanddocker-buildonb01b4ba)This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson