• v3.7.0 1b585af14e

    feat: wire the circuit breaker into the proxy fetch path (#90)
    ci/woodpecker/tag/docker Pipeline was successful

    unkinben released this 2026-07-02 22:43:22 +10:00 | 26 commits to master since this release

    Fixes #74

    Why

    internal/proxy/circuit.go implemented and tested a circuit breaker, but nothing ever called it — a repeatedly-failing upstream was still hit on every request.

    Changes

    • Construct a CircuitBreaker in NewEngine.
    • In Engine.Fetch: short-circuit when the breaker is open (serve stale from the store if present, otherwise return 503), RecordFailure on each UpstreamError, and RecordSuccess on a successful fetch.

    Validation

    • go test ./internal/proxy/ and make e2e pass.

    Co-authored-by: BenVincent benvin@main.unkin.net
    Reviewed-on: #90
    Co-authored-by: Ben Vincent ben@unkin.net
    Co-committed-by: Ben Vincent ben@unkin.net

    Downloads