Skip to content

Fix circuit_breaker_state derived from reachability, not availability#100

Merged
sarroutbi merged 1 commit into
keylime-webtool:mainfrom
sarroutbi:fix-circuit-breaker-state-derivation
May 21, 2026
Merged

Fix circuit_breaker_state derived from reachability, not availability#100
sarroutbi merged 1 commit into
keylime-webtool:mainfrom
sarroutbi:fix-circuit-breaker-state-derivation

Conversation

@sarroutbi
Copy link
Copy Markdown
Contributor

The performance_summary handler derived circuit_breaker_state from verifier_available (URL configured) instead of verifier_reachable (actually responding). When the Verifier was configured but down, the frontend showed "Unreachable" (red) next to "Closed" (green), which is contradictory. Now both fields are consistent: an unreachable Verifier reports circuit_breaker_state as "open".

Extract derive_circuit_breaker_state() as a testable pure function and add unit tests covering both branches.

The performance_summary handler derived circuit_breaker_state from
verifier_available (URL configured) instead of verifier_reachable
(actually responding). When the Verifier was configured but down,
the frontend showed "Unreachable" (red) next to "Closed" (green),
which is contradictory. Now both fields are consistent: an
unreachable Verifier reports circuit_breaker_state as "open".

Extract derive_circuit_breaker_state() as a testable pure function
and add unit tests covering both branches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
@sarroutbi sarroutbi merged commit 9817246 into keylime-webtool:main May 21, 2026
12 checks passed
@sarroutbi sarroutbi deleted the fix-circuit-breaker-state-derivation branch May 21, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant