From 6df96305a02494a479272000a8468c55c91b9ee2 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Mon, 6 Jul 2026 14:01:24 +0000 Subject: [PATCH] fix(ci3): make redis_setexz a no-op instead of aborting when redis is unavailable --- ci3/source_redis | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci3/source_redis b/ci3/source_redis index 6bf9a3b94809..29d12c8ff66f 100644 --- a/ci3/source_redis +++ b/ci3/source_redis @@ -81,7 +81,14 @@ function redis_cli { } function redis_setexz { - gzip | redis_cli -x SETEX $1 $2 &>/dev/null + if [ "$CI_REDIS_AVAILABLE" -eq 1 ]; then + gzip | redis_cli -x SETEX $1 $2 &>/dev/null + else + # Redis is a no-op here, but we must still drain stdin. Otherwise gzip writes into a + # pipe whose reader never runs, takes SIGPIPE, and aborts the caller under pipefail + # (e.g. bootstrap_ec2's early "CI booting..." write when no redis is reachable). + cat >/dev/null + fi } function redis_getz {