Repository navigation
feat(hybridcloud): Add read-only state() to the RPC circuit breaker - #129330
Merged
Merged
Conversation
Lets operators read a destination breaker's state, time left in state, and window counts without reaching into circuit_breaker2 internals. Needed by the CTRL-93 fire drill job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
valencitas
marked this pull request as ready for review
October 30, 2026 18:29
GabeVillalobos
approved these changes
Oct 30, 2026
joshuarli
added a commit
that referenced
this pull request
Nov 3, 2026
`backend typing` is red on master. It first failed on 56e837a (#129330), but that commit isn't the cause. The cause is #129322, which added six unannotated test methods to `test_organization_pull_request_files.py`. It merged after strict mypy was turned on in #129614, so the two PRs raced and CI started reporting `no-untyped-def` on master. This adds `MagicMock` / `-> None` annotations to those methods, the same way the rest of the file already does it. Only type hints change. Test behavior stays the same. <!-- junior-request-attribution:start --> via @joshuarli. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0BQC9WSQ2E%3A1793720276.363209 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BQC9WSQ2E%3A1793720276.363209) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BQC9WSQ2E%3A1793720276.363209/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Joshua Li <[email protected]>
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Add a read-only
state()toRpcCircuitBreakerthat returns a destination's breaker state, seconds left in that state, and error/total counts for the current window.Why
We want to test the new circuit breaker is working as expected via a job runner script. Right now there is no public way for the job to know the state of the breaker, so this adds a small read-only
state()method. It changes nothing about how the breaker behaves.