Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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]>
- Loading branch information