[Reference] test: arbitrary changes to 20 isolated source+test files#111110
Closed
JoshuaKGoldberg wants to merge 5 commits intomasterfrom
Closed
[Reference] test: arbitrary changes to 20 isolated source+test files#111110JoshuaKGoldberg wants to merge 5 commits intomasterfrom
JoshuaKGoldberg wants to merge 5 commits intomasterfrom
Conversation
1d52432 to
6138aa6
Compare
dee2c24 to
739e1ff
Compare
739e1ff to
3ef27ba
Compare
3ef27ba to
1882d7d
Compare
Made-with: Cursor
The git diff for the non-frontend file guard was comparing against HEAD (the synthetic merge commit) instead of HEAD^2 (the PR branch tip). This included base branch changes in the diff, causing false positives that unnecessarily forced full test runs. Made-with: Cursor
14d8c0e to
5c9ae7e
Compare
Made-with: Cursor
1882d7d to
d8243ee
Compare
JoshuaKGoldberg
added a commit
that referenced
this pull request
Mar 30, 2026
_"Why run many unit test when few do trick?"_ – Kevin Malone, Senior Frontend Developer Changes the Frontend > Jest jobs to use Jest's [`--changedSince` option](https://jestjs.io/docs/cli#--changedsince) when possible. That has them only run test suites that are impacted by the changes in a PR based on the module dependency graph. Jest requires the commit history since the base commit, so this adds a second _"run only necessary Jest tests"_ flow in `frontend-optional.yml`. Specifically, that: 1. Increases the frontend-optional fetch-depth in PRs to `100`, which should get most PRs' commits pretty quickly 2. Tries to compute a `MERGE_BASE` using `git merge-base` * Note that this also clears `MERGE_BASE` if the PR touches any non-`static/` files. 3. If `MERGE_BASE` could be computed, passes it as a process env var to test scripts for use as Jest's `changedSince` * If `MERGE_BASE` couldn't be computed, the new _"run only necessary Jest tests"_ flow is skipped My plan (thanks to reviewer feedback) is to keep this running as a secondary, optional test flow on `master` for a couple weeks. If all seems well, we can remove the original _"run all Jest tests"_ logic and only run the _"run only necessary Jest tests"_ logic. The following PRs exercise different scales of changes: | PR | Source Files | Test Files | Interconnectivity | Ran Suites | / 1,881 suites | |---|---|---|---|---|---| | [#110624](#110624) | 0 | 1 | ⬜️ None | 1 | 0.05% | | [#111073](#111073) | 0 | 6 | ⬜️ None | 6 | 0.32% | | [#111122](#111122) | 0 | 100 | ⬜️ None | 100 | 5.3% | | [#111074](#111074) | 1 | 0 | 🟦 Low | 5 | 0.27% | | [#111075](#111075) | 4 | 0 | 🟦 Low | 7 | 0.37% | | [#111076](#111076) | 3 | 3 | 🟦 Low | 13 | 0.69% | | [#111110](#111110) | 20 | 20 | 🟦 Low | 74 | 3.9% | | [#111111](#111111) | 100 | 100 | 🟦 Low | 196 | 10.4% | | [#111119](#111119) | 1 | 1 | 🟨 Medium | 30 | 1.6% | | [#111628](#111628) | 3 | 3 | 🟨 Medium | 78 | 4.1% | | [#111629](#111629) | 10 | 10 | 🟨 Medium | 167 | 8.9% | | [#111633](#111633) | 25 | 25 | 🟨 Medium | 227 | 12.1% | | [#111652](#111652) | 100 | 100 | 🟨 Medium | 549 | 29.2% | | [#111115](#111115) | 3 | 3 | 🟧 High | 1,652 | 87.8% | | [#111083](#111083) | 20 | 20 | 🟧 High | 1,660 | 88.3% | | [#111086](#111086) | 100 | 100 | 🟧 High | 1,721 | 91.5% | | [#110568](#110568) | 0 | 0 | 🟥 Config (Full) | 1,881 | 100% | For low-connectivity changes (isolated components, feature-specific views), `--changedSince` provides pretty great savings: even 100 low-connectivity files only trigger ~10% of suites. Medium-connectivity files still scale pretty well, with 100 files hitting ~29%. High-connectivity files (widely-imported utils, core components) sadly trigger 85-90% of suites, which is inevitable given Sentry's highly connected module graph. Fixes ENG-7103
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verifying #110568 works for: 20 sources and 20 tests (low interconnectivity — settings pages, uptime assertions).