From 2dde09c7d95fae1ebe2ca5f7e3c8fcada8cfa31e Mon Sep 17 00:00:00 2001 From: spawn-qa-bot Date: Mon, 30 Mar 2026 09:13:23 +0000 Subject: [PATCH] fix(e2e): redirect DO max_parallel log_warn to stderr _digitalocean_max_parallel() called log_warn which writes colored output to stdout, polluting the captured return value when invoked via cloud_max=$(cloud_max_parallel). The downstream integer comparison [ "${effective_parallel}" -gt "${cloud_max}" ] then fails with 'integer expression expected', silently leaving the droplet limit cap unapplied. Fix: redirect log_warn output to stderr so only the numeric value is captured. --- sh/e2e/lib/clouds/digitalocean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/e2e/lib/clouds/digitalocean.sh b/sh/e2e/lib/clouds/digitalocean.sh index fcd038412..0b3f02dc7 100644 --- a/sh/e2e/lib/clouds/digitalocean.sh +++ b/sh/e2e/lib/clouds/digitalocean.sh @@ -384,7 +384,7 @@ _digitalocean_max_parallel() { _existing=$(_do_curl_auth -sf "${_DO_API}/droplets?per_page=200" 2>/dev/null | grep -o '"id":[0-9]*' | wc -l | tr -d ' ') || { printf '3'; return 0; } _available=$(( _limit - _existing )) if [ "${_available}" -lt 1 ]; then - log_warn "DigitalOcean droplet limit reached: ${_existing}/${_limit} droplets in use (0 available)" + log_warn "DigitalOcean droplet limit reached: ${_existing}/${_limit} droplets in use (0 available)" >&2 printf '0' else printf '%d' "${_available}"