Skip to content

Commit 46cf262

Browse files
authored
Merge branch 'main' into managed-resolver
2 parents 0d891cb + 32e33a3 commit 46cf262

File tree

720 files changed

+25676
-3196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

720 files changed

+25676
-3196
lines changed

.github/copilot-instructions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ In building and testing, never use `dotnet` without extension. Use `dotnet.sh` o
3737
* Do not emit "Act", "Arrange" or "Assert" comments.
3838
* We do not use any mocking framework at the moment.
3939
* Copy existing style in nearby files for test method names and capitalization.
40+
* Do not use Directory.SetCurrentDirectory in tests as it can cause side effects when tests execute concurrently.
4041

4142
## Running tests
4243

@@ -48,6 +49,20 @@ Note that tests for a project can be executed without first building from the ro
4849

4950
(4) To run just certain tests, it's important to include the filter after `--`, for example `dotnet.sh test tests/Aspire.Hosting.Testing.Tests/Aspire.Hosting.Testing.Tests.csproj --no-build --logger "console;verbosity=detailed" -- --filter "TestingBuilderHasAllPropertiesFromRealBuilder"`
5051

52+
### Important: Excluding Quarantined Tests
53+
54+
When running tests in automated environments (including Copilot agent), **always exclude quarantined tests** to avoid false negatives:
55+
56+
```bash
57+
# Correct - excludes quarantined tests (use this in automation)
58+
dotnet.sh test tests/Project.Tests/Project.Tests.csproj --filter-not-trait "quarantined=true"
59+
60+
# For specific test filters, combine with quarantine exclusion
61+
dotnet.sh test tests/Project.Tests/Project.Tests.csproj -- --filter "TestName" --filter-not-trait "quarantined=true"
62+
```
63+
64+
Never run all tests without the quarantine filter in automated environments, as this will include flaky tests that are known to fail intermittently.
65+
5166
## Quarantined tests
5267

5368
- Tests that are flaky and don't fail deterministically are marked with the `QuarantinedTest` attribute.

.github/workflows/tests-outerloop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
}
103103
104104
results:
105-
if: always()
105+
if: ${{ always() && github.repository_owner == 'dotnet' }}
106106
runs-on: ubuntu-latest
107107
name: Final Results
108108
needs: run_tests

Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<PackageVersion Include="StackExchange.Redis" Version="2.8.37" />
109109
<PackageVersion Include="System.IO.Hashing" Version="9.0.4" />
110110
<PackageVersion Include="Yarp.ReverseProxy" Version="2.3.0" />
111-
<PackageVersion Include="StreamJsonRpc" Version="2.21.69" />
111+
<PackageVersion Include="StreamJsonRpc" Version="2.22.11" />
112112
<PackageVersion Include="Semver" Version="3.0.0" />
113113
<!-- Open Telemetry -->
114114
<PackageVersion Include="Npgsql.OpenTelemetry" Version="9.0.3" />
@@ -125,6 +125,7 @@
125125
<PackageVersion Include="Microsoft.DotNet.Build.Tasks.Workloads" Version="8.0.0-beta.23564.4" />
126126
<PackageVersion Include="Microsoft.Signed.Wix" Version="$(MicrosoftSignedWixVersion)" />
127127
<PackageVersion Include="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23564.4" />
128+
<PackageVersion Include="Microsoft.DotNet.Build.Tasks.Archives" Version="8.0.0-beta.23564.4" />
128129
<PackageVersion Include="Microsoft.DotNet.GenAPI.Task" Version="9.0.103-servicing.25065.25" />
129130
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta5.25256.109" />
130131
<!-- Fuzzing tests dependencies -->

docs/contributing.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@ injected. An example is below:
4848
Note that injection doesn't happen until a component's `OnInitialized`, so if you are referencing a string from codebehind, you must wait to do that
4949
until `OnInitialized`.
5050

51+
## Testing
52+
53+
### Running Tests
54+
55+
To run tests, use the build script:
56+
57+
```bash
58+
./build.sh --test # Linux/macOS
59+
./build.cmd --test # Windows
60+
```
61+
62+
### Quarantined Tests
63+
64+
Flaky tests may be marked as quarantined to prevent them from blocking CI while being investigated and fixed. See [quarantined-tests.md](quarantined-tests.md) for more information on working with quarantined tests.
65+
66+
When running tests locally or in automated environments, use the quarantine filter to exclude known flaky tests:
67+
68+
```bash
69+
dotnet test --filter-not-trait "quarantined=true"
70+
```
71+
5172
## Integrations (Formerly Components)
5273

5374
Please check the [.NET Aspire integrations contribution guidelines](../src/Components/README.md) if you intend to make contributions to a new or existing .NET Aspire integration.

docs/quarantined-tests.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Quarantined Tests
2+
3+
## Overview
4+
5+
Quarantined tests are tests that are flaky or known to have issues but are not yet fixed. They are marked with the `[QuarantinedTest]` attribute and are excluded from regular CI runs to prevent false negatives.
6+
7+
## How Quarantined Tests Work
8+
9+
The `QuarantinedTestAttribute` applies the xUnit trait `quarantined=true` to tests. This trait can then be used with test filters to include or exclude these tests.
10+
11+
## Running Tests Without Quarantined Tests
12+
13+
To run tests excluding quarantined tests (this is what CI does):
14+
15+
```bash
16+
dotnet test --filter-not-trait "quarantined=true"
17+
```
18+
19+
Or using the direct test runner:
20+
21+
```bash
22+
dotnet exec YourTestAssembly.dll --filter-not-trait "quarantined=true"
23+
```
24+
25+
## Running Only Quarantined Tests
26+
27+
To run only quarantined tests (useful for debugging):
28+
29+
```bash
30+
dotnet test --filter-trait "quarantined=true"
31+
```
32+
33+
Or using the direct test runner:
34+
35+
```bash
36+
dotnet exec YourTestAssembly.dll --filter-trait "quarantined=true"
37+
```
38+
39+
## Quarantined Test Lifecycle
40+
41+
1. **Mark as Quarantined**: When a test is consistently flaky, mark it with `[QuarantinedTest("reason")]`
42+
2. **Outerloop Execution**: Quarantined tests run automatically in the outerloop CI (every 2 hours)
43+
3. **Fix the Issue**: Investigate and fix the underlying issue causing the flakiness
44+
4. **Remove Quarantine**: Once fixed and stable, remove the `[QuarantinedTest]` attribute
45+
46+
## Example
47+
48+
```csharp
49+
[Fact]
50+
[QuarantinedTest("https://github.com/dotnet/aspire/issues/7920")]
51+
public async Task FlakyTest()
52+
{
53+
// Test implementation
54+
}
55+
```
56+
57+
## CI Integration
58+
59+
- **Regular CI**: Uses `--filter-not-trait "quarantined=true"` to exclude quarantined tests
60+
- **Outerloop CI**: Runs quarantined tests separately to monitor their status
61+
- **Results**: Quarantined test failures don't block PR merges but are tracked for fixes
62+
63+
## For Copilot Agent and Test Runners
64+
65+
When running tests in automated environments like Copilot agent, always use the quarantine filter to avoid false negatives:
66+
67+
```bash
68+
# Good - excludes quarantined tests
69+
dotnet test --filter-not-trait "quarantined=true"
70+
71+
# Bad - runs all tests including quarantined ones
72+
dotnet test
73+
```

eng/Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<ProjectToBuild Include="$(RepoRoot)src\**\*.csproj" Exclude="$(RepoRoot)src\Aspire.ProjectTemplates\templates\**\*.csproj" />
44
<ProjectToBuild Include="$(RepoRoot)eng\dcppack\**\*.csproj" />
55
<ProjectToBuild Include="$(RepoRoot)eng\dashboardpack\**\*.csproj" />
6+
<ProjectToBuild Include="$(RepoRoot)eng\clipack\**\*.csproj" />
67
<ProjectToBuild Include="$(RepoRoot)playground\**\*.csproj" />
78

89
<!-- `$(SkipTestProjects)` allows skipping test projects from being

eng/Publishing.props

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
<_InstallersToPublish Include="$(ArtifactsDir)**\*.wixpack.zip" Condition="'$(PostBuildSign)' == 'true'" />
2424
<_InstallerManifestFilesToPublish Include="$(ArtifactsDir)VSSetup\$(Configuration)\Insertion\**\*.zip" />
2525
<_DashboardFilesToPublish Include="$(DashboardPublishedArtifactsOutputDir)\**\*.zip" />
26+
<_CliFilesToPublish Include="$(ArtifactsShippingPackagesDir)\aspire-cli-*" />
2627
</ItemGroup>
2728

2829
<Target Name="_PublishBlobItems">
29-
<!--
30+
<!--
3031
For blob items for the Dashboard, we want to make sure that the version we get back is not stable, even when the repo is producing stable versions.
3132
This is because we want to be able to re-spin the build if necessary without hitting issues of blob items clashing with each other. For this reason,
3233
We will pass SuppressFinalPackageVersion as true when fetching the package version so that we get back a version with a prerelease suffix.
@@ -54,6 +55,11 @@
5455
<PublishFlatContainer>true</PublishFlatContainer>
5556
<RelativeBlobPath>$(_UploadPathRoot)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
5657
</ItemsToPushToBlobFeed>
58+
<ItemsToPushToBlobFeed Include="@(_CliFilesToPublish)">
59+
<IsShipping>false</IsShipping>
60+
<PublishFlatContainer>true</PublishFlatContainer>
61+
<RelativeBlobPath>$(_UploadPathRoot)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
62+
</ItemsToPushToBlobFeed>
5763
</ItemGroup>
5864
</Target>
59-
</Project>
65+
</Project>

eng/Version.Details.xml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-amd64" Version="0.15.6">
4+
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-amd64" Version="0.15.9">
55
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
6-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
6+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
77
</Dependency>
8-
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-arm64" Version="0.15.6">
8+
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-arm64" Version="0.15.9">
99
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
10-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
10+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
1111
</Dependency>
12-
<Dependency Name="Microsoft.DeveloperControlPlane.linux-amd64" Version="0.15.6">
12+
<Dependency Name="Microsoft.DeveloperControlPlane.linux-amd64" Version="0.15.9">
1313
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
14-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
14+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
1515
</Dependency>
16-
<Dependency Name="Microsoft.DeveloperControlPlane.linux-arm64" Version="0.15.6">
16+
<Dependency Name="Microsoft.DeveloperControlPlane.linux-arm64" Version="0.15.9">
1717
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
18-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
18+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
1919
</Dependency>
20-
<Dependency Name="Microsoft.DeveloperControlPlane.windows-386" Version="0.15.6">
20+
<Dependency Name="Microsoft.DeveloperControlPlane.linux-musl-amd64" Version="0.15.9">
2121
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
22-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
22+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
2323
</Dependency>
24-
<Dependency Name="Microsoft.DeveloperControlPlane.windows-amd64" Version="0.15.6">
24+
<Dependency Name="Microsoft.DeveloperControlPlane.windows-386" Version="0.15.9">
2525
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
26-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
26+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
2727
</Dependency>
28-
<Dependency Name="Microsoft.DeveloperControlPlane.windows-arm64" Version="0.15.6">
28+
<Dependency Name="Microsoft.DeveloperControlPlane.windows-amd64" Version="0.15.9">
2929
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
30-
<Sha>454a225930c6dff1fa67cd276a301af02df48886</Sha>
30+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
31+
</Dependency>
32+
<Dependency Name="Microsoft.DeveloperControlPlane.windows-arm64" Version="0.15.9">
33+
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
34+
<Sha>1436c874e352effd43b11241933c5e635a038795</Sha>
3135
</Dependency>
3236
<Dependency Name="Microsoft.Extensions.Http.Resilience" Version="9.4.0">
3337
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-extensions</Uri>

eng/Versions.props

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
<PreReleaseVersionLabel>preview.1</PreReleaseVersionLabel>
99
<DefaultTargetFramework>net8.0</DefaultTargetFramework>
1010
<AllTargetFrameworks>$(DefaultTargetFramework);net9.0</AllTargetFrameworks>
11-
<!-- dotnet 8.0 versions for running tests -->
11+
<!-- dotnet versions for running tests -->
1212
<DotNetRuntimePreviousVersionForTesting>8.0.13</DotNetRuntimePreviousVersionForTesting>
13+
<DotNetRuntimeCurrentVersionForTesting>9.0.6</DotNetRuntimeCurrentVersionForTesting>
1314
<!-- dotnet 8.0 versions for running tests - used for templates tests -->
1415
<DotNetSdkPreviousVersionForTesting>8.0.406</DotNetSdkPreviousVersionForTesting>
15-
<XunitV3Version>2.0.2</XunitV3Version>
16+
<!-- dotnet 10.0 versions for running tests - used for templates tests -->
17+
<DotNetSdkNextVersionForTesting>10.0.100-preview.5.25277.114</DotNetSdkNextVersionForTesting>
18+
<XunitV3Version>2.0.3</XunitV3Version>
1619
<XUnitAnalyzersVersion>1.21.0</XUnitAnalyzersVersion>
1720
<XunitRunnerVisualStudioVersion>3.1.0</XunitRunnerVisualStudioVersion>
1821
<MicrosoftTestingPlatformVersion>1.6.3</MicrosoftTestingPlatformVersion>
@@ -25,13 +28,14 @@
2528
<!-- Package versions defined directly in <reporoot>/Directory.Packages.props -->
2629
<MicrosoftDotnetSdkInternalVersion>8.0.100-rtm.23512.16</MicrosoftDotnetSdkInternalVersion>
2730
<!-- DCP -->
28-
<MicrosoftDeveloperControlPlanedarwinamd64Version>0.15.6</MicrosoftDeveloperControlPlanedarwinamd64Version>
29-
<MicrosoftDeveloperControlPlanedarwinarm64Version>0.15.6</MicrosoftDeveloperControlPlanedarwinarm64Version>
30-
<MicrosoftDeveloperControlPlanelinuxamd64Version>0.15.6</MicrosoftDeveloperControlPlanelinuxamd64Version>
31-
<MicrosoftDeveloperControlPlanelinuxarm64Version>0.15.6</MicrosoftDeveloperControlPlanelinuxarm64Version>
32-
<MicrosoftDeveloperControlPlanewindows386Version>0.15.6</MicrosoftDeveloperControlPlanewindows386Version>
33-
<MicrosoftDeveloperControlPlanewindowsamd64Version>0.15.6</MicrosoftDeveloperControlPlanewindowsamd64Version>
34-
<MicrosoftDeveloperControlPlanewindowsarm64Version>0.15.6</MicrosoftDeveloperControlPlanewindowsarm64Version>
31+
<MicrosoftDeveloperControlPlanedarwinamd64Version>0.15.9</MicrosoftDeveloperControlPlanedarwinamd64Version>
32+
<MicrosoftDeveloperControlPlanedarwinarm64Version>0.15.9</MicrosoftDeveloperControlPlanedarwinarm64Version>
33+
<MicrosoftDeveloperControlPlanelinuxamd64Version>0.15.9</MicrosoftDeveloperControlPlanelinuxamd64Version>
34+
<MicrosoftDeveloperControlPlanelinuxarm64Version>0.15.9</MicrosoftDeveloperControlPlanelinuxarm64Version>
35+
<MicrosoftDeveloperControlPlanelinuxmuslamd64Version>0.15.9</MicrosoftDeveloperControlPlanelinuxmuslamd64Version>
36+
<MicrosoftDeveloperControlPlanewindows386Version>0.15.9</MicrosoftDeveloperControlPlanewindows386Version>
37+
<MicrosoftDeveloperControlPlanewindowsamd64Version>0.15.9</MicrosoftDeveloperControlPlanewindowsamd64Version>
38+
<MicrosoftDeveloperControlPlanewindowsarm64Version>0.15.9</MicrosoftDeveloperControlPlanewindowsarm64Version>
3539
<!-- Other -->
3640
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.25302.2</MicrosoftDotNetRemoteExecutorVersion>
3741
<MicrosoftDotNetXUnitV3ExtensionsVersion>10.0.0-beta.25178.1</MicrosoftDotNetXUnitV3ExtensionsVersion>
@@ -46,9 +50,14 @@
4650
<MicrosoftExtensionsDiagnosticsTestingVersion>9.4.0</MicrosoftExtensionsDiagnosticsTestingVersion>
4751
<MicrosoftExtensionsTimeProviderTestingVersion>9.4.0</MicrosoftExtensionsTimeProviderTestingVersion>
4852
<!-- for templates -->
53+
<<<<<<< managed-resolver
4954
<MicrosoftAspNetCorePackageVersionForNet9>9.0.2</MicrosoftAspNetCorePackageVersionForNet9>
5055
<!-- Fuzzing tests -->
5156
<SharpFuzzPackageVersion>2.1.1</SharpFuzzPackageVersion>
57+
=======
58+
<MicrosoftAspNetCorePackageVersionForNet9>9.0.6</MicrosoftAspNetCorePackageVersionForNet9>
59+
<MicrosoftAspNetCorePackageVersionForNet10>10.0.0-preview.5.25277.114</MicrosoftAspNetCorePackageVersionForNet10>
60+
>>>>>>> main
5261
</PropertyGroup>
5362
<!-- .NET 9.0 Package Versions -->
5463
<PropertyGroup Label="Current">
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<CliRuntime>linux-arm64</CliRuntime>
4+
<CliPlatformType>Unix</CliPlatformType>
5+
</PropertyGroup>
6+
7+
<Import Project="Common.projitems" />
8+
9+
</Project>

0 commit comments

Comments
 (0)