豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Resubmit #4381#4395

Merged
mjbvz merged 4 commits intomicrosoft:mainfrom
mjbvz:itsibitzi/20260312-update-quota-ratelimit
Mar 13, 2026
Merged

Resubmit #4381#4395
mjbvz merged 4 commits intomicrosoft:mainfrom
mjbvz:itsibitzi/20260312-update-quota-ratelimit

Conversation

@mjbvz
Copy link
Copy Markdown
Contributor

@mjbvz mjbvz commented Mar 13, 2026

Submitting #4381 with merge conflicts fixed since I can't push to the original branch

Copilot AI review requested due to automatic review settings March 13, 2026 06:29
@mjbvz mjbvz mentioned this pull request Mar 13, 2026
@mjbvz mjbvz enabled auto-merge March 13, 2026 06:29
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Resubmission of #4381 to introduce a client-side, multi-bucket rate limiter for GitHub API requests, allowing different RPC classes to be throttled independently based on server-provided quota bucket headers.

Changes:

  • Added support for the x-github-quota-bucket-name response header and introduced endpoint→bucket learning.
  • Reworked throttling to be per quota-bucket (shared across endpoints) and removed the background cleanup timer in favor of explicit window cleanup.
  • Adjusted lifecycle management (removed interval-based disposals; updated service dispose behavior and internal maps).

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/platform/github/common/githubApiFetcherService.ts
Comment thread src/platform/github/common/githubApiFetcherService.ts Outdated
Comment thread src/platform/github/common/githubApiFetcherService.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Resubmission of #4381 that updates GithubApiFetcherService to support multi-bucket, client-side rate limiting based on server-provided quota bucket headers, aligning throttling behavior with per-RPC quotas.

Changes:

  • Add support for x-github-quota-bucket-name and learn per-endpoint quota buckets from responses.
  • Replace periodic sliding-window cleanup with explicit cleanup on throttle decisions and add a “slow start” ramp-up.
  • Refactor throttler lifecycle management (remove interval/dispose behavior; keep throttlers in maps keyed by bucket).

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/platform/github/common/githubApiFetcherService.ts
Comment thread src/platform/github/common/githubApiFetcherService.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mjbvz mjbvz added this pull request to the merge queue Mar 13, 2026
Merged via the queue into microsoft:main with commit 4cfbad9 Mar 13, 2026
8 of 9 checks passed
@mjbvz mjbvz deleted the itsibitzi/20260312-update-quota-ratelimit branch March 13, 2026 07:59
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.

4 participants