Skip to content

Fail when test results cannot be published - #85034

Merged
dibarbet merged 2 commits into
dotnet:mainfrom
dibarbet:dibarbet-linux-test-reporting
Aug 26, 2026
Merged

Fail when test results cannot be published#85034
dibarbet merged 2 commits into
dotnet:mainfrom
dibarbet:dibarbet-linux-test-reporting

Conversation

@dibarbet

@dibarbet dibarbet commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • fail the shared xUnit publishing task when Azure Pipelines cannot publish all test results
  • fail the task when no test result files are produced
  • surface incomplete test reporting as a task failure instead of a warning

This prevents runs such as 20260825.36 from showing only the test script failure when the test-results service rejects part of the upload. Log and dump publication remains unaffected because those steps use condition: always().

Validation

  • verified PublishTestResults@2 supports both failure options
  • ran git diff --check

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@dibarbet
dibarbet requested a review from a team as a code owner August 25, 2026 19:57
Copilot AI lite review requested due to automatic review settings August 25, 2026 19:57
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

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 tightens Azure Pipelines behavior in Roslyn’s shared log/test publishing template so that failures to publish test results are treated as task failures (rather than warnings), improving signal when the test-results service rejects uploads.

Changes:

  • Configure the PublishTestResults@2 xUnit publishing step to fail if Azure Pipelines cannot publish all test results.
Show a summary per file
File Description
eng/pipelines/publish-logs.yml Makes xUnit test-result publication failures fail the publishing task via failTaskOnFailureToPublishResults: true.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

Comment thread eng/pipelines/publish-logs.yml
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 25, 2026 22:23

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.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@dibarbet
dibarbet merged commit cf2cb53 into dotnet:main Aug 26, 2026
25 checks passed
@dibarbet
dibarbet deleted the dibarbet-linux-test-reporting branch August 26, 2026 16:27
@dotnet-policy-service dotnet-policy-service Bot added this to the Next milestone Aug 26, 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.

3 participants