Skip to content

Build Analysis misclassifies known Helix test failures after telemetry category removal #17340

Description

@steveisok

Build Analysis misclassifies known Helix test failures after telemetry category removal

Description

Build Analysis can remain red when every failing Helix test is matched to a known issue. The Helix SDK reports each failed test through CheckAzurePipelinesTestResults using Log.LogError(FailureCategory.Test, ...), but these errors now reach the Azure DevOps timeline as plain MSBuild errors:

Microsoft.DotNet.Helix.Sdk/.../AzurePipelines.MultiQueue.targets(44,5): error : Test <test> has failed.

Build Analysis correctly matches the corresponding test results to known issues, but also treats the unclassified timeline messages as independent build failures. The check therefore remains red.

This appears related to:

The Helix task still supplies FailureCategory.Test; that classification is no longer represented in the timeline message consumed by Build Analysis.

Example

The build had two failed tests:

  1. Loader/ContextualReflection/ContextualReflection/ContextualReflection.cmd, matched to Assert failure: !"OBJECTREF being accessed while thread is in preemptive GC mode." runtime#131925.
  2. Loader\classloader\StaticVirtualMethods\Regression\GitHub_130545\GitHub_130545.dll, matched to [ci-scan] Test failure: Loader.classloader.StaticVirtualMethods.Regression.GitHub_130545.DelegateOverStaticAbstractThroughGshare [Content truncated due to length] runtime#132030.

Build Analysis displayed both under Known test errors, but also displayed the AzurePipelines.MultiQueue.targets(44,5) messages under Build Failures. Those duplicate build failures kept the check red.

Expected behavior

Once every failed test is matched to a known issue, the corresponding Helix task-level errors should not independently fail Build Analysis.

Actual behavior

The known test failures are matched, but their plain MSBuild timeline errors remain unmatched and cause Build Analysis to fail.

Possible fixes

Either:

  • preserve FailureCategory.Test in a form Build Analysis can consume when forwarding MSBuild events to the Azure DevOps timeline, or
  • update Build Analysis to recognize and de-duplicate CheckAzurePipelinesTestResults errors against the corresponding failed test results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions