Skip to content

Restore stable test storage for Helix results - #17429

Merged
mmitche merged 3 commits into
dotnet:mainfrom
mmitche:mmitche/fix-helix-test-storage
Aug 27, 2026
Merged

mmitche merged 3 commits into
dotnet:mainfrom
mmitche:mmitche/fix-helix-test-storage

Conversation

@mmitche

@mmitche mmitche commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

Restore the Helix work item name as automatedTestStorage when the Job Monitor publishes test results.

The monitor currently serializes { HelixJobId, HelixWorkItemName } into both comment and automatedTestStorage. Because HelixJobId changes for every submission, Azure DevOps sees a different test definition on every pipeline build and creates new test case reference rows instead of reusing existing definitions. At runtime scale this creates substantial test-definition insertion pressure and contributes to result-upload 503s.

This change returns to the original behavior:

  • automatedTestStorage uses the stable Helix work item name.
  • Per-build Helix job and work-item correlation remains in comment.
  • A regression test verifies different Helix job IDs produce identical test storage while retaining distinct comments.

This PR is intentionally separated from the broader Job Monitor result-processing refactor.

Validation

  • Microsoft.DotNet.Helix.Sdk.Tests: 300 passed

Use the stable Helix work item name as automatedTestStorage instead of per-build result metadata. Keep Helix job correlation in the result comment so Azure DevOps can reuse test case references across builds.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 810f897d-3e88-4973-9e90-5e76fb0ba4bc
Copilot AI lite review requested due to automatic review settings August 27, 2026 18:27

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.

Pull request overview

This PR restores stable Azure DevOps test definition identity for Helix result uploads by ensuring AutomatedTestStorage is set to the stable Helix work item name, while keeping per-submission correlation data (job/work item) in the Comment field to aid diagnostics and traceability.

Changes:

  • Update result publishing APIs to accept an explicit testStorage value and flow it through conversion/publish.
  • Set AutomatedTestStorage to the provided stable work item name instead of embedding per-job metadata.
  • Add a regression test ensuring differing Helix job IDs produce identical AutomatedTestStorage while preserving distinct Comment content.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/AzureDevOpsResultPublisherTests.cs Updates call sites for the new testStorage parameter and adds a regression test validating stable AutomatedTestStorage behavior.
src/Microsoft.DotNet.Helix/JobMonitor/TestResults/AzureDevOpsResultPublisher.cs Threads a testStorage parameter through upload/convert logic and uses it for AutomatedTestStorage.
src/Microsoft.DotNet.Helix/JobMonitor/Services/AzureDevOpsService.cs Passes results.WorkItemName as the stable testStorage when uploading results.

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

Retain result metadata because CheckAzurePipelinesTestResults consumes the classic Helix comment contract to correlate failures with work item console logs.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 810f897d-3e88-4973-9e90-5e76fb0ba4bc
Copilot AI review requested due to automatic review settings August 27, 2026 18:51

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Pass the work item name and job ID directly to the publisher, construct the established correlation comment there, and document why Azure DevOps test storage must remain stable across builds.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 810f897d-3e88-4973-9e90-5e76fb0ba4bc
Copilot AI review requested due to automatic review settings August 27, 2026 18: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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@mmitche
mmitche merged commit 8957596 into dotnet:main Aug 27, 2026
12 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 28, 2026
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