-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: rate limit prebuilds by cloneURL #8568
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8568 +/- ##
==========================================
- Coverage 12.31% 11.17% -1.14%
==========================================
Files 20 18 -2
Lines 1161 993 -168
==========================================
- Hits 143 111 -32
+ Misses 1014 880 -134
+ Partials 4 2 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
4e8ac63
to
de567c4
Compare
/werft run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 👏
Two comments in passing. 😇
EDIT: Also, I love that this limit is configurable per cloneUrl. Thanks a lot for doing that. 💯
Reminder before this gets merged: Please try to squash your commits into one or a few logical commits with a descriptive commit message. 🙏 |
Squashed commits. |
I suppose this PR will also need documentation - around configuration of the prebuild rate limits. |
/werft run 👍 started the job as gitpod-build-af-rate-limits.40 |
@andrew-farries Alright, thanks a lot for tackling this! 🙏 I expected I would manage to finish the review quicker... but anyway, I'm through now. @easyCZ thx for the adjustments and squashing (we should really think about allowing for this/make it the default). The only thing left I see here is the migration for an index. |
Prebuilds are rate-limited to N in the last S seconds on a rolling window basis. By default, 50 prebuilds are allowed in a 1 minute window. A configuration property `prebuildLimiter` is added which controls default rate limit but allows for explicit overrides by cloneURL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks to both of you! 🙏
/unhold |
Description
Introduce a rate-limit for prebuilds.
Prebuilds are rate limited by cloneURL in the last 1 minute to X. X either comes from Config, or defaults to 50.
Related Issue(s)
Fixes #5176
How to test
Same instructions as #8504
server-configmap.yaml
on your preview and a special rate limit for your clone URLTests
With a rate limit of 10:

Release Notes
Documentation