Skip to content

ci: Extract test names for flaky test issues#20298

Merged
nicohrubec merged 9 commits intodevelopfrom
nh/get-test-name
Apr 15, 2026
Merged

ci: Extract test names for flaky test issues#20298
nicohrubec merged 9 commits intodevelopfrom
nh/get-test-name

Conversation

@nicohrubec
Copy link
Copy Markdown
Member

@nicohrubec nicohrubec commented Apr 15, 2026

Extract the exact failing test name from GitHub check annotations (via Vitest github-actions and Playwright github reporters) and include it in the issue title. This allows us to change issue deduplication from per job to per test. Previously, if test A flaked and created an issue for "Node 18 Integration Tests", a later flake of test B for the same job would be skipped; now each failing test gets its own issue.

Example issue

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.78 kB - -
@sentry/browser - with treeshaking flags 24.27 kB - -
@sentry/browser (incl. Tracing) 42.77 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.4 kB - -
@sentry/browser (incl. Tracing, Replay) 81.69 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 71.22 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 86.39 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.6 kB - -
@sentry/browser (incl. Feedback) 42.59 kB - -
@sentry/browser (incl. sendFeedback) 30.45 kB - -
@sentry/browser (incl. FeedbackAsync) 35.45 kB - -
@sentry/browser (incl. Metrics) 27.07 kB - -
@sentry/browser (incl. Logs) 27.2 kB - -
@sentry/browser (incl. Metrics & Logs) 27.89 kB - -
@sentry/react 27.53 kB - -
@sentry/react (incl. Tracing) 45.09 kB - -
@sentry/vue 30.61 kB - -
@sentry/vue (incl. Tracing) 44.63 kB - -
@sentry/svelte 25.8 kB - -
CDN Bundle 28.46 kB - -
CDN Bundle (incl. Tracing) 43.82 kB - -
CDN Bundle (incl. Logs, Metrics) 29.83 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.89 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.73 kB - -
CDN Bundle (incl. Tracing, Replay) 80.78 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.83 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 86.31 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 87.34 kB - -
CDN Bundle - uncompressed 83.12 kB - -
CDN Bundle (incl. Tracing) - uncompressed 129.95 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 133.36 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 210.63 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 247.21 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 250.6 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 260.12 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 263.51 kB - -
@sentry/nextjs (client) 47.52 kB - -
@sentry/sveltekit (client) 43.24 kB - -
@sentry/node-core 57.94 kB +0.02% +8 B 🔺
@sentry/node 174.76 kB +0.01% +11 B 🔺
@sentry/node - without tracing 97.8 kB +0.02% +10 B 🔺
@sentry/aws-serverless 115.06 kB +0.01% +7 B 🔺

View base workflow run

@nicohrubec nicohrubec changed the title get test name for failed tests ci: Extract test names for flaky test issues Apr 15, 2026
@nicohrubec nicohrubec marked this pull request as ready for review April 15, 2026 09:17
Lms24
Lms24 previously approved these changes Apr 15, 2026
@Lms24 Lms24 dismissed their stale review April 15, 2026 09:48

too fast lol

Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit hesitant about approving this because it seems like this could get more noisier than at the moment. Though then again, it much more aligns with how we'd manually open an issue for flaky CI. I think similarly to the previous iterations we can just give it a try and adjust/revert if it gets too noisy.

One note: wdyt about extracting this script into /srcipts/*? Reading JS in a yml file is quite painful IMHO 😅

@@ -1,5 +1,5 @@
---
title: '[Flaky CI]: {{ env.JOB_NAME }}'
title: '[Flaky CI]: {{ env.JOB_NAME }} - {{ env.TEST_NAME }}'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means issue titles could get quite long but I guess it's somewhat necessary when we need an automated way to set the title to something more specific than the job name. Easy to do manually, hard for a machine :D anyway, we can follow up on this. not a blocker for now

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we could ask an LLM but that would break deduplication, i.e. we would need to put in a deterministic ruleset else this won't work properly. I don't wanna over engineer this, but we could definitely think about putting in some simple heuristics if we can think of anything that makes sense! I'll merge as is for now and maybe we can revisit later

Copy link
Copy Markdown
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for moving this into a dedicated script

@nicohrubec
Copy link
Copy Markdown
Member Author

@chargome @Lms24 agreed that this is painful to read, will try to refactor this into a script 😅

Comment thread scripts/report-ci-failures.mjs
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dc939a7. Configure here.

Comment thread .github/workflows/build.yml Outdated
Comment thread packages/core/test/lib/session.test.ts Outdated
Comment thread packages/core/test/lib/session.test.ts Outdated
describe('Session', () => {
// TEMPORARY: Guaranteed failure to verify issue creation in CI
it('TEMPORARY - should fail to test annotation extraction', () => {
expect(true).toBe(false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: I think this should go away before merging right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes doing a last test run 😄

This reverts commit dc939a7.
@nicohrubec nicohrubec merged commit 0007c7b into develop Apr 15, 2026
450 of 453 checks passed
@nicohrubec nicohrubec deleted the nh/get-test-name branch April 15, 2026 13:46
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.

4 participants