Skip to content

fix(ci): select latest test-result artifacts by creation time - #11329

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-11328-fix-stale-test-result-artifacts
Sep 18, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-11328-fix-stale-test-result-artifacts

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Fixes #11328.

The pinned artifact downloader chooses one artifact per name by descending artifact ID. In CI run 35388538285, the successful Windows Functional net10 rerun uploaded artifact 10566159940 at 20:38:46 UTC, while the earlier failing upload had the larger ID 10566260879 at 20:14:10 UTC. The reporting workflow consequently retained the earlier failures. Explicit artifact IDs pass through the same latest-by-ID filter.

Download test results through a trusted PowerShell helper which reads every REST artifact page, selects the newest created_at for each exact partition name, and downloads that immutable ID directly. Per-partition selection preserves successful shards from earlier attempts. Ambiguous timestamps, expired or unavailable selected artifacts, incomplete listings, and missing result files fail explicitly. The helper checks source run/commit/attempt identity, verifies available SHA-256 digests, and keeps each archive in its own fresh directory.

Add focused regression fixtures and a read-only Windows/Linux workflow for selection and dry-run reporting. A read-only replay of the affected run selects all 54 current partitions and produces 48,178 passed, 0 failed, and 280 skipped; Windows Functional net10 reports 537 passed and 0 failed.

Coverage collection, required matrix, input fingerprints, publishing permissions, and provider branches remain unchanged. Deployment follows the existing trusted default-branch reporter model after human-reviewed landing.

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings September 18, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The changes require final human review because they are too complex or risky for automated approval.

Review effort: Lite
Findings: None

What changed in this PR

Updates test-result artifact selection to choose the newest artifact by creation time per partition, preserving successful reruns and untouched partitions.

Changes:

  • Replaces generic artifact downloading with validated PowerShell selection and direct immutable-ID downloads.
  • Adds provenance, digest, pagination, expiry, archive, and missing-result validation.
  • Adds cross-platform regression tests for selection and reporting.
File Description
.github/​workflows/​test-test-results.yml Updated as part of this pull request.
.github/​workflows/​test-results.yml Updated as part of this pull request.
.github/​scripts/​test-test-results.ps1 Updated as part of this pull request.
.github/​scripts/​download-test-results.ps1 Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 82.26% (112,541 / 136,817)
Branches 71.52% (32,457 / 45,383)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 986e5c7, not current main dcf2925.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

@ReubenBond
ReubenBond marked this pull request as ready for review September 18, 2026 21:47
@ReubenBond
ReubenBond requested a balanced review from Copilot September 18, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The implementation addresses stale rerun artifacts with defensive validation and comprehensive focused tests.

Review effort: Balanced
Findings: None

@ReubenBond
ReubenBond merged commit a1bd5f2 into dotnet:main Sep 18, 2026
75 checks passed
@ReubenBond
ReubenBond deleted the rb-11328-fix-stale-test-result-artifacts branch September 18, 2026 22:04
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: test-results report retains failed attempt after successful rerun

2 participants