Skip to content

feat(github-reporter): emit failure annotations as tests finish#40590

Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom
Skn0tt:github-reporter-progressive
May 4, 2026
Merged

feat(github-reporter): emit failure annotations as tests finish#40590
pavelfeldman merged 1 commit intomicrosoft:mainfrom
Skn0tt:github-reporter-progressive

Conversation

@Skn0tt
Copy link
Copy Markdown
Member

@Skn0tt Skn0tt commented May 4, 2026

Summary

Emit GitHub failure annotations as tests finish, instead of buffering them until the run summary at the end. This way, timed-out or cancelled CI jobs still preserve ::error annotations for tests that already failed.

Slow-test annotations and the run summary still emit at the end, since they need aggregated data.

Behavior of the existing failure annotations is preserved:

  • Deferred until a test will not retry again (via willRetry).
  • Same filtering as generateSummary's failuresToPrint (unexpected, flaky, or skipped-with-interrupted-error).
  • Per-test index shared across all retries of the same test.

Fixes #40524

Previously, the GitHub reporter buffered all failure annotations and emitted
them at the end of the run. When CI jobs were timed out or cancelled mid-run,
this meant no `::error` annotations were produced for tests that already
failed.

Now, failure annotations are emitted per test in `onTestEnd`, while
slow-test annotations and the run summary still emit at the end.

Behavior is preserved: annotations are deferred until a test will not retry
again, and the same filtering as `generateSummary`'s `failuresToPrint` is
applied (unexpected, flaky, or interrupted-with-error). The per-test index
is shared across all retries of the same test, matching the original
output.

Fixes microsoft#40524
@Skn0tt Skn0tt requested a review from dgozman May 4, 2026 09:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Test results for "MCP"

1 failed
❌ [chrome] › mcp/autowait.spec.ts:19 › racy navigation destroys context @mcp-windows-latest-chrome

6875 passed, 1015 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Test results for "tests 1"

1 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`

41658 passed, 784 skipped


Merge workflow run.

@pavelfeldman pavelfeldman merged commit c74c33d into microsoft:main May 4, 2026
44 of 45 checks passed
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.

[Feature]: Support for immediately logging failures when using Github reporter

2 participants