serve: lame-duck on failed initial fetch, log stale-lock heals; retry Alpine bazel probe - #500
Merged
tinder-maxwellelliott merged 1 commit intoSep 14, 2026
Conversation
… Alpine bazel probe The Serve Stress cron has been red since 2026-09-10. PR #490 pointed the stress harness at the Rust //src:bazel-diff serve, and PR #498 then made it the only implementation, but the Rust port was missing two behaviours the harness (and README) rely on: * A failed initial `git fetch` bailed out of serve() before binding, so a fresh instance started while the remote is down simply exited. It now logs the error and comes up lame-ducked: /health and queries answer 503 forever, /metrics keeps answering with ready=false, matching the RFC #29 contract the Kotlin serve implemented. * Clearing an orphaned .git/index.lock and retrying the checkout was silent; it now logs "cleared stale git index.lock ..." so the harness can count self-heals. Separately, the Alpine real-repo cron failed on 2026-09-14 because the bazel probe in tools/serve_stress_alpine.sh treated a GitHub Releases 504 (downloading rules_java) as "bazel does not run on musl". The probe now retries download/5xx failures a few times with backoff and still fails fast on any other error. Verified locally: cargo test/clippy/fmt clean, and `tools/serve_stress.py --quick --only lock` / `--only lameduck` pass all checks that failed in CI. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
tinder-maxwellelliott
marked this pull request as ready for review
September 14, 2026 16:32
tinder-maxwellelliott
deleted the
claude/github-action-cron-failures-9efbe5
branch
September 14, 2026 17:02
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.
Why
Two scheduled workflows are failing:
//src:bazel-diffserve (and Remove the Kotlin implementation; the Rust CLI is now the only one #498 then removed the Kotlin leg), but the Rust port was missing two behaviours the harness asserts and the README documents.smallleg died in the Alpine bazel probe after GitHub Releases returned a 504 forrules_java;mediumandbazelgot past the probe and hit the same missing heal log as above.What changed
src/server.rsgit fetchno longer exitsserve()before the HTTP server binds. Newperform_initial_fetchlogs the error and leaves the instance lame-ducked:/healthand query endpoints return 503,/metricsis still served withready: false. This restores the RFC RFC: Bazel Query Service #29 behaviour the Kotlin serve had and the README promises..git/index.lockand retrying the checkout now logscleared stale git index.lock in <workspace>; retrying checkout of <sha>so the harness (and operators) can see the self-heal path fire.initial_fetch_failure_lame_ducks_instead_of_exitingcovering the un-ready responses and the--noInitialFetchpath.tools/serve_stress_alpine.shprobe_bazelretries up to 4 times with backoff when the probe output matches a download / 5xx / timeout error, and still fails fast on any other error so a genuinely non-working binary falls through to the next flavor quickly.Verification
cargo fmt --check,cargo clippy --all-targets, and the unit tests pass (107 in the lib).tools/serve_stress.py --quick --only lockand--only lameduckpass every check, including the four that failed in CI (self-heal path logged,startup with remote down -> lame-duck,query against lame-duck instance -> 503,/metrics still served while lame-ducked).serve-stress-alpine*cron runs; I could not reproduce the 504 locally.Reviewer notes
🤖 Generated with Claude Code