-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TT-11371] Move leaky-bucket behind the dev build flag (5.3.0) #6073
[TT-11371] Move leaky-bucket behind the dev build flag (5.3.0) #6073
Conversation
API Changes --- prev.txt 2024-02-26 16:48:46.784954527 +0000
+++ current.txt 2024-02-26 16:48:44.020946839 +0000
@@ -5540,15 +5540,6 @@
GetOAuthTokensPurgeInterval returns purge interval for lapsed OAuth tokens.
type RateLimit struct {
- // EnableLeakyBucketRateLimiter enables leaky bucket rate limiting.
- //
- // LeakyBucket will delay requests so they are processed in a FIFO
- // style queue, ensuring a constant request rate and smoothing out
- // traffic spikes. This comes at some cost to gateway instances, as
- // the connections would be held for a longer time, instead of
- // blocking the requests when they go over the defined rate limits.
- EnableLeakyBucketRateLimiter bool `json:"enable_leaky_bucket_rate_limiter"`
-
// Redis based rate limiter with fixed window. Provides 100% rate limiting accuracy, but require two additional Redis roundtrip for each request.
EnableRedisRollingLimiter bool `json:"enable_redis_rolling_limiter"`
|
PR Description updated to latest commit (f46d226) |
PR Review
Code feedback:
✨ Review tool usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
With a configuration file, use the following template:
See the improve usage page for a more comprehensive guide on using this tool. |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
1 similar comment
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
API tests result - postgres15-sha256 env: success ✅ |
API tests result - mongo44-sha256 env: success ✅ |
d897b08
to
c42a414
Compare
Quality Gate passedIssues Measures |
/release to release-5.3 |
Working on it! Note that it can take a few minutes. |
## **User description** https://tyktech.atlassian.net/browse/TT-11371 ___ ## **Type** enhancement, configuration changes ___ ## **Description** - Moved the Leaky Bucket rate limiter configuration behind a development build flag. - Removed the Leaky Bucket rate limiter option from the main configuration, making it exclusive to development builds. - Updated tests and internal logic to reflect the removal of the Leaky Bucket rate limiter from the main configuration. - Adjusted CLI linter schema to remove references to the now development-only Leaky Bucket rate limiter. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>development.go</strong><dd><code>Add Leaky Bucket Rate Limiter to Development Config</code> </dd></summary> <hr> config/development.go <li>Added <code>EnableLeakyBucketRateLimiter</code> configuration option to <br><code>DevelopmentConfig</code>.<br> </details> </td> <td><a href="https://pull/6073/files#diff-d2253d9377e5163d9de068a2df71738383fb97e0b07b64482404a83610cd53b8">+9/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>rate_limit.go</strong><dd><code>Remove Leaky Bucket Rate Limiter from Main Config</code> </dd></summary> <hr> config/rate_limit.go <li>Removed <code>EnableLeakyBucketRateLimiter</code> from <code>RateLimit</code> struct.<br> <li> Adjusted string representation logic for rate limiters.<br> </details> </td> <td><a href="https://pull/6073/files#diff-375bf116f8d6527c50d7591d7cb01e8f821b22df4a4ca18b4da4c6f0d526f18e">+0/-13</a> </td> </tr> <tr> <td> <details> <summary><strong>rate_nodev.go</strong><dd><code>Adjust Rate Limiter Handling for Release Builds</code> </dd></summary> <hr> internal/rate/rate_nodev.go - Removed Leaky Bucket rate limiter handling for release builds. </details> </td> <td><a href="https://pull/6073/files#diff-5c08f4f86a19b6cc3d2ee94a0253749acc927b606b1c56d6b73aee46547cf4f7">+0/-3</a> </td> </tr> <tr> <td> <details> <summary><strong>schema.json</strong><dd><code>Update CLI Linter Schema</code> </dd></summary> <hr> cli/linter/schema.json - Removed JSON schema entries related to Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-103cec746d3e61d391c5a67c171963f66fea65d651d704d5540e60aa5d574f46">+0/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>mw_rate_limiting_test.go</strong><dd><code>Update Rate Limiting Middleware Tests</code> </dd></summary> <hr> gateway/mw_rate_limiting_test.go - Removed test case setup for Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-7cf2199231924147d538ba7ad576a48a3c0e691852077e147c9b2d86ba9b7c4d">+0/-2</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --------- Co-authored-by: Tit Petric <[email protected]> (cherry picked from commit 485ebf8)
…uild flag (5.3.0) (#6073) [TT-11371] Move leaky-bucket behind the dev build flag (5.3.0) (#6073) ## **User description** https://tyktech.atlassian.net/browse/TT-11371 ___ ## **Type** enhancement, configuration changes ___ ## **Description** - Moved the Leaky Bucket rate limiter configuration behind a development build flag. - Removed the Leaky Bucket rate limiter option from the main configuration, making it exclusive to development builds. - Updated tests and internal logic to reflect the removal of the Leaky Bucket rate limiter from the main configuration. - Adjusted CLI linter schema to remove references to the now development-only Leaky Bucket rate limiter. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>development.go</strong><dd><code>Add Leaky Bucket Rate Limiter to Development Config</code> </dd></summary> <hr> config/development.go <li>Added <code>EnableLeakyBucketRateLimiter</code> configuration option to <br><code>DevelopmentConfig</code>.<br> </details> </td> <td><a href="https://pull/6073/files#diff-d2253d9377e5163d9de068a2df71738383fb97e0b07b64482404a83610cd53b8">+9/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>rate_limit.go</strong><dd><code>Remove Leaky Bucket Rate Limiter from Main Config</code> </dd></summary> <hr> config/rate_limit.go <li>Removed <code>EnableLeakyBucketRateLimiter</code> from <code>RateLimit</code> struct.<br> <li> Adjusted string representation logic for rate limiters.<br> </details> </td> <td><a href="https://pull/6073/files#diff-375bf116f8d6527c50d7591d7cb01e8f821b22df4a4ca18b4da4c6f0d526f18e">+0/-13</a> </td> </tr> <tr> <td> <details> <summary><strong>rate_nodev.go</strong><dd><code>Adjust Rate Limiter Handling for Release Builds</code> </dd></summary> <hr> internal/rate/rate_nodev.go - Removed Leaky Bucket rate limiter handling for release builds. </details> </td> <td><a href="https://pull/6073/files#diff-5c08f4f86a19b6cc3d2ee94a0253749acc927b606b1c56d6b73aee46547cf4f7">+0/-3</a> </td> </tr> <tr> <td> <details> <summary><strong>schema.json</strong><dd><code>Update CLI Linter Schema</code> </dd></summary> <hr> cli/linter/schema.json - Removed JSON schema entries related to Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-103cec746d3e61d391c5a67c171963f66fea65d651d704d5540e60aa5d574f46">+0/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>mw_rate_limiting_test.go</strong><dd><code>Update Rate Limiting Middleware Tests</code> </dd></summary> <hr> gateway/mw_rate_limiting_test.go - Removed test case setup for Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-7cf2199231924147d538ba7ad576a48a3c0e691852077e147c9b2d86ba9b7c4d">+0/-2</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --------- Co-authored-by: Tit Petric <[email protected]>
Still working... |
@titpetric Succesfully merged PR |
/release to release-5.3.0 |
Working on it! Note that it can take a few minutes. |
## **User description** https://tyktech.atlassian.net/browse/TT-11371 ___ ## **Type** enhancement, configuration changes ___ ## **Description** - Moved the Leaky Bucket rate limiter configuration behind a development build flag. - Removed the Leaky Bucket rate limiter option from the main configuration, making it exclusive to development builds. - Updated tests and internal logic to reflect the removal of the Leaky Bucket rate limiter from the main configuration. - Adjusted CLI linter schema to remove references to the now development-only Leaky Bucket rate limiter. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>development.go</strong><dd><code>Add Leaky Bucket Rate Limiter to Development Config</code> </dd></summary> <hr> config/development.go <li>Added <code>EnableLeakyBucketRateLimiter</code> configuration option to <br><code>DevelopmentConfig</code>.<br> </details> </td> <td><a href="https://pull/6073/files#diff-d2253d9377e5163d9de068a2df71738383fb97e0b07b64482404a83610cd53b8">+9/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>rate_limit.go</strong><dd><code>Remove Leaky Bucket Rate Limiter from Main Config</code> </dd></summary> <hr> config/rate_limit.go <li>Removed <code>EnableLeakyBucketRateLimiter</code> from <code>RateLimit</code> struct.<br> <li> Adjusted string representation logic for rate limiters.<br> </details> </td> <td><a href="https://pull/6073/files#diff-375bf116f8d6527c50d7591d7cb01e8f821b22df4a4ca18b4da4c6f0d526f18e">+0/-13</a> </td> </tr> <tr> <td> <details> <summary><strong>rate_nodev.go</strong><dd><code>Adjust Rate Limiter Handling for Release Builds</code> </dd></summary> <hr> internal/rate/rate_nodev.go - Removed Leaky Bucket rate limiter handling for release builds. </details> </td> <td><a href="https://pull/6073/files#diff-5c08f4f86a19b6cc3d2ee94a0253749acc927b606b1c56d6b73aee46547cf4f7">+0/-3</a> </td> </tr> <tr> <td> <details> <summary><strong>schema.json</strong><dd><code>Update CLI Linter Schema</code> </dd></summary> <hr> cli/linter/schema.json - Removed JSON schema entries related to Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-103cec746d3e61d391c5a67c171963f66fea65d651d704d5540e60aa5d574f46">+0/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>mw_rate_limiting_test.go</strong><dd><code>Update Rate Limiting Middleware Tests</code> </dd></summary> <hr> gateway/mw_rate_limiting_test.go - Removed test case setup for Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-7cf2199231924147d538ba7ad576a48a3c0e691852077e147c9b2d86ba9b7c4d">+0/-2</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --------- Co-authored-by: Tit Petric <[email protected]> (cherry picked from commit 485ebf8)
… build flag (5.3.0) (#6073) [TT-11371] Move leaky-bucket behind the dev build flag (5.3.0) (#6073) ## **User description** https://tyktech.atlassian.net/browse/TT-11371 ___ ## **Type** enhancement, configuration changes ___ ## **Description** - Moved the Leaky Bucket rate limiter configuration behind a development build flag. - Removed the Leaky Bucket rate limiter option from the main configuration, making it exclusive to development builds. - Updated tests and internal logic to reflect the removal of the Leaky Bucket rate limiter from the main configuration. - Adjusted CLI linter schema to remove references to the now development-only Leaky Bucket rate limiter. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>development.go</strong><dd><code>Add Leaky Bucket Rate Limiter to Development Config</code> </dd></summary> <hr> config/development.go <li>Added <code>EnableLeakyBucketRateLimiter</code> configuration option to <br><code>DevelopmentConfig</code>.<br> </details> </td> <td><a href="https://pull/6073/files#diff-d2253d9377e5163d9de068a2df71738383fb97e0b07b64482404a83610cd53b8">+9/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>rate_limit.go</strong><dd><code>Remove Leaky Bucket Rate Limiter from Main Config</code> </dd></summary> <hr> config/rate_limit.go <li>Removed <code>EnableLeakyBucketRateLimiter</code> from <code>RateLimit</code> struct.<br> <li> Adjusted string representation logic for rate limiters.<br> </details> </td> <td><a href="https://pull/6073/files#diff-375bf116f8d6527c50d7591d7cb01e8f821b22df4a4ca18b4da4c6f0d526f18e">+0/-13</a> </td> </tr> <tr> <td> <details> <summary><strong>rate_nodev.go</strong><dd><code>Adjust Rate Limiter Handling for Release Builds</code> </dd></summary> <hr> internal/rate/rate_nodev.go - Removed Leaky Bucket rate limiter handling for release builds. </details> </td> <td><a href="https://pull/6073/files#diff-5c08f4f86a19b6cc3d2ee94a0253749acc927b606b1c56d6b73aee46547cf4f7">+0/-3</a> </td> </tr> <tr> <td> <details> <summary><strong>schema.json</strong><dd><code>Update CLI Linter Schema</code> </dd></summary> <hr> cli/linter/schema.json - Removed JSON schema entries related to Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-103cec746d3e61d391c5a67c171963f66fea65d651d704d5540e60aa5d574f46">+0/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>mw_rate_limiting_test.go</strong><dd><code>Update Rate Limiting Middleware Tests</code> </dd></summary> <hr> gateway/mw_rate_limiting_test.go - Removed test case setup for Leaky Bucket rate limiter. </details> </td> <td><a href="https://pull/6073/files#diff-7cf2199231924147d538ba7ad576a48a3c0e691852077e147c9b2d86ba9b7c4d">+0/-2</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --------- Co-authored-by: Tit Petric <[email protected]>
@titpetric Succesfully merged PR |
API tests result - postgres15-murmur64 env: success ✅ |
API tests result - mongo44-murmur64 env: success ✅ |
User description
https://tyktech.atlassian.net/browse/TT-11371
Type
enhancement, configuration changes
Description
Changes walkthrough
development.go
Add Leaky Bucket Rate Limiter to Development Config
config/development.go
EnableLeakyBucketRateLimiter
configuration option toDevelopmentConfig
.rate_limit.go
Remove Leaky Bucket Rate Limiter from Main Config
config/rate_limit.go
EnableLeakyBucketRateLimiter
fromRateLimit
struct.rate_nodev.go
Adjust Rate Limiter Handling for Release Builds
internal/rate/rate_nodev.go
schema.json
Update CLI Linter Schema
cli/linter/schema.json
mw_rate_limiting_test.go
Update Rate Limiting Middleware Tests
gateway/mw_rate_limiting_test.go