ci: Collect jest test file names in frontend.yml, and adjust matrix size based on the list len()#116749
Conversation
83ae74a to
61aa356
Compare
35570ca to
eda8fbb
Compare
…ize based on the list len()
eda8fbb to
2fd8df1
Compare
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
8ecbad8 to
cc37ee8
Compare
Move the jest test file list from a GitHub Actions job output to an
uploaded artifact. This avoids output size limits and makes the data
flow more explicit.
Also fixes pre-existing issues:
- Runner sharding was broken: ${#JEST_TESTS[@]} always returned 1
since JEST_TESTS is a string, not an array. Use jq to count the
JSON array length instead.
- jest_test_config step was skipped on push events, leaving the
matrix output empty. Move the event check into the script so the
step always runs.
- jest-tests checkout no longer needs fetch-depth: 100 since it
reads test files from the artifact, not git history.
- Remove unused typecheckable_rules_changed output.
- Extract inline bash into .github/workflows/scripts/jest-test-config.sh.
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
cc37ee8 to
2910134
Compare
The `jq -r '.'` in the changedSince path converted the JSON array from `jest --listTests --json` into newline-separated paths, making the output invalid JSON. This caused `jq 'length'` to fail and `jest.config.ts` to crash on `JSON.parse` when reading `jest-test-files.json`. Also remove `continue-on-error` on the artifact download so a missing file fails fast, and add an early guard in `jest.config.ts` that errors if CI sharding is configured but the test list is absent. Fix `passWithNoTests` to check presence rather than array length. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 692cce5. Configure here.
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
Yeah, I like this a lot. Nice!
This updates the tags that are included with the spans that we log whenever jest runs. I don't think any dashboards currently look at the tags, but they'll be nice to help slice&dice the data to see why outliers exist. I think going forward we'll see PR runs (where branch!=master) that have different perf characteristics. This will let us see how many tests were included, how many nodes they got spread over, we'll expect to see `strategy=by_duration` in all cases too. Follows #116749 Follows #116770

No description provided.