Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

feat: delay by default #568

Merged
merged 1 commit into from
Jan 15, 2022
Merged

feat: delay by default #568

merged 1 commit into from
Jan 15, 2022

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Jan 15, 2022

Background

Having done some testing, I'm pretty convinced it's unlikely users are easily hitting the 5000 request per-hour quota. I think what's instead happening is a secondary quota that occurs, either:

  • due to too many concurrent requests (which can be controlled with --concurrency), or.
  • due to too many requests in a short period of time (perhaps due to fast home Internet?), or.
  • perhaps some ISPs are themselves triggering a 403?

In pursuit of unblocking people

  1. this PR defaults the delay between requests to 500ms, and introduces a jitter, such that even when running requests in parallel there should be some separation between them.
  2. feat: introduce retry and delay configuration #563 introduces retry logic (enabled via --retry) which when turned on will retry spurious 403s several times. It also documents --concurrency which I recommend adjusting to see if 403s stop cropping up.
  3. feat: detailed debugging now configured with NODE_DEBUG=repo #567 adds logging of GitHub ratelimit headers, enabled via NODE_DEBUG=repo repo foo, I suggest users bumping into issues set this environment variable to confirm the hypothesis about the source of 403s.

Refs: #556

@bcoe bcoe requested a review from a team as a code owner January 15, 2022 17:13
@JustinBeckwith JustinBeckwith merged commit 2e522e4 into main Jan 15, 2022
@JustinBeckwith JustinBeckwith deleted the delay-jitter branch January 15, 2022 18:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants