feat: bundle the rate limiter HTTP middleware - #2389
Conversation
Signed-off-by: Valery Piashchynski <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2389 +/- ##
==========================================
- Coverage 34.56% 34.51% -0.05%
==========================================
Files 18 18
Lines 758 759 +1
==========================================
Hits 262 262
- Misses 496 497 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The newly added e2e test’s handling of the cont.Serve() results channel can mask real plugin errors and unexpected shutdowns, so it should be corrected before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR bundles the github.com/roadrunner-server/rate-limiter/v6 plugin into RoadRunner’s default HTTP middleware set, adds reference configuration and schema support, and introduces an e2e smoke test validating the bundled middleware behavior.
Changes:
- Register the rate limiter plugin in the default container plugin set and add the new dependency to
go.mod/go.sum. - Extend the v3 configuration schema and
.rr.yamlreference config withhttp.rate_limitersettings and a newrate_limitermiddleware option. - Add an e2e HTTP smoke test and fixture config to verify
429 Too Many Requestsbehavior (includingRetry-Afterand caching headers).
File summaries
| File | Description |
|---|---|
| tests/e2e_http_test.go | Adds an e2e smoke test covering bundled rate_limiter middleware behavior. |
| tests/configs/.rr-http-rate-limiter.yaml | New e2e fixture config enabling rate_limiter middleware and settings. |
| schemas/config/3.0.schema.json | Adds rate_limiter middleware enum value and http.rate_limiter configuration schema. |
| go.mod | Adds the rate-limiter/v6 dependency. |
| go.sum | Adds checksum entries for rate-limiter/v6 v6.0.0-beta.1. |
| container/plugins.go | Bundles rate-limiter into the default plugin list. |
| CHANGELOG.md | Documents the new bundled rate_limiter HTTP middleware. |
| .rr.yaml | Adds reference settings and documentation for http.rate_limiter. |
Review details
- Files reviewed: 7/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Bundle
github.com/roadrunner-server/rate-limiter/v6atv6.0.0-beta.1.rate_limiterin the default HTTP plugin set.Documentation: roadrunner-server/docs#80.
closes: #934