Repository navigation
Improve behavior when rate-limit is exhaused + add rate-limit visibility - #28
Merged
rkosegi merged 1 commit intoNov 23, 2026
Merged
Conversation
This commit adds retries with exponential backoff for API calls that hit the rate-limit. It also adds a way for the caller to have visibility into the Rate-Limits, so the 429s do not necessarily come as a surprise. The RateLimitBuckets object is optional (old code will continue working as before) and can be provided only when visibility into the budget left in the rate-limit quota is desired.
|
rkosegi
approved these changes
Nov 23, 2026
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.



This commit adds retries with exponential backoff for API calls that hit the rate-limit.
It also adds a way for the caller to have visibility into the Rate-Limits, so the 429s do not necessarily come as a surprise. The RateLimitBuckets object is optional (old code will continue working as before) and can be provided only when visibility into the budget left in the rate-limit quota is desired.
Testing
I built this change into a local version of the Jenkins Hetzner Cloud plugin and it is working well (and enabling me to display a small widget showing the last-seen rate limit snapshot).
Concerning the existence of two separate buckets (one of the
/actionsendpoints, and one for the rest), this was verified experimentally by running the following scripts:Rate limit testing script
Script checking if all of the /actions endpoints indeed share a single rate-limit bucket