From 07a97d0af888572f20951d1a1337781524921536 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Sat, 4 Jul 2026 06:08:00 +0000 Subject: [PATCH] fix(ci): make redis_setexz a safe no-op when redis is unavailable --- ci3/source_redis | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci3/source_redis b/ci3/source_redis index 6bf9a3b94809..0034aa6f8ba7 100644 --- a/ci3/source_redis +++ b/ci3/source_redis @@ -81,6 +81,13 @@ function redis_cli { } function redis_setexz { + # No-op when redis is unavailable, but still drain stdin: otherwise the upstream + # producer feeding this pipeline gets SIGPIPE, which under `set -o pipefail` fails + # the caller (e.g. bootstrap_ec2's "CI booting..." log write killing the whole run). + if [ "$CI_REDIS_AVAILABLE" -ne 1 ]; then + cat >/dev/null + return 0 + fi gzip | redis_cli -x SETEX $1 $2 &>/dev/null }