ref(ci): Dedupe matrix test failures in CI failure reporter#21538
Merged
Conversation
chargome
approved these changes
Jun 15, 2026
nicohrubec
approved these changes
Jun 15, 2026
A flaky test usually fails on several matrix jobs at once (e.g. Node (22), Node (24), Node (24) (TS 3.8) Integration Tests). Because the issue title embedded the full job name, each variant opened a separate issue. Key the issue title on a normalized job name with version-like matrix parentheticals stripped — a bare number (node version) or a `TS x.y` bracket — so all variants of the same job+test collapse to one issue. Other parentheticals (e.g. `(nextjs-app, 20)`) are left intact. Also dedupe titles handled within a single run, since the existing-issues list is fetched once and wouldn't include issues created earlier in the same run. The issue body keeps the concrete job name and run link of the variant that failed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0b48729 to
da7443d
Compare
48 tasks
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.
Summary
A flaky test usually fails on several matrix jobs in the same run (e.g.
Node (22) Integration Tests,Node (24) Integration Tests,Node (24) (TS 3.8) Integration Tests). Because the issue title embedded the full job name, each matrix variant opened its own issue for what is really the same flaky test.report-ci-failures.mjsnow keys the issue title on a normalized job name with only version-like matrix parentheticals stripped — a bare number (node version) or aTS x.ybracket:Node (22) Integration TestsNode Integration TestsNode (24) Integration TestsNode Integration TestsNode (24) (TS 3.8) Integration TestsNode Integration TestsOther parentheticals are left intact, so genuinely-distinct jobs don't get merged — e.g.
E2E (nextjs-app, 20)stays as-is.Also dedupes titles within a single run — the existing-issues list is fetched once up front and wouldn't include an issue created moments earlier in the same run, so without this the second matrix job would still open a duplicate.
The issue body keeps the concrete job name and run link of the variant that actually failed, so the link still points at a real failing run.