Repository navigation
Run PR tests only for changes made on the PR branch - #13343
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
Conversation
Git change tracking diffed `<base>..HEAD`, which compares the two trees. Every file changed on master since the branch point counted as a PR change, so most PR pipelines hit a "run everything" path changed on master and ran the full suite. Diff from the merge base instead (`<base>...HEAD`), and ignore GitHub and agent config directories, which do not affect Gradle tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The merge-base comparison correctly excludes newer master-only changes from PR test selection. Source and CI configuration inspection identified no actionable regression in that change or the configuration-directory exclusions.
🤖 Bits Code Review · Commit d267671
Co-authored-by: Brice Dutheil <brice.dutheil@gmail.com>
|
suggestion: The description hints at bold improvements, but the reality is it touches less that 10% of the PRs. I.e. clearly state it's a secondary improvement. I looked over this period from 12 August and 12 November 2026, |
Your count is right for the new exclusions but most of the effect of this change comes from the merge-base diff, though, which applies to any PR whose branch is behind master: in 357 PR pipelines from Nov 7–12, 31% ran the full suite only because master had moved. I've split the two in the description in order to make this difference clearer. |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer
left a comment
There was a problem hiding this comment.
Thanks for follow up the clean up
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
bric3
left a comment
There was a problem hiding this comment.
Small clarification to the description of the directory exclusions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What Does This Do
A secondary improvement: it reduces CI cost, not pipeline duration.
.github/,.claude/and.agents/no longer make a PR run every test.Motivation
Change tracking diffed
origin/master..HEAD, which compares the two trees. Every file changed on master after the branch point counted as a PR change, and master touchesbuildSrc/,.gitlab*,gradle/or root files almost daily. So test selection was effectively off: in 357 recent PR pipelines, 31% ran the full suite only because of master changes, and only 23% got any selection. Diffing from the merge base (origin/master...HEAD) counts only the PR's own changes.Additional Notes
Measured effect
Measured on real CI jobs from 2026-11-07 to 2026-11-12 (after the S3 build cache, #12604): 357 PR pipelines, classified by replaying the selection logic with the git state each one saw (12/12 agreement with sampled job logs).
PR pipelines running the full suite: 76.7% → 45.8%.
The two parts of the change contribute very differently:
...).github/,.claude/,.agents/For those 110 pipelines, the saving is the time of each test job that would become empty, minus the median duration of 2,703 real empty jobs (for example 7.4 min for
test_inst). Smoke, build and check jobs are not counted, and 56 of the 110 save nothing because they touch core modules that keep every shard selected.Week, month and year are linear extrapolations of the window. The range comes from the 25th–75th percentile of empty-job durations. 54% of the saving comes from jobs that really executed tests (cache misses, non-cacheable tasks) and 46% from jobs that mostly restored cached results. Pipeline duration is unchanged: smoke tests stay on the critical path.
Tests
Global effect change: .gitlab/check_test_agent_results.sh (no tasks will be skipped), 104 test tasks. With the fix: only the changed module selected, 44 of 46 test aggregates skippedsettings.gradle.ktsandbuild-logic/(#13294)Changed file: build-logic/smoke-test/README.md at root project (no task will be skipped): all tests ranorigin/master...HEAD, onlyRxJavaModule.javacounted, 40Skippinglines; only the rxjava shards and smoke tests did workbuildSrc/, so nothing is skipped)No unit test covers this plugin; the checks above exercise it end to end.
Advantages
Drawbacks
build-logic/,.gitlab/,metadata/,.gitlab-ci.yml,gradle/orbuildSrc/; this PR does not change those rules..gitlab/find-gh-base-ref.sh; in a local shallow clone without it, the existingrequirefails the build loudly instead of silently skipping tests.Jira ticket: SDCT-1444
🤖 Generated with Claude Code