Type: Bug
Task Name: Visual Studio Test
Agent - Hosted:
OS: Windows Server 2016 Standard
Visual Studio Version: 2019
Agent Version: 2.155.1
The task has started failing every time it runs. It started failing when the pipeline auto-updated the task from version 2.159.1 to version 2.160.2.
The log for this task shows it failing with a System.IO.FileNotFoundException:
`##[error]Error occured while executing System.IO.FileNotFoundException: Could not find file 'E:\agentG2_work_temp\m0umztbldww.tmp'.
File name: 'E:\agentG2_work_temp\m0umztbldww.tmp'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding)
at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
at MS.VS.TestService.VstestConsoleAdapter.TestSelectorCommandInputs.GetTestsList(String listTestsFile)
at MS.VS.TestService.VstestConsoleAdapter.TestSelectorCommandInputs.GetImpactedTestsCommandInput(VstestConsoleRunContext testRunContext)
at MS.VS.TestService.VstestConsoleAdapter.ExecutionStateResolver.GetNextPhase(VstestConsoleRunContext consoleRunContext, ITestRunPhase currentPhase, ITestRunPhaseResults phaseResult)
Completed TestExecution Model...
Running into the same error. I have 6 test tasks in a pipeline and this was happening to two of them - the ones that had "Run only impacted tests" checked. Unchecked that and now the test tasks don't error out.
Running into the same error. I have 6 test tasks in a pipeline and this was happening to two of them - the ones that had "Run only impacted tests" checked. Unchecked that and now the test tasks don't error out.
I tried unchecking that box on my test task...and my pipeline runs OK. That is a good enough workaround for me. Thanks for providing the suggestion.
We have this problem too, only since today...
Task is 2.160.2 but i can't be sure about the previous version.
We never had any issue with the checked option "Run only impacted tests" before today.
The temporary workaround will do but a quick fix or rollback would be great!
We are encountering this problem as well.
We get the same error
FYI - I reached out to @AzureDevOps on twitter yesterday about this. Here is their most recent response:
Thanks for sharing this with us! We noticed that some other users are experiencing a similar problem and that you shared a considerable amount of details, including the error log. Our engineers will reach out rather swiftly to look further into this. We appreciate your help.
We are facing the same issue, since the auto-upgrade from 2.159.1 to 2.160.2.
We are getting System.IO.FileLoadException loading our CLI/C++ assemblies from C# test projects.
We have faced the same issue, since the auto-upgrade from 2.159.1 to 2.160.2. We have found the reason: the generated .runsettings file by the task uses single '\' instead of '\\'. See attached files.
Using the settings file with '\\' solved the issue for us.
runsettings_2.159.1.runsettings.txt
runsettings_2.160.2.runsettings.txt
I believe we have a regression when "run only impacted tests" is selected. We will get the RCA at the soonest and hotfix the task in the next few days. Stay tuned here for updates.
As for
We have faced the same issue, since the auto-upgrade from 2.159.1 to 2.160.2. We have found the reason: the generated .runsettings file by the task uses single '\' instead of '\'. See attached files.
We have already hotfixed this and the update should reach all accounts in the next 2-3 days.
I have identified the issue and have made the fix. Will post the hotfix deployment status here once i start the process
If something like this occurs in the future, is there a way we can force the pipeline to use a specific previous minor version of the task?
In this instance, making it use 2.159.1 would have been an easy workaround until the hotfix version was published.
@KevinCust this is something we've actually thought about before.
There are a few limitations though, a simple roll back is not possible. As of today if i wanted to rollback i would have take the old task package change the task version to something greater than what is present and deploy a hotfix the make the change. And this generally can be completed in 4-5 hours tops. And we have done this once or twice when the break was so complex that it would take us a day or two to figure out the root cause.
In this case the change required was quite literally 3 lines of code, (and of course a few reactionary items to go fix our telemetry so that we can auto detect a similar issue in the future) but we were able to make the fix in a very short amount of time and i am starting the deployment as i am typing this out and will update the status here.
This has been hotfixed for all accounts. You will find the fix in task version 2.160.4 or 2.161.2 and above. Please let me know if you are able to turn on test impact and get things going again. And thank for you bringing this to our notice.
Please note that by adding the "Area: Test" tag to the issue you can get the issue routed to us much sooner and reduce the delay for a response.
I gave it a go and can confirm v2.160.4 works as expected while looking for impacted tests again :
***************************** Section 'Get Impacted Tests' Starting *****************************
V, 2019/11/20, 15:06:05.737, PERF: CreateTestRun: took 153.1381 ms
V, 2019/11/20, 15:06:05.737, PERF WARNING: CreateTestRun: took 153.1381 ms
V, 2019/11/20, 15:06:05.737, Tests that are discovered.
...
V, 2019/11/20, 15:06:07.018, Published Test Run : 1013592
***************************** Section 'Update test results' Ended ********************************
Apologies again for the break and thank you everyone for reporting this and being patient while we patched it up.
Most helpful comment
Running into the same error. I have 6 test tasks in a pipeline and this was happening to two of them - the ones that had "Run only impacted tests" checked. Unchecked that and now the test tasks don't error out.