-
Notifications
You must be signed in to change notification settings - Fork 76
feat: add possibility to fail open on storage error #140
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @goetas, First off, I really appreciate your maintenance work. Wish you nice holidays, |
|
hi, your change looks great. however I'm really afraid of the backward compatibility of all the other unrelated addition you did in your PR (I mean all the additional type checks). |
|
Hi @goetas, Thanks for the swift reply. I'll see if I can split off the refactorings into a separate PR. And I'll have a more detailed look to find BC breaks in those. |
2b8679e to
65abbd0
Compare
Changelog: * Add possiblity to configure to skip rate limiting on storage error. Can be configured globally by setting the `noxlogic_rate_limit.fail_open` parameter and/or per `#[RateLimit(failOpen: true)]` Attribute * Added `RateLimitStorageExceptionInterface` as possible exception to `StorageInterface` methods
65abbd0 to
dbd5110
Compare
| treatPhpDocTypesAsCertain: false | ||
| reportUnmatchedIgnoredErrors: false |
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.
Not great.. I hat to add these to get the PHPStan CI step to pass on all PHP + Symfony version combinations. Because on newer Symfony versions, the method.notFound error is not thrown anymore in Configuration::getConfigTreeBuilder()
Allows configuring the bundle to make it skip the rate limiting when the storage backend throws an exception.
Can be configured for all routes, or by setting it per attribute. Can also be combined, the attribute overrides whe global config.
I have also made some general small refactorings, I have split those into a separate commit to make reviewing easier. They shouldn't contain anything that changes behaviour.=> Moved to #141In general, the behaviour is the same as before. The fail open setting has to be explicitly enabled.
Adresses #89
Changelog:
noxlogic_rate_limit.fail_openparameter and/or per#[RateLimit(failOpen: true)]AttributeRateLimitStorageExceptionInterfaceas possible exception toStorageInterfacemethods