🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

fix(gitlab): stop deriving the client rate limit from response headers - #10878

Merged
olblak merged 1 commit into
updatecli:mainfrom
olblak:fix/gitlab/ratelimit
Oct 16, 2026
Merged

olblak merged 1 commit into
updatecli:mainfrom
olblak:fix/gitlab/ratelimit

Conversation

@olblak

@olblak olblak commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

The GitLab client configures its limiter from the first response's Ratelimit-Limit header, read as requests per minute. gitlab.com now also answers unauthenticated calls from an unauthenticated_traffic_per_ip throttle reporting a limit of 1, which the client turns into one request every ninety seconds. Any second request under the 30 seconds search timeout, such as a second page of tags or releases, then failed with "rate: Wait(n=1) would exceed context deadline".

The client limiter is now disabled and rate limiting is left to the server: 429 responses are still retried with backoff.

Fix #XXX

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/resources/gitlab
go test

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.
  • I have tested this pull request manually with a custom Updatecli build and it works as expected.

Tradeoff

Potential improvement

Summary by CodeRabbit

  • Performance
    • The GitLab client no longer applies the library’s default rate limiting.

The GitLab client configures its limiter from the first response's
Ratelimit-Limit header, read as requests per minute. gitlab.com now
also answers unauthenticated calls from an unauthenticated_traffic_per_ip
throttle reporting a limit of 1, which the client turns into one request
every ninety seconds. Any second request under the 30 seconds search
timeout, such as a second page of tags or releases, then failed with
"rate: Wait(n=1) would exceed context deadline".

The client limiter is now disabled and rate limiting is left to the
server: 429 responses are still retried with backoff.

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added bug Something isn't working scm-gitlab action-gitlab labels Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 719bd90a-bb55-4aab-a64a-143aef7631f8
📥 Commits

Reviewing files that changed from the base of the PR and between b6ec282 and d8d1f2c.

📒 Files selected for processing: 1
  • pkg/plugins/resources/gitlab/client/main.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The GitLab client now uses an infinite-rate custom limiter instead of the library’s default limiter. Client creation errors retain the same wrapped error.

Changes: GitLab client rate limiting

Layer / File(s) Summary
Configure the client rate limiter
pkg/plugins/resources/gitlab/client/main.go
New configures the GitLab client with an infinite-rate custom limiter. It imports golang.org/x/time/rate.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: chrxmvtik

Merge Risk: ⚪ Minimal · up to d8d1f

The reported change removes client-side pacing derived from response headers, matching the stated goal. No concrete merge-blocking regression is identified in the supplied review context; normal checks remain appropriate.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: stopping client rate-limit derivation from GitLab response headers.
Description check Passed The description explains the problem, the implemented change, and the testing command. The issue reference, checklist items, tradeoff, and potential improvement sections still use placeholders or rema…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, the implemented change, and the testing command. The issue reference, checklist items, tradeoff, and potential improvement sections still use placeholders or remain incomplete, but these omissions are non-critical.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@olblak
olblak merged commit f95a40a into updatecli:main Oct 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-gitlab bug Something isn't working scm-gitlab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant