-
-
Notifications
You must be signed in to change notification settings - Fork 635
Fix Bencher reporting permanently broken on pushes to main #3148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -553,104 +553,118 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||
| BOUNDARY=0.95 | ||||||||||||||||||||||||||||||||||||||||||
| MAX_SAMPLE=64 | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Set branch and start-point based on event type | ||||||||||||||||||||||||||||||||||||||||||
| # Set branch and start-point based on event type. | ||||||||||||||||||||||||||||||||||||||||||
| # Main pushes don't need --start-point because main IS the base | ||||||||||||||||||||||||||||||||||||||||||
| # branch — new reports compare against main's own history. | ||||||||||||||||||||||||||||||||||||||||||
| # Feature branches (PRs, dispatch) use --start-point to inherit | ||||||||||||||||||||||||||||||||||||||||||
| # historical data and thresholds from main. | ||||||||||||||||||||||||||||||||||||||||||
| if [ "${{ github.event_name }}" = "push" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| BRANCH="main" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT="main" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_HASH="${{ github.event.before }}" | ||||||||||||||||||||||||||||||||||||||||||
| EXTRA_ARGS="" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_ARGS="" | ||||||||||||||||||||||||||||||||||||||||||
| elif [ "${{ github.event_name }}" = "pull_request" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| BRANCH="$GITHUB_HEAD_REF" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT="$GITHUB_BASE_REF" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_HASH="${{ github.event.pull_request.base.sha }}" | ||||||||||||||||||||||||||||||||||||||||||
| EXTRA_ARGS="--start-point-reset" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_ARGS="--start-point $GITHUB_BASE_REF --start-point-hash ${{ github.event.pull_request.base.sha }} --start-point-clone-thresholds --start-point-reset" | ||||||||||||||||||||||||||||||||||||||||||
| elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| # Get merge-base from GitHub API (avoids needing deep fetch) | ||||||||||||||||||||||||||||||||||||||||||
| # See: https://stackoverflow.com/a/74710919 | ||||||||||||||||||||||||||||||||||||||||||
| BRANCH="${{ github.ref_name }}" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT="main" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_HASH=$(gh api "repos/${{ github.repository }}/compare/main...$BRANCH" --jq '.merge_base_commit.sha' || true) | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if [ -n "$START_POINT_HASH" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| echo "Found merge-base via API: $START_POINT_HASH" | ||||||||||||||||||||||||||||||||||||||||||
| if [ "$BRANCH" = "main" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_ARGS="" | ||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ Could not find merge-base with main via GitHub API, continuing without it" | ||||||||||||||||||||||||||||||||||||||||||
| # Get merge-base from GitHub API (avoids needing deep fetch) | ||||||||||||||||||||||||||||||||||||||||||
| # See: https://stackoverflow.com/a/74710919 | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_HASH=$(gh api "repos/${{ github.repository }}/compare/main...$BRANCH" --jq '.merge_base_commit.sha' || true) | ||||||||||||||||||||||||||||||||||||||||||
| if [ -n "$START_POINT_HASH" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| echo "Found merge-base via API: $START_POINT_HASH" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_ARGS="--start-point main --start-point-hash $START_POINT_HASH --start-point-clone-thresholds --start-point-reset" | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a silent behavior change from the old code: the dispatch case previously had This is probably the correct behavior (consistent with how PRs work), but a one-line comment would make the intentionality clear:
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavior change from old code: the previous dispatch case used Is this intentional? If so, worth a brief comment here explaining why dispatch should match PR behavior.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavior change from old code: The old dispatch path had If the intent is to always start fresh from main for dispatch runs (consistent with PR behavior), this is correct and intentional. But if someone uses
Suggested change
(No code change needed if intentional — just add a comment confirming
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavior change for |
||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ Could not find merge-base with main via GitHub API, continuing without hash" | ||||||||||||||||||||||||||||||||||||||||||
| START_POINT_ARGS="--start-point main --start-point-clone-thresholds --start-point-reset" | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+577
to
+580
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential behavior change from original code: The original
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's intentional and not worth commenting every flag. |
||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
| EXTRA_ARGS="" | ||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| echo "❌ ERROR: Unexpected event type: ${{ github.event_name }}" | ||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Run bencher and capture HTML output (stdout) while letting stderr go to a file | ||||||||||||||||||||||||||||||||||||||||||
| # so we can distinguish missing baselines (404) from actual regression alerts. | ||||||||||||||||||||||||||||||||||||||||||
| # Use set +e to capture exit code without failing immediately. | ||||||||||||||||||||||||||||||||||||||||||
| # Wrap bencher run in a function so we can retry with different | ||||||||||||||||||||||||||||||||||||||||||
| # start-point args if the pinned hash isn't found in Bencher. | ||||||||||||||||||||||||||||||||||||||||||
| run_bencher() { | ||||||||||||||||||||||||||||||||||||||||||
| local sp_args="$1" | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| # Intentional word-splitting: sp_args contains multiple flags | ||||||||||||||||||||||||||||||||||||||||||
| # (e.g. "--start-point main --start-point-hash abc123") that must | ||||||||||||||||||||||||||||||||||||||||||
| # be split into separate argv entries. | ||||||||||||||||||||||||||||||||||||||||||
| # shellcheck disable=SC2086 | ||||||||||||||||||||||||||||||||||||||||||
| bencher run \ | ||||||||||||||||||||||||||||||||||||||||||
| --project react-on-rails-t8a9ncxo \ | ||||||||||||||||||||||||||||||||||||||||||
| --token '${{ secrets.BENCHER_API_TOKEN }}' \ | ||||||||||||||||||||||||||||||||||||||||||
| --branch "$BRANCH" \ | ||||||||||||||||||||||||||||||||||||||||||
| $sp_args \ | ||||||||||||||||||||||||||||||||||||||||||
| --testbed github-actions \ | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+590
to
+601
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: use an array instead of intentional word-splitting. The
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| --adapter json \ | ||||||||||||||||||||||||||||||||||||||||||
| --file bench_results/benchmark.json \ | ||||||||||||||||||||||||||||||||||||||||||
| --err \ | ||||||||||||||||||||||||||||||||||||||||||
| --quiet \ | ||||||||||||||||||||||||||||||||||||||||||
| --format html \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure rps \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure p50_latency \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure p90_latency \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure p99_latency \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure failed_pct \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Run bencher and capture HTML output (stdout) while letting stderr | ||||||||||||||||||||||||||||||||||||||||||
| # go to a file so we can inspect failure reasons. | ||||||||||||||||||||||||||||||||||||||||||
| BENCHER_STDERR=$(mktemp) | ||||||||||||||||||||||||||||||||||||||||||
| trap 'rm -f "$BENCHER_STDERR"' EXIT | ||||||||||||||||||||||||||||||||||||||||||
| set +e | ||||||||||||||||||||||||||||||||||||||||||
| bencher run \ | ||||||||||||||||||||||||||||||||||||||||||
| --project react-on-rails-t8a9ncxo \ | ||||||||||||||||||||||||||||||||||||||||||
| --token '${{ secrets.BENCHER_API_TOKEN }}' \ | ||||||||||||||||||||||||||||||||||||||||||
| --branch "$BRANCH" \ | ||||||||||||||||||||||||||||||||||||||||||
| --start-point "$START_POINT" \ | ||||||||||||||||||||||||||||||||||||||||||
| --start-point-hash "$START_POINT_HASH" \ | ||||||||||||||||||||||||||||||||||||||||||
| --start-point-clone-thresholds \ | ||||||||||||||||||||||||||||||||||||||||||
| --testbed github-actions \ | ||||||||||||||||||||||||||||||||||||||||||
| --adapter json \ | ||||||||||||||||||||||||||||||||||||||||||
| --file bench_results/benchmark.json \ | ||||||||||||||||||||||||||||||||||||||||||
| --err \ | ||||||||||||||||||||||||||||||||||||||||||
| --quiet \ | ||||||||||||||||||||||||||||||||||||||||||
| --format html \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure rps \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure p50_latency \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure p90_latency \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure p99_latency \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-measure failed_pct \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-test t_test \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-max-sample-size $MAX_SAMPLE \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-lower-boundary _ \ | ||||||||||||||||||||||||||||||||||||||||||
| --threshold-upper-boundary $BOUNDARY \ | ||||||||||||||||||||||||||||||||||||||||||
| $EXTRA_ARGS > bench_results/bencher_report.html 2>"$BENCHER_STDERR" | ||||||||||||||||||||||||||||||||||||||||||
| run_bencher "$START_POINT_ARGS" > bench_results/bencher_report.html 2>"$BENCHER_STDERR" | ||||||||||||||||||||||||||||||||||||||||||
| BENCHER_EXIT_CODE=$? | ||||||||||||||||||||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Print stderr for visibility in logs | ||||||||||||||||||||||||||||||||||||||||||
| cat "$BENCHER_STDERR" >&2 | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # If bencher failed due to missing baseline data (404 Not Found) and there | ||||||||||||||||||||||||||||||||||||||||||
| # are no regression alerts, treat as a warning instead of failing the workflow. | ||||||||||||||||||||||||||||||||||||||||||
| # This commonly happens when the PR base commit was a docs-only change | ||||||||||||||||||||||||||||||||||||||||||
| # skipped by paths-ignore, so no benchmark data exists in Bencher. | ||||||||||||||||||||||||||||||||||||||||||
| # If bencher failed because the start-point hash doesn't exist in | ||||||||||||||||||||||||||||||||||||||||||
| # Bencher (e.g., the base commit was a docs-only change skipped by | ||||||||||||||||||||||||||||||||||||||||||
| # paths-ignore), retry without --start-point-hash so the report | ||||||||||||||||||||||||||||||||||||||||||
| # still gets stored using the latest available baseline. | ||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||
| # Safety checks before overriding exit code: | ||||||||||||||||||||||||||||||||||||||||||
| # 1. stderr must contain "404 Not Found" (HTTP status from Bencher API) | ||||||||||||||||||||||||||||||||||||||||||
| # 2. stderr must NOT contain regression indicators ("alert", "threshold", | ||||||||||||||||||||||||||||||||||||||||||
| # or "boundary") to avoid suppressing actual performance regressions | ||||||||||||||||||||||||||||||||||||||||||
| if [ $BENCHER_EXIT_CODE -ne 0 ] && grep -q "404 Not Found" "$BENCHER_STDERR" && ! grep -qiE "alert|threshold violation|boundary violation" "$BENCHER_STDERR"; then | ||||||||||||||||||||||||||||||||||||||||||
| 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)" | ||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ Benchmark data was collected but regression comparison is unavailable for this run" | ||||||||||||||||||||||||||||||||||||||||||
| echo "📋 Bencher stderr output:" | ||||||||||||||||||||||||||||||||||||||||||
| cat "$BENCHER_STDERR" | ||||||||||||||||||||||||||||||||||||||||||
| echo "::warning::Bencher baseline not found for start-point hash '$START_POINT_HASH' — regression comparison unavailable for this run" | ||||||||||||||||||||||||||||||||||||||||||
| BENCHER_EXIT_CODE=0 | ||||||||||||||||||||||||||||||||||||||||||
| # Bencher emits: 'Head Version (..., Some(GitHash("<sha>"))) not found' | ||||||||||||||||||||||||||||||||||||||||||
| # when the pinned hash isn't in its DB. A single combined pattern | ||||||||||||||||||||||||||||||||||||||||||
| # avoids false-positive matches across unrelated lines. | ||||||||||||||||||||||||||||||||||||||||||
| if [ $BENCHER_EXIT_CODE -ne 0 ] && grep -q "Head Version.*not found" "$BENCHER_STDERR" && ! grep -qiE "alert|threshold violation|boundary violation" "$BENCHER_STDERR"; then | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment says two separate greps make format changes "surface clearly", but the real risk is the opposite: two independent greps can match on different lines, creating a false-positive retry. A combined pattern is both safer and still surfaces format changes:
Suggested change
If Bencher's error format ever changes, the combined pattern still stops matching — you don't lose the diagnostic value, and you eliminate the false-positive risk.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current version already has a single grep to prevent matching on different lines.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fragile error-message coupling: The retry is gated on Suggestion: add a comment here with a link to the Bencher CLI source or changelog entry that documents this error format, so it's easy to re-check after a Bencher version bump. |
||||||||||||||||||||||||||||||||||||||||||
| RETRY_ARGS=$(echo "$START_POINT_ARGS" | sed 's/--start-point-hash [^ ]*//') | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This A small improvement:
Suggested change
RETRY_ARGS=$(echo "$START_POINT_ARGS" | sed 's/ --start-point-hash [^ ]*//')The leading space before
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's intentional and already replied to.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The This is harmless because the unquoted A slightly cleaner alternative if you ever want it:
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: double space after removal.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| if [ "$RETRY_ARGS" != "$START_POINT_ARGS" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ Start-point hash not found in Bencher — retrying without --start-point-hash (will use latest baseline)" | ||||||||||||||||||||||||||||||||||||||||||
| echo "::warning::Start-point hash not found in Bencher — falling back to latest baseline for comparison" | ||||||||||||||||||||||||||||||||||||||||||
| set +e | ||||||||||||||||||||||||||||||||||||||||||
| run_bencher "$RETRY_ARGS" > bench_results/bencher_report.html 2>"$BENCHER_STDERR" | ||||||||||||||||||||||||||||||||||||||||||
| BENCHER_EXIT_CODE=$? | ||||||||||||||||||||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||||||||||||||||||||
| cat "$BENCHER_STDERR" >&2 | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
| rm -f "$BENCHER_STDERR" | ||||||||||||||||||||||||||||||||||||||||||
| # $BENCHER_STDERR is cleaned up by the EXIT trap | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Export exit code early so downstream alerting steps (7b/7c) always see it, | ||||||||||||||||||||||||||||||||||||||||||
| # even if the post-processing below (step summary, PR comments) fails. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
START_POINT_ARGSstring for PR events embeds$GITHUB_BASE_REFand${{ github.event.pull_request.base.sha }}directly into a space-delimited arg string. This is fine for typical branch names, butGITHUB_BASE_REFvalues likefeature/my branch(with a space) would corrupt the arg list when word-split insiderun_bencher. The same applies to theworkflow_dispatchpath with$BRANCH.In practice, GitHub branch names almost never contain spaces and the SHA is always hex, so this is a very low risk. Just worth documenting.
(No code change needed unless you want to add a comment noting the branch-name assumption.)