Azure-pipelines-tasks: PublishTestResults suddenly started failing

Created on 26 Jan 2020  路  23Comments  路  Source: microsoft/azure-pipelines-tasks

Required Information

Enter Task Name: PublishTestResults

Environment

https://dev.azure.com/Barsonax/Singularity/_build/results?buildId=795&view=logs&j=7e6a3fb7-dbfe-5169-4db8-92b72295ba6c&t=00c071ac-73ed-5f49-e7cf-e21abc5fcfbb

Issue Description

This task suddenly started to fail. I tried to rerun the build but it failed again. A couple of hours ago this still worked. It seems that results.publishtoevidencestore is no longer a valid command but the PublishTestResults still uses this.

Task logs

##[section]Starting: PublishTestResults
==============================================================================
Task         : Publish Test Results
Description  : Publish test results to Azure Pipelines
Version      : 2.162.2
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
==============================================================================
[command]"C:\Program Files\dotnet\dotnet.exe" --version
3.1.100
[command]d:\a\_tasks\PublishTestResults_0b0f01ed-7dde-43ff-9cbb-e48954daf9b1\2.162.2\modules\TestResultsPublisher.exe @d:\a\_temp\085f8250-4080-11ea-8c43-c9a11cfb16cf.txt
No build level attachments to publish.
Result Attachments will be stored in LogStore
Run Attachments will be stored in LogStore
Publishing test results to test run '1001200'.
TestResults To Publish 582, Test run id:1001200
Test results publishing 582, remaining: 0. Test run id: 1001200
Published Test Run : https://dev.azure.com/Barsonax/Singularity/_TestManagement/Runs?runId=1001200&_a=runCharts.
##[error]Unable to process command '##vso[results.publishtoevidencestore name=PublishTestResults;testrunner=VSTest;testrunsummary={"Total":582,"Failed":0,"Passed":582,"Skipped":0};description=Test Results published from Publish Test Results tool;]' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
##[error]##vso[results.publishtoevidencestore] is not a recognized command for Task command extension. TODO: DOC aka link
##[section]Finishing: PublishTestResults

Error logs

##[error]##vso[results.publishtoevidencestore] is not a recognized command for Task command extension. TODO: DOC aka link
##[section]Finishing: PublishTestResults

image

Test triage

Most helpful comment

just re-tested with Hosted Agent:
Agent is on 2.163.1 version still
PublishTestResults is on 2.162.2

working :))))

All 23 comments

We are facing the same issue within our organization. PublishTestResults (V2) started to fail suddenly.

@Barsonax or @nishantkagrawal Is it possible to upgrade to the latest version of the agent ?
Looks like the command it's looking for is not in the 2.162.2 agent version. Meanwhile I will be working on the task fix as well.

Our pipeline tests had night schedule and they were also started failing.
It resolves after upgrading agent from "agent pool" page.

We've got agent 2.163.1 and we're having this problem now too!

We got the same problem (Current agent version: '2.163.1'). Any ideas for a workaround until it has been fixed?

I have started on rolling out the workaround it might take another 5 to 6 hours.
But updating to the agent versions 2.164.* should fix the issue.

Sorry for the inconvenience.

We got the same problem (Current agent version: '2.163.1'). Any ideas for a workaround until it has been fixed?

Add a Pipeline Variable UpdateBuildSummaryPage to false for Microservices.
It will eventually skip that Task.

How can I upgrade the Build Agent in a .yml pipeline definition?

How can I upgrade the Build Agent in a .yml pipeline definition?

I think you can only do it from the Agent Pool section of Azure Devops. Click on "Update all agents" or the "..." symbol next to an agent.

Wait that doesn't help - still on 2.163.1. Creating a new agent also offers only 2.163.1 so you may need to use this link:
https://vstsagentpackage.azureedge.net/agent/2.164.1/vsts-agent-win-x64-2.164.1.zip

There is another workaround: downgrade the task from 2.* into 1.*.

Note that this is also affecting Microsoft-Hosted agents which cannot be updated manually.

I can confirm upgrading to 2.164.1 fixes the problem.
For those upgrading manually:

  1. Download and extract the .zip
  2. Stop the service
  3. Delete all your bin* and externals* directories and junctions
  4. Copy the new bin\ and externals\ directories into your agent's directory
  5. Start service

I have also started on rolling out the workaround. It's done in couple of regions.
It should be mitigated in another 3-4 hours.

There is another workaround: downgrade the task from 2.* into 1.*.

Downgrading the task to v1 worked for me.

Downgrading works, luckily I have a shared template for 30+ projects. :100:

I tried "Update all agents", but they're still on 2.163.1, so I also went for downgrading the Task to v1 for now. And that seems to work.

I have rolled out the mitigation. You guys shouldn't see this issue anymore, can you guys please check?

Downgrading the Task to v1 seems to work (with a warning).

just re-tested with Hosted Agent:
Agent is on 2.163.1 version still
PublishTestResults is on 2.162.2

working :))))

It's working again. 馃憤

I can also confirm that it's working again.

Its working again so closing this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexszilagyi picture alexszilagyi  路  3Comments

yaananth picture yaananth  路  3Comments

gregpakes picture gregpakes  路  3Comments

jared-hexagon picture jared-hexagon  路  3Comments

timfish picture timfish  路  3Comments