From 17a47e280bd71e341b7d2e828552535c1cc0dd03 Mon Sep 17 00:00:00 2001 From: Brian Marks Date: Wed, 25 Nov 2026 12:05:11 -0500 Subject: [PATCH] ci(benchmarks): treat a blank baseline_branch.txt as no baseline in check-big-regressions Without a PR, bp-runner writes baseline_branch.txt as a single newline, so the [ -s ] test from #4545 required baseline results that never ran and the gate failed on every full benchmark run of a branch with no PR yet. Check for a non-whitespace character instead, matching how fail-on-regression.sh reads the file ($(cat) strips the newline, so it warns and exits 0). --- .gitlab/benchmarks.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index bf8a07ab35..eebd0d6097 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -423,7 +423,8 @@ check-big-regressions: else echo "Reports directory found with content - running regression check" sides=candidate - if [ -s reports/baseline_branch.txt ]; then sides="baseline candidate"; fi + # bp-runner writes a bare newline here when the branch has no PR. + if grep -q '[^[:space:]]' reports/baseline_branch.txt 2>/dev/null; then sides="baseline candidate"; fi for result in tracer-bench-results tracer-bench-results-opcache tracer-tea-bench-results; do for side in $sides; do if [ ! -f "reports/${side}-${result}.converted.json" ]; then