Skip to content

Commit

Permalink
Merge branch 'dotnet:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
officialmofabs authored Apr 23, 2024
2 parents 5472bf7 + 576f7cb commit d6c6f13
Show file tree
Hide file tree
Showing 53 changed files with 5,577 additions and 84 deletions.
15 changes: 13 additions & 2 deletions .azure/pipelines/helix-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ schedules:
include:
- main
always: true
- cron: "0 18 * * *"
branches:
include:
- main
always: true
displayName: IdentityModel test job
- cron: "0 9 * * *"
branches:
include:
Expand All @@ -19,6 +25,8 @@ schedules:
variables:
- name: _UseHelixOpenQueues
value: ${{ ne(variables['System.TeamProject'], 'internal') }}
- name: _IsIdentityModelTestJob
value: ${{ eq(variables['Build.CronSchedule.DisplayName'], 'IdentityModel test job') }}
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-HelixApi-Access
- template: /eng/common/templates/variables/pool-providers.yml
Expand All @@ -31,14 +39,17 @@ jobs:
agentOs: Windows
timeoutInMinutes: 300
steps:
- ${{ if eq(variables['Build.CronSchedule.DisplayName'], 'IdentityModel test job') }}:
- script: "echo ##vso[build.addbuildtag]identitymodel-test"
displayName: 'Set CI identitymodel-test tag'
# Build the shared framework
- script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
/p:CrossgenOutput=false /p:IsIdentityModelTestJob=$(_IsIdentityModelTestJob) /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
# -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step.
- script: .\eng\build.cmd -ci -prepareMachine -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test
-projects eng\helix\helix.proj /p:IsHelixJob=true
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
/p:CrossgenOutput=false /p:IsIdentityModelTestJob=$(_IsIdentityModelTestJob) /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand Down
1 change: 1 addition & 0 deletions eng/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="StackExchange.Redis" />
<LatestPackageReference Include="Swashbuckle.AspNetCore" />
<LatestPackageReference Include="System.Reactive.Linq" />
<LatestPackageReference Include="Verify.Xunit" />
<LatestPackageReference Include="xunit.abstractions" />
<LatestPackageReference Include="xunit.analyzers" />
<LatestPackageReference Include="xunit.assert" />
Expand Down
48 changes: 24 additions & 24 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,38 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="dotnet-ef" Version="9.0.0-preview.4.24222.1">
<Dependency Name="dotnet-ef" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
<SourceBuildTarball RepoName="efcore" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="9.0.0-preview.4.24222.1">
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="9.0.0-preview.4.24222.2">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>c07531051eb689bc266dff51a9dffd5b6bd7f158</Sha>
<Sha>32b6fe47020ef50d3ab442dc59b09caf1efb06d3</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0-preview.4.24219.3">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand Down Expand Up @@ -368,9 +368,9 @@
<Sha>56610095196ac12a397b1acd00835db4d86849b9</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="9.0.0-alpha.1.24211.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="9.0.0-alpha.1.24216.3">
<Uri>https://github.com/dotnet/source-build-externals</Uri>
<Sha>83566118e44922c30d146654d42c7c3745cc119d</Sha>
<Sha>5a273649709de76f61957e3d69e1f031e5ac82e2</Sha>
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
Expand All @@ -380,9 +380,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>56610095196ac12a397b1acd00835db4d86849b9</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common" Version="9.0.0-preview.4.24212.2">
<Dependency Name="System.Drawing.Common" Version="9.0.0-preview.4.24220.1">
<Uri>https://github.com/dotnet/winforms</Uri>
<Sha>84fb2fd451c2223de7326b57ae067ee88bfd07aa</Sha>
<Sha>f6d03b688f2e21d4a702f1293b3c4a89bb7f5cd7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24212.4">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand Down Expand Up @@ -410,13 +410,13 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>87b015b938e5400d6e57afd7650348c17a764b73</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="9.0.0-preview.4.24214.1">
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="9.0.0-preview.4.24220.1">
<Uri>https://github.com/dotnet/extensions</Uri>
<Sha>edfa4415076a32239fa60a1f885c675fee3c36e3</Sha>
<Sha>a496fb29b9bf602abf9394f36a0f839f5cb422b5</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0-preview.4.24214.1">
<Dependency Name="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0-preview.4.24220.1">
<Uri>https://github.com/dotnet/extensions</Uri>
<Sha>edfa4415076a32239fa60a1f885c675fee3c36e3</Sha>
<Sha>a496fb29b9bf602abf9394f36a0f839f5cb422b5</Sha>
</Dependency>
<Dependency Name="NuGet.Frameworks" Version="6.2.4">
<Uri>https://github.com/nuget/nuget.client</Uri>
Expand Down
28 changes: 15 additions & 13 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleaseVersionIteration>4</PreReleaseVersionIteration>
<ValidateBaseline>true</ValidateBaseline>
<IdentityModelVersion>7.4.1</IdentityModelVersion>
<IdentityModelVersion Condition="'$(IsIdentityModelTestJob)' != 'true'">7.4.1</IdentityModelVersion>
<IdentityModelVersion Condition="'$(IsIdentityModelTestJob)' == 'true'">7.*</IdentityModelVersion>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
-->
Expand Down Expand Up @@ -136,17 +137,17 @@
<SystemIOHashingVersion>9.0.0-preview.4.24219.3</SystemIOHashingVersion>
<SystemRuntimeCachingVersion>9.0.0-preview.4.24219.3</SystemRuntimeCachingVersion>
<!-- Packages from dotnet/extensions -->
<MicrosoftExtensionsDiagnosticsTestingVersion>9.0.0-preview.4.24214.1</MicrosoftExtensionsDiagnosticsTestingVersion>
<MicrosoftExtensionsTimeProviderTestingVersion>9.0.0-preview.4.24214.1</MicrosoftExtensionsTimeProviderTestingVersion>
<MicrosoftExtensionsDiagnosticsTestingVersion>9.0.0-preview.4.24220.1</MicrosoftExtensionsDiagnosticsTestingVersion>
<MicrosoftExtensionsTimeProviderTestingVersion>9.0.0-preview.4.24220.1</MicrosoftExtensionsTimeProviderTestingVersion>
<!-- Packages from dotnet/efcore -->
<dotnetefVersion>9.0.0-preview.4.24222.1</dotnetefVersion>
<MicrosoftEntityFrameworkCoreInMemoryVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreInMemoryVersion>
<MicrosoftEntityFrameworkCoreRelationalVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreRelationalVersion>
<MicrosoftEntityFrameworkCoreSqliteVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreSqliteVersion>
<MicrosoftEntityFrameworkCoreSqlServerVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreSqlServerVersion>
<MicrosoftEntityFrameworkCoreToolsVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreToolsVersion>
<MicrosoftEntityFrameworkCoreVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreVersion>
<MicrosoftEntityFrameworkCoreDesignVersion>9.0.0-preview.4.24222.1</MicrosoftEntityFrameworkCoreDesignVersion>
<dotnetefVersion>9.0.0-preview.4.24222.2</dotnetefVersion>
<MicrosoftEntityFrameworkCoreInMemoryVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreInMemoryVersion>
<MicrosoftEntityFrameworkCoreRelationalVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreRelationalVersion>
<MicrosoftEntityFrameworkCoreSqliteVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreSqliteVersion>
<MicrosoftEntityFrameworkCoreSqlServerVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreSqlServerVersion>
<MicrosoftEntityFrameworkCoreToolsVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreToolsVersion>
<MicrosoftEntityFrameworkCoreVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreVersion>
<MicrosoftEntityFrameworkCoreDesignVersion>9.0.0-preview.4.24222.2</MicrosoftEntityFrameworkCoreDesignVersion>
<!-- Packages from dotnet/roslyn -->
<MicrosoftCodeAnalysisCommonVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
Expand All @@ -164,13 +165,13 @@
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.24212.4</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftSourceBuildIntermediatearcadeVersion>9.0.0-beta.24212.4</MicrosoftSourceBuildIntermediatearcadeVersion>
<!-- Packages from dotnet/source-build-externals -->
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>9.0.0-alpha.1.24211.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>9.0.0-alpha.1.24216.3</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
<!-- Packages from dotnet/source-build-reference-packages -->
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>9.0.0-alpha.1.24162.2</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
<!-- Packages from dotnet/symreader -->
<MicrosoftSourceBuildIntermediatesymreaderVersion>2.1.0-beta.24208.1</MicrosoftSourceBuildIntermediatesymreaderVersion>
<!-- Packages from dotnet/winforms -->
<SystemDrawingCommonVersion>9.0.0-preview.4.24212.2</SystemDrawingCommonVersion>
<SystemDrawingCommonVersion>9.0.0-preview.4.24220.1</SystemDrawingCommonVersion>
<!-- Packages from dotnet/xdt -->
<MicrosoftWebXdtVersion>9.0.0-preview.24215.1</MicrosoftWebXdtVersion>
<MicrosoftSourceBuildIntermediatexdtVersion>9.0.0-preview.24215.1</MicrosoftSourceBuildIntermediatexdtVersion>
Expand Down Expand Up @@ -325,6 +326,7 @@
<StackExchangeRedisVersion>2.7.27</StackExchangeRedisVersion>
<SystemReactiveLinqVersion>5.0.0</SystemReactiveLinqVersion>
<SwashbuckleAspNetCoreVersion>6.4.0</SwashbuckleAspNetCoreVersion>
<VerifyXunitVersion>19.14.0</VerifyXunitVersion>
<XunitAbstractionsVersion>2.0.3</XunitAbstractionsVersion>
<XunitAnalyzersVersion>1.0.0</XunitAnalyzersVersion>
<XunitVersion>2.4.2</XunitVersion>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "9.0.100-preview.4.24218.26"
"version": "9.0.100-preview.4.24221.5"
},
"tools": {
"dotnet": "9.0.100-preview.4.24218.26",
"dotnet": "9.0.100-preview.4.24221.5",
"runtimes": {
"dotnet/x86": [
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
Expand Down
17 changes: 11 additions & 6 deletions src/Hosting/Hosting/src/Internal/HostingMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,8 @@ public void RequestEnd(string protocol, bool isHttps, string scheme, string meth
{
tags.Add("http.route", route);
}
// This exception is only present if there is an unhandled exception.
// An exception caught by ExceptionHandlerMiddleware and DeveloperExceptionMiddleware isn't thrown to here. Instead, those middleware add error.type to custom tags.
if (exception != null)
{
tags.Add("error.type", exception.GetType().FullName);
}

// Add before some built in tags so custom tags are prioritized when dealing with duplicates.
if (customTags != null)
{
for (var i = 0; i < customTags.Count; i++)
Expand All @@ -83,6 +79,15 @@ public void RequestEnd(string protocol, bool isHttps, string scheme, string meth
}
}

// This exception is only present if there is an unhandled exception.
// An exception caught by ExceptionHandlerMiddleware and DeveloperExceptionMiddleware isn't thrown to here. Instead, those middleware add error.type to custom tags.
if (exception != null)
{
// Exception tag could have been added by middleware. If an exception is later thrown in request pipeline
// then we don't want to add a duplicate tag here because that breaks some metrics systems.
tags.TryAddTag("error.type", exception.GetType().FullName);
}

var duration = Stopwatch.GetElapsedTime(startTimestamp, currentTimestamp);
_requestDuration.Record(duration.TotalSeconds, tags);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<Compile Include="$(SharedSourceRoot)StackTrace\**\*.cs" />
<Compile Include="$(SharedSourceRoot)ErrorPage\**\*.cs" />
<Compile Include="$(SharedSourceRoot)StaticWebAssets\**\*.cs" LinkBase="StaticWebAssets" />
<Compile Include="$(SharedSourceRoot)Metrics\MetricsExtensions.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion src/Middleware/Diagnostics/src/DiagnosticsTelemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public static void ReportUnhandledException(ILogger logger, HttpContext context,

if (context.Features.Get<IHttpMetricsTagsFeature>() is { } tagsFeature)
{
tagsFeature.Tags.Add(new KeyValuePair<string, object?>("error.type", ex.GetType().FullName));
// Multiple exception middleware could be registered that have already added the tag.
// We don't want to add a duplicate tag here because that breaks some metrics systems.
tagsFeature.TryAddTag("error.type", ex.GetType().FullName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<Compile Include="$(SharedSourceRoot)TypeNameHelper\*.cs" />
<Compile Include="$(SharedSourceRoot)Reroute.cs" />
<Compile Include="$(SharedSourceRoot)HttpExtensions.cs" />
<Compile Include="$(SharedSourceRoot)Metrics\MetricsExtensions.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Net;
Expand Down
Loading

0 comments on commit d6c6f13

Please sign in to comment.