From 455f4cd43e010493cc0b4ae99d74c0efca76e75d Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Mon, 30 Mar 2026 21:32:51 -0700 Subject: [PATCH] fix(e2e): redirect DO max_parallel log_warn to stderr (#3110) _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. Co-authored-by: spawn-qa-bot Co-authored-by: L <6723574+louisgv@users.noreply.github.com> --- 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 444d8f75..3ffc99cf 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}"