You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Bencher reporting permanently broken on pushes to main
The benchmark workflow passed --start-point main --start-point-hash
<github.event.before> for push-to-main events. Since main IS the
base branch, Bencher tried to look up a version of main at the
"before" hash — which often didn't exist (e.g., docs-only commits
skipped by paths-ignore). This caused a 404, the report was never
stored, and subsequent pushes also failed because their "before" hash
was also missing. This cascading failure meant no main data was
stored after the first version (Jan 18).
Fix: don't pass --start-point args for pushes to main (thresholds are
defined inline via --threshold-* args). For PRs/dispatch where the
start-point hash may be missing, retry without --start-point-hash so
the report still gets stored using the latest available baseline.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
# If bencher failed due to missing baseline data (404 Not Found) and there
637
-
# are no regression alerts, treat as a warning instead of failing the workflow.
638
-
# This commonly happens when the PR base commit was a docs-only change
639
-
# skipped by paths-ignore, so no benchmark data exists in Bencher.
640
-
#
641
-
# Safety checks before overriding exit code:
642
-
# 1. stderr must contain "404 Not Found" (HTTP status from Bencher API)
643
-
#2. stderr must NOT contain regression indicators ("alert", "threshold",
644
-
# or "boundary") to avoid suppressing actual performance regressions
645
-
if [ $BENCHER_EXIT_CODE -ne 0 ] && grep -q "404 Not Found" "$BENCHER_STDERR" && ! grep -qiE "alert|threshold violation|boundary violation" "$BENCHER_STDERR"; then
646
-
echo "⚠️ Bencher baseline not found for start-point hash '$START_POINT_HASH' — this is expected when the base commit was not benchmarked (e.g., docs-only changes skipped by paths-ignore)"
647
-
echo "⚠️ Benchmark data was collected but regression comparison is unavailable for this run"
648
-
echo "📋 Bencher stderr output:"
649
-
cat "$BENCHER_STDERR"
650
-
echo "::warning::Bencher baseline not found for start-point hash '$START_POINT_HASH' — regression comparison unavailable for this run"
651
-
BENCHER_EXIT_CODE=0
643
+
# If bencher failed because the start-point hash doesn't exist in
644
+
# Bencher (e.g., the base commit was a docs-only change skipped by
645
+
# paths-ignore), retry without --start-point-hash so the report
646
+
# still gets stored using the latest available baseline.
647
+
if [ $BENCHER_EXIT_CODE -ne 0 ] && grep -q "Head Version" "$BENCHER_STDERR" && grep -q "not found" "$BENCHER_STDERR"; then
648
+
RETRY_ARGS=$(echo "$START_POINT_ARGS" | sed 's/--start-point-hash [^ ]*//')
649
+
if [ "$RETRY_ARGS" != "$START_POINT_ARGS" ]; then
650
+
echo ""
651
+
echo "⚠️ Start-point hash not found in Bencher — retrying without --start-point-hash (will use latest baseline)"
652
+
echo "::warning::Start-point hash not found in Bencher — falling back to latest baseline for comparison"
0 commit comments