You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactors the rate limit config parsing to use joi to allow bucket and account configs to share code.
Adds account level rate limiting config key
Note for reviewers: This PR is being merged into a feature branch so the code can remain "broken" between PRs as code is refactored without impacting the development/* branches.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.14%. Comparing base (0efb995) to head (a09c5af).
✅ All tests successful. No failed tests found.
Clean refactor from manual assert-based validation to Joi schema. The shared rateLimitClassConfigSchema and transformClassConfig eliminate duplication between bucket and account config parsing. Validation behavior is preserved with improved error reporting (all errors at once via abortEarly: false). Tests are thorough and cover the new account config, unknown field rejection, and multi-error reporting.
burstCapacity and defaultBurstCapacity in rateLimitClassConfigSchema lost the .integer() constraint during the migration from assert to Joi, allowing non-integer values like 1.5 that were previously rejected. - Add .integer() to both: Joi.number().integer().positive() - Restore the removed burstCapacity-is-not-an-integer test case
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
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 PR:
Note for reviewers: This PR is being merged into a feature branch so the code can remain "broken" between PRs as code is refactored without impacting the
development/*branches.