Skip to content

Don't count requeued test failures toward circuit breaker#394

Open
ChrisBr wants to merge 1 commit intomainfrom
backport/circuit-breaker-fix-v0.82
Open

Don't count requeued test failures toward circuit breaker#394
ChrisBr wants to merge 1 commit intomainfrom
backport/circuit-breaker-fix-v0.82

Conversation

@ChrisBr
Copy link
Copy Markdown
Contributor

@ChrisBr ChrisBr commented Apr 9, 2026

report_failure! was called before the requeue check, so successfully requeued tests incremented the consecutive failure counter. With max_consecutive_failures=N and N+ deterministic failures that are all requeued, the circuit breaker fired prematurely and the worker exited, stranding requeued tests in the queue with no worker to process them.

Now report_failure!/report_success! is only called when a test genuinely fails or passes. Requeued tests are invisible to the circuit breaker — they don't increment or reset the consecutive failure counter.

report_failure! was called before the requeue check, so successfully
requeued tests incremented the consecutive failure counter. With
max_consecutive_failures=N and N+ deterministic failures that are all
requeued, the circuit breaker fired prematurely and the worker exited,
stranding requeued tests in the queue with no worker to process them.

Now report_failure!/report_success! is only called when a test genuinely
fails or passes. Requeued tests are invisible to the circuit breaker —
they don't increment or reset the consecutive failure counter.
@ChrisBr
Copy link
Copy Markdown
Contributor Author

ChrisBr commented Apr 9, 2026

The Python failures were fixed in #382 so it's expected that they're failing on this PR.

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.

2 participants