Skip to content

Revert "Migrate from VSTest to Microsoft.Testing.Platform (#8498)"#8802

Merged
danmoseley merged 4 commits intodotnet:mainfrom
danmoseley:revertmtp
Apr 16, 2025
Merged

Revert "Migrate from VSTest to Microsoft.Testing.Platform (#8498)"#8802
danmoseley merged 4 commits intodotnet:mainfrom
danmoseley:revertmtp

Conversation

@danmoseley
Copy link
Member

@danmoseley danmoseley commented Apr 16, 2025

This reverts commit ac098f7 (#8498) as it hits microsoft/vscode-dotnettools#1922

cc @radical @Youssef1313 @captainsafia

It wasn't a clean revert because of some subsequent changes by @RussKie in #8706 -- is this right @RussKie

Before merging:

  • Run all the tests on azdo
  • Run the Outerloop tests workflow
  • Confirm that local runs are not broken
  • Check running from VS?
  • check build/test/debug in Codespaces

@danmoseley danmoseley requested a review from RussKie April 16, 2025 01:13
@github-actions github-actions bot added the area-engineering-systems infrastructure helix infra engineering repo stuff label Apr 16, 2025
@danmoseley
Copy link
Member Author

@karolz-ms this test timed out (was 45 sec timeout, this is with the new 180sec CI-only timeout even). I assume it's hung (?)

2025-04-16T01:20:16.7357658Z [xUnit.net 00:04:01.22]         | [2025-04-16T01:20:08] Aspire.Hosting.Dcp.dcpproc.monitor Information: monitor process exited, shutting down	{"pid": 6150}
2025-04-16T01:20:16.7358641Z   Failed Aspire.Hosting.Tests.DistributedApplicationTests.SpecifyingEnvPortInEndpointFlowsToEnv [3 m 11 s]
2025-04-16T01:20:16.7358775Z   Error Message:
2025-04-16T01:20:16.7359649Z    System.TimeoutException : The operation at /_/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs:602 timed out after reaching the limit of 180000ms.

Can you get a clue from the log?

@RussKie
Copy link
Contributor

RussKie commented Apr 16, 2025

If you'd pushed in the main trunk, we'd be able to run the outerloop and the full AzDO CI builds.

@danmoseley
Copy link
Member Author

If you'd pushed in the main trunk, we'd be able to run the outerloop and the full AzDO CI builds.

I don't follow :)

@RussKie
Copy link
Contributor

RussKie commented Apr 16, 2025

If you'd pushed in the main trunk, we'd be able to run the outerloop and the full AzDO CI builds.

I don't follow :)

You're working off your fork (kudos!), but this makes us unable to fully test this change. If you were to push into a branch on the main trunk (i.e., to dotnet/aspire instead of danmoseley/aspire), we could schedule an outerloop run for that branch as well as a full CI build in AzDO.

image
image

We don't execute all tests for pull-requests, so we can't be 100% certain until we test all test workflows.

@radical
Copy link
Member

radical commented Apr 16, 2025

Before merging:

  • Run all the tests on azdo
  • Run the Outerloop tests workflow
  • Confirm that local runs are not broken
  • Check running from VS?
  • check build/test/debug in Codespaces

@radical
Copy link
Member

radical commented Apr 16, 2025

We don't execute all tests for pull-requests, so we can't be 100% certain until we test all test workflows.

I can push and trigger a run. https://dev.azure.com/dnceng-public/public/_build?definitionId=274&_a=summary

@radical
Copy link
Member

radical commented Apr 16, 2025

Outerloop validation run - https://github.com/dotnet/aspire/actions/runs/14484113484

@radical
Copy link
Member

radical commented Apr 16, 2025

@RussKie QuarantinedTestRunsheetBuilder : error : Search failed https://github.com/dotnet/aspire/actions/runs/14484113484/job/40626482806

@RussKie
Copy link
Contributor

RussKie commented Apr 16, 2025

@RussKie QuarantinedTestRunsheetBuilder : error : Search failed dotnet/aspire/actions/runs/14484113484/job/40626482806

Boo.... Looking

@captainsafia
Copy link
Contributor

Before merging:

  • Run all the tests on azdo
  • Run the Outerloop tests workflow
  • Confirm that local runs are not broken
  • Check running from VS?

Can we add check build/test/debug in Codespaces to this list?

I've validated that reverted the PR fixes debugging tests locally but other should sanity check as well.

cc: @mitchdenny

@RussKie
Copy link
Contributor

RussKie commented Apr 16, 2025

@Youssef1313
Copy link
Member

@captainsafia @danmoseley @RussKie I'm not able to reproduce issues with VS Code DevKit.

image

@Youssef1313
Copy link
Member

Also in the potential workaround I suggested to @captainsafia, I forgot to mention one more required thing, which I wrote now in #8498 (comment). Could we wait until the workaround is tested please? or more info is gathered as I cannot reproduce locally?

@mitchdenny
Copy link
Member

@Youssef1313 I reproduced being unable to debug a test using the following:

  1. Opened this PR in a Codespace.
  2. Built one of the test projects and waited for it to show up in test explorer.
  3. Right clicked and selected the test to debug.

Got this error:

image

@Youssef1313
Copy link
Member

Youssef1313 commented Apr 16, 2025

Opened this PR

I assume you refer to #8498, and not this PR (#8802)?

For MTP to work in VSCode, you need DevKit. If you don't use DevKit, then only VSTest is supported, which can be simply worked around by adding Microsoft.NET.Test.Sdk and xunit.runner.visualstudio packages.

@captainsafia
Copy link
Contributor

@Youssef1313 Are you on reproing on Windows? The issue seems to be related to macOS/Linux.

I hopped on a couple of calls yesterday with @ocallesp on the VS Code team and he was able to reproduce the issue in those environments.

which can be simply worked around by adding Microsoft.NET.Test.Sdk and xunit.runner.visualstudio packages.'

I believe I attempted this workaround based on your comment here but didn't have success with it.

@Youssef1313
Copy link
Member

@captainsafia My comment wasn't complete as I forgot to mention another package. Have you tried with both packages? Can you send me logs with the two packages being included?

@captainsafia
Copy link
Contributor

@Youssef1313 Could you open a draft PR that demonstrates the workaround you think would help here? That might make it easier.

@Youssef1313
Copy link
Member

@captainsafia Indeed. Will do it in few minutes.

@Youssef1313
Copy link
Member

Youssef1313 commented Apr 16, 2025

Hmm, Microsoft.NET.Test.Sdk is actually implicitly included via Arcade, but I don't know if it could be that the version is too old. Could you try with #8819, and re-share the logs please?

Regarding that it's macOS/Linux specific, that's good information, as I was trying on Windows.

@danmoseley
Copy link
Member Author

@danmoseley we need to apply this patch: 0001-Roll-back-QuarantinedTestRunsheetBuilder.patch

...or use this: QuarantinedTestRunsheetBuilder.targets.txt

done -- btw, you can push yourself to this PR, no perms required :)

If you'd pushed in the main trunk, we'd be able to run the outerloop and the full AzDO CI builds.

Ah trunk == repo

@captainsafia
Copy link
Contributor

Hmm, Microsoft.NET.Test.Sdk is actually implicitly included via Arcade, but I don't know if it could be that the version is too old. Could you try with #8819, and re-share the logs please?

The changeset in that PR doesn't seem to build?

Regarding that it's macOS/Linux specific, that's good information, as I was trying on Windows.

You should be able to reproduce this in Linux on Codespaces as well since @mitchdenny is running into the problem as well and that's his VS Code setup.

@danmoseley
Copy link
Member Author

Timed out at 04/16/2025 15:29:09 after 60000ms waiting for remote process.
...
 Failed Aspire.Azure.Storage.Queues.Tests.ConformanceTests.TracingEnablesTheRightActivitySource_Keyed

Impossible to say why it timed out as the callstack is from the waiting process not the child.

@danmoseley
Copy link
Member Author

Do we want to merge this? need signoff/s.

@danmoseley danmoseley merged commit d2b3016 into dotnet:main Apr 16, 2025
175 checks passed
@danmoseley danmoseley deleted the revertmtp branch April 16, 2025 18:22
@radical
Copy link
Member

radical commented Apr 16, 2025

This broke outerloop test runs. Only a few test projects are running now - https://github.com/dotnet/aspire/actions/runs/14501563823/job/40682240457 .

RussKie added a commit that referenced this pull request Apr 17, 2025
Youssef1313 added a commit that referenced this pull request Apr 19, 2025
* Revert "Disable testing platform protocol mode in Workspace (#8825)"

This reverts commit 9a59c69.

* Reapply "Migrate from VSTest to Microsoft.Testing.Platform (#8498)" (#8802)

This reverts commit d2b3016.

* Add xunit.runner.visualstudio

* Temporary workaround
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-engineering-systems infrastructure helix infra engineering repo stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants