Skip to content

ci(perf): compare against the pull request's base commit and name skipped endpoints - #149

Merged
lewisjared merged 4 commits into
mainfrom
fix/perf-compare-base
Oct 24, 2026
Merged

lewisjared merged 4 commits into
mainfrom
fix/perf-compare-base

Conversation

@lewisjared

@lewisjared lewisjared commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Follows up the two CodeRabbit threads on #145, which merged before they were addressed.

  • The perf job compares against github.event.pull_request.base.sha instead of origin/<base branch>, so a base branch that moves during the run cannot skew the comparison. The SHA reaches the shell through env, not template expansion.
  • perf-compare.sh names each endpoint that failed or skipped on the base in a warning annotation and the job summary. Before, one generic warning hid which endpoints had no baseline, and a base that skipped every endpoint left the job green with nothing compared. The job stays green for these, because a new endpoint or one the branch fixes is expected to fail on the base.
  • The job now fails when the base run produced no report at all, rather than comparing nothing.
  • scripts/perf-report.py writes a table of every endpoint's base and branch medians and the change to the job summary, marking any over the threshold, so the result is readable without opening the log. It runs even when the comparison fails.

Tested the report against real pytest-benchmark output with an endpoint that slows down, one only on the branch and one skipped on the base. Also tested it against a pytest JUnit file with a passing test, a failing test, a setup error and a skip, and with no file.

…pped endpoints

The perf job now compares against github.event.pull_request.base.sha rather than the moving base branch,
passed through env rather than expanded into the script.
perf-compare.sh names each endpoint that failed on the base in a warning and the job summary,
because it has no baseline and is left out of the comparison.
It fails when the base run produced no report at all.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5d0c9781-0aa7-45aa-aba6-3b74c0e94763
📥 Commits

Reviewing files that changed from the base of the PR and between e057c11 and 9a44924.

📒 Files selected for processing: 5
  • .github/workflows/ci.yml
  • backend/scripts/perf-compare.sh
  • backend/scripts/perf-report.py
  • backend/tests/perf/README.md
  • changelog/149.trivial.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lewisjared
lewisjared marked this pull request as ready for review October 24, 2026 00:04
A base without the synthetic database generator skips every endpoint,
which left the job green while comparing nothing.
Skipped endpoints are now named in the warnings and job summary like failed ones.
Adds scripts/perf-report.py, which lists each endpoint's base and branch medians and the change,
marking those over the threshold, in the job summary and the log.
It takes over naming the endpoints that have no baseline.
perf-compare.sh writes the report even when the comparison fails, then exits with its status.
@lewisjared
lewisjared merged commit 95a4398 into main Oct 24, 2026
6 checks passed
@lewisjared
lewisjared deleted the fix/perf-compare-base branch October 24, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant