-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(utils): Add helpers for circuit breaker and circuit breaker tests #74559
Merged
lobsterkatie
merged 3 commits into
master
from
kmclb-add-helpers-to-CircuitBreaker-class
Jul 23, 2024
Merged
feat(utils): Add helpers for circuit breaker and circuit breaker tests #74559
lobsterkatie
merged 3 commits into
master
from
kmclb-add-helpers-to-CircuitBreaker-class
Jul 23, 2024
+328
−7
Conversation
This file contains 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
github-actions
bot
added
the
Scope: Backend
Automatically applied to PRs that change backend components
label
Jul 19, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## kmclb-add-CircuitBreaker-class-stub #74559 +/- ##
=======================================================================
- Coverage 78.14% 78.14% -0.01%
=======================================================================
Files 6731 6731
Lines 300065 300119 +54
Branches 51620 51636 +16
=======================================================================
+ Hits 234495 234520 +25
- Misses 59245 59276 +31
+ Partials 6325 6323 -2
|
vartec
approved these changes
Jul 19, 2024
lobsterkatie
force-pushed
the
kmclb-add-CircuitBreaker-class-stub
branch
from
July 23, 2024 00:47
f9e498f
to
2ba434a
Compare
lobsterkatie
force-pushed
the
kmclb-add-helpers-to-CircuitBreaker-class
branch
from
July 23, 2024 00:48
55205da
to
20822f6
Compare
lobsterkatie
force-pushed
the
kmclb-add-CircuitBreaker-class-stub
branch
from
July 23, 2024 06:16
2ba434a
to
7fc3a3d
Compare
lobsterkatie
force-pushed
the
kmclb-add-helpers-to-CircuitBreaker-class
branch
from
July 23, 2024 06:17
9b4a941
to
d5c9975
Compare
lobsterkatie
force-pushed
the
kmclb-add-helpers-to-CircuitBreaker-class
branch
from
July 23, 2024 17:34
8609b63
to
df575da
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 is a follow-up to #74557, which added the beginnings of a rate-limit-based circuit breaker, in the form of a new
CircuitBreaker
class. In this PR, various helpers, for checking the state of the breaker and the underlying rate limiters and for communicating with redis, have been added to the class. It also adds aMockCircuitBreaker
subclass for use in tests, which contains a number of methods for mocking both circuit breaker and rate limiter state.Note that though these helpers don't have accompanying tests, they are tested (indirectly) in the final PR in the series, as part of testing the methods which use them.