-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need docker
installed on the helix images for Windows, to allow individual tests to create containers
#2067
Comments
This is probably relevant - Run Docker Desktop for Windows in a VM or VDI environment. |
@dougbu Is there any other info that I can provide to help with this? |
I'm not sure that helps because I don't know if we are Docker Business customers. In any case, this issue has yet to be triaged or assigned and we're strapped at the moment. |
…ire` workload (#2534) # Problem: 1. We want to run some EndToEnd tests on CI, which can `dotnet run` an aspire project, and allow individual tests to interact with the services. This requires: - Ability to build, and run an aspire project - IOW, a sdk with the `aspire` workload installed. - `docker` 2. Also, allow using `TestProject.*` in `tests/testproject`, in two modes: - `in-tree` test run which directly reference aspire projects, and repo targets - `out-of-tree` test runs which uses a SDK+workload based on local build output # Solution: ### SDK+workload - SDK with version from `global.json` is installed into `artifacts/bin/dotnet-{none,latest}` - The `aspire` workload is installed into the sdk using the nuget packages in `artifacts/packages` with a version like `8.0.0-{dev,ci}` - this also allows running tests that do `dotnet new aspire-starter; dotnet run` same as a user - this utilizes an internal nuget from `dotnet/runtime` ### TestProject - This can switch between the two test run modes using the msbuild property `$(TestsRunningOutsideRepo)` - when running `in-tree` the test project directly references hosting targets, and aspire projects via `ProjectReference` - when running `out-of-tree` the `ProjectReferences` and imports are replaced with `PackageReferences` to the Aspire nugets - Default is to run `in-tree` ### Helix - The tests are built on the build machine - The testproject, and the sdk+workload is sent to helix - where the tests run using `dotnet` from the sdk+workload path - Since `docker` is needed to helix, this is enabled only for `Linux` in this PR. Blocked on dotnet/dnceng#2067 for windows support. ## TL;dr or How do I use this? ### Steps to prepare for `out-of-tree` runs 1. `.\build.cmd -pack` - to build all the nugets 2. `dotnet build tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.csproj /t:InstallWorkloadUsingArtifacts /p:Configuration=<config>` - this will install the sdk, and the `aspire` workload using the nugets from `artifacts/packages` - at this point the sdk is usable outside the repo too. Note: you need to add `artifacts/packages/$(Configuration)/Shipping` as a nuget source so the locally built packages can be picked up. ### Using it from VS - No difference when running the EndToEnd tests in `in-tree` mode - For switching to `out-of-tree` add `<TestsRunningOutsideRepo>true</TestsRunningOutsideRepo>` to `tests/Aspire.EndToEnd.Tests/Directory.props` *before* any imports. - tests cannot be run at this point as they will fail complaining about `artifacts/bin/dotnet-latest` being missing - Install the sdk+workload following the steps above - Run/debug the tests normally now, and they will be using the sdk - Also note that in this case the testproject is run from the bindir for `Aspire.EndToEnd.Tests`, so a path like `artifacts/bin/Aspire.EndToEnd.Tests/Debug/net8.0/testassets/testproject/` ### Using it from command line - No difference when running the EndToEnd tests in `in-tree` mode - Install the sdk+workload following the steps above - When running the tests you can either: - set `<TestsRunningOutsideRepo>true</TestsRunningOutsideRepo>` to `tests/Aspire.EndToEnd.Tests/Directory.props` before any imports - or set the environment variable `TestsRunningOutsideRepo=true` ### Other details - `tests/Shared/WorkloadTesting` - has sources essentially from `dotnet/runtime`'s `Wasm.Build.Tests` - TestProject supports skipping individual resources like `--skip-resources oracledatabase,cosmos` - `.runsettings` with 15min timeout - `xunit.runner.json` - to get diagnostic messages - The core infrastructure is not specific for `Aspire.EndToEnd.Tests`, and will get used by other test projects in the future ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/aspire/pull/2534)
Adding to Conversation about licensing issues and how we might do this work seems to have stalled. I'll nudge it… |
@radical you aren't part of that conversation. We'll report back once we have more information. |
While the two are related - mostly because we only have a single docker artifact that is used in both our build queues and our test queues, the images being referenced are different. You've made a link above between the two and I will make sure that when this is addressed, the other issue is also taken into account. I will let the Dev doing the work decide how he wants to address the github issue(s). |
@dougbu Can you point me to where the licensing conversations are happening? Is this something we can actually do, or we still don't know? |
There was an email thread on the licensing subject. I was going to at least look at the site-licensed installer and see if it Just worked ™️ on a DTL machine. Never got around to it and this whole subject has been on the backlog since. I'll add you to the thread if you're not there already. |
The answer is we don't know how this will work, and we need to reach out to procurement for guidance. I'll work on updating our docker artifact first, as that will be a prerequisite anyways. I don't think I'll get far enough to figure this out, as it's a completely new scenario where we don't have a clear path forward. |
Recommended next steps from the thread: reach out to ProcureWeb - Find a Procurement contact (sharepoint.com) |
We have some EndToEnd tests in
dotnet/aspire
that usedocker
to start some containers, and then interact with them. The tests are sent as helix work items. And the individual tests then indirectly usedocker
to create containers.This works on helix/linux with
Ubuntu.2204.Amd64[.Open]
queue. But not with the windows queues (triedWindows.10.Amd64.Client[.Open]
,Windows.10.Amd64.ServerRS5[.Open]
, andWindows.Amd64.Server2022[.Open]
) as docker is not installed.This is important for running integration/end-to-end tests for
dotnet/aspire
- which starts a bunch of containers for things like redis/mysql/etc.This is a test run from helix/linux .
cc @dougbu @eerhardt @joperezr
Release Note Category
Release Note Description
The text was updated successfully, but these errors were encountered: