From a863732fbcc087f627cb47655ccf54a9ffbdee96 Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Mon, 22 Jun 2026 14:56:22 +0200 Subject: [PATCH] Fix benchmark diff scraping for path-qualified markers (#3609) ## Motivation `scripts/check_benchmark_thresholds.sh` started printing path-qualified diff markers in #3602 so multi-package benchmark runs can identify which package produced each diff. `dev/thresholds-from-benchmark-output.sh` still scrapes the old exact marker line, which means local threshold updates from CI logs can miss the diff entirely once the new marker format appears. ## Changes Relax the scraper to match the stable `=== BEGIN DIFF` prefix instead of the old exact line, preserving compatibility with both the original marker and the newer path-qualified form. ## Validation - `bash -n dev/thresholds-from-benchmark-output.sh` - Verified the scrape pipeline against both `=== BEGIN DIFF ===` and `=== BEGIN DIFF (Benchmarks) ===` sample log lines Co-authored-by: Cory Benfield --- dev/thresholds-from-benchmark-output.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/thresholds-from-benchmark-output.sh b/dev/thresholds-from-benchmark-output.sh index 729358f10..a9bc84ed4 100755 --- a/dev/thresholds-from-benchmark-output.sh +++ b/dev/thresholds-from-benchmark-output.sh @@ -118,7 +118,7 @@ scrape_benchmarks_output_diff() { log "Scraping diff from log" # Trim out everything but the diff - git_diff="$(echo "$lines" | sed '1,/=== BEGIN DIFF ===/d' | sed '/Post job cleanup/,$d' | sed 's/^[0-9][0-9][0-9][0-9]-.*Z //')" + git_diff="$(echo "$lines" | sed '1,/^=== BEGIN DIFF/d' | sed '/Post job cleanup/,$d' | sed 's/^[0-9][0-9][0-9][0-9]-.*Z //')" echo "$git_diff" }