fix(ci3): don't abort CI when redis is unavailable (redis_setexz broken pipe)#24351
Draft
AztecBot wants to merge 1 commit into
Draft
fix(ci3): don't abort CI when redis is unavailable (redis_setexz broken pipe)#24351AztecBot wants to merge 1 commit into
AztecBot wants to merge 1 commit into
Conversation
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.
Root cause
The nightly barretenberg debug build failed instantly (~50ms, before any build work) with:
(failing run:
AztecProtocol/aztec-clauderun 28313796517)ci.sh barretenberg-debugcallsbootstrap_ec2, whose very first action logs a heartbeat to redis:redis_setexzwas:When redis is unavailable,
redis_cliis a documented no-op ("Noop when redis is unavailable") that never reads stdin. Sogzipcompresses, tries to write to the closed pipe, takes aSIGPIPE/stdout: Broken pipe, and exits non-zero. Underset -o pipefail+set -e(fromci3/source_options) that non-zero pipeline status aborts the entire CI run at the first log write — long before reaching EC2. The&>/dev/nullonly coversredis_cli, so gzip's stderr still leaks the confusing message.This bit the aztec-claude run because its
nextmirror is stale and predates the job guard now present in the aztec-packages workflow (if: github.event_name != 'schedule' || github.repository == 'AztecProtocol/aztec-packages'), so the schedule fired in an environment with no AWS creds and no reachable redis. But it is a genuine latent landmine for the real aztec-packages nightly too: if the redis tunnel ever drops, the whole run would abort here with a cryptic broken-pipe error instead of degrading gracefully.Fix
Make
redis_setexzhonor the same "noop when redis is unavailable" contract asredis_cli, while still draining stdin so upstream writers in a pipeline don't getSIGPIPE:This centrally protects all callers of
redis_setexz(bootstrap_ec2,cache_log,denoise,run_test_cmd) — CI log/cache writes now degrade gracefully when redis is down instead of aborting the run.Verification
Reproduced the original abort and confirmed the fix, under
set -euo pipefail:echo ... | redis_setexz→ pipeline exits 141 (SIGPIPE) / gzip non-zero → script aborts (matches CI).Note on recurring duplicates
This nightly auto-dispatches a claudebox investigation on every failure, and prior daily runs left ~15
cb/*redis-setexz*branches on the remote with no associated PRs (the fix never actually landed). This PR is the consolidated fix; the stale branches can be pruned.Created by claudebox · group:
slackbot