Skip to content

Commit fd7cb5c

Browse files
committed
Merge remote-tracking branch 'origin/feature/10.0' into validationWip
2 parents e647e87 + ee5072f commit fd7cb5c

File tree

9 files changed

+102
-129
lines changed

9 files changed

+102
-129
lines changed

eng/Version.Details.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Dependencies>
22
<ProductDependencies>
3-
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25209.3" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
3+
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25210.6" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
44
<Uri>https://github.com/dotnet/aspnetcore</Uri>
5-
<Sha>b3399b82c5f13e3f4ad164656083d37b5c04ea85</Sha>
5+
<Sha>c31f60c086518f4682bf94feee8b483c501b9188</Sha>
66
</Dependency>
77
<Dependency Name="Microsoft.Diagnostics.Monitoring" Version="9.0.0-preview.25155.1">
88
<Uri>https://github.com/dotnet/diagnostics</Uri>
@@ -22,45 +22,45 @@
2222
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
2323
<Sha>16865ea61910500f1022ad2b96c499e5df02c228</Sha>
2424
</Dependency>
25-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25210.1">
25+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25214.8">
2626
<Uri>https://github.com/dotnet/arcade</Uri>
27-
<Sha>490307dc9bb09caf016b2fa96005ac8aaa89c4e7</Sha>
27+
<Sha>5af24911dd2de348e66143167d66d05eb55a9db6</Sha>
2828
</Dependency>
29-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="10.0.0-beta.25210.1">
29+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="10.0.0-beta.25214.8">
3030
<Uri>https://github.com/dotnet/arcade</Uri>
31-
<Sha>490307dc9bb09caf016b2fa96005ac8aaa89c4e7</Sha>
31+
<Sha>5af24911dd2de348e66143167d66d05eb55a9db6</Sha>
3232
</Dependency>
33-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.25210.1">
33+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.25214.8">
3434
<Uri>https://github.com/dotnet/arcade</Uri>
35-
<Sha>490307dc9bb09caf016b2fa96005ac8aaa89c4e7</Sha>
35+
<Sha>5af24911dd2de348e66143167d66d05eb55a9db6</Sha>
3636
</Dependency>
37-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25210.1">
37+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25214.8">
3838
<Uri>https://github.com/dotnet/arcade</Uri>
39-
<Sha>490307dc9bb09caf016b2fa96005ac8aaa89c4e7</Sha>
39+
<Sha>5af24911dd2de348e66143167d66d05eb55a9db6</Sha>
4040
</Dependency>
41-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.25210.1">
41+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.25214.8">
4242
<Uri>https://github.com/dotnet/arcade</Uri>
43-
<Sha>490307dc9bb09caf016b2fa96005ac8aaa89c4e7</Sha>
43+
<Sha>5af24911dd2de348e66143167d66d05eb55a9db6</Sha>
4444
</Dependency>
4545
<Dependency Name="Microsoft.FileFormats" Version="1.0.615501">
4646
<Uri>https://github.com/dotnet/diagnostics</Uri>
4747
<Sha>b1037b7cc1ef0b00a9032f19a83b074a00c9a4b8</Sha>
4848
</Dependency>
49-
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25209.13" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
49+
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25210.5" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
5050
<Uri>https://github.com/dotnet/runtime</Uri>
51-
<Sha>00b00500cc997a55f17ab50bd6104d50f3f4401c</Sha>
51+
<Sha>7618121e0f64098e2b81ed7c8cdf7024a1b87795</Sha>
5252
</Dependency>
53-
<Dependency Name="VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25209.3" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
53+
<Dependency Name="VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25210.6" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
5454
<Uri>https://github.com/dotnet/aspnetcore</Uri>
55-
<Sha>b3399b82c5f13e3f4ad164656083d37b5c04ea85</Sha>
55+
<Sha>c31f60c086518f4682bf94feee8b483c501b9188</Sha>
5656
</Dependency>
57-
<Dependency Name="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0" Version="10.0.100-preview.4.25210.19">
57+
<Dependency Name="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0" Version="10.0.100-preview.4.25211.22">
5858
<Uri>https://github.com/dotnet/sdk</Uri>
59-
<Sha>90a1f93877806fe281973ec619c3e30fbbbbc3dc</Sha>
59+
<Sha>a081488f32ee97b730ac15197a1b0044a89a3995</Sha>
6060
</Dependency>
61-
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25209.13" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
61+
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25210.5" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
6262
<Uri>https://github.com/dotnet/runtime</Uri>
63-
<Sha>00b00500cc997a55f17ab50bd6104d50f3f4401c</Sha>
63+
<Sha>7618121e0f64098e2b81ed7c8cdf7024a1b87795</Sha>
6464
</Dependency>
6565
</ToolsetDependencies>
6666
</Dependencies>

eng/Versions.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848
-->
4949
<PropertyGroup Label="Automated">
5050
<!-- dotnet/arcade references -->
51-
<MicrosoftDotNetBuildTasksArchivesVersion>10.0.0-beta.25210.1</MicrosoftDotNetBuildTasksArchivesVersion>
52-
<MicrosoftDotNetCodeAnalysisVersion>10.0.0-beta.25210.1</MicrosoftDotNetCodeAnalysisVersion>
53-
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.25210.1</MicrosoftDotNetXUnitExtensionsVersion>
51+
<MicrosoftDotNetBuildTasksArchivesVersion>10.0.0-beta.25214.8</MicrosoftDotNetBuildTasksArchivesVersion>
52+
<MicrosoftDotNetCodeAnalysisVersion>10.0.0-beta.25214.8</MicrosoftDotNetCodeAnalysisVersion>
53+
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.25214.8</MicrosoftDotNetXUnitExtensionsVersion>
5454
<!-- dotnet/aspnetcore references -->
55-
<MicrosoftAspNetCoreAppRuntimewinx64Version>10.0.0-preview.4.25209.3</MicrosoftAspNetCoreAppRuntimewinx64Version>
56-
<VSRedistCommonAspNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25209.3</VSRedistCommonAspNetCoreSharedFrameworkx64100Version>
55+
<MicrosoftAspNetCoreAppRuntimewinx64Version>10.0.0-preview.4.25210.6</MicrosoftAspNetCoreAppRuntimewinx64Version>
56+
<VSRedistCommonAspNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25210.6</VSRedistCommonAspNetCoreSharedFrameworkx64100Version>
5757
<!-- dotnet/command-line-api references -->
5858
<SystemCommandLineVersion>2.0.0-beta5.25170.1</SystemCommandLineVersion>
5959
<!-- dotnet/diagnostics references -->
@@ -62,10 +62,10 @@
6262
<!-- dotnet/roslyn-analyzers -->
6363
<MicrosoftCodeAnalysisNetAnalyzersVersion>10.0.0-preview.25076.4</MicrosoftCodeAnalysisNetAnalyzersVersion>
6464
<!-- dotnet/runtime references -->
65-
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.4.25209.13</MicrosoftNETCoreAppRuntimewinx64Version>
66-
<VSRedistCommonNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25209.13</VSRedistCommonNetCoreSharedFrameworkx64100Version>
65+
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.4.25210.5</MicrosoftNETCoreAppRuntimewinx64Version>
66+
<VSRedistCommonNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25210.5</VSRedistCommonNetCoreSharedFrameworkx64100Version>
6767
<!-- dotnet/sdk references -->
68-
<VSRedistCommonNetCoreSdkPlaceholderx64100Version>10.0.100-preview.4.25210.19</VSRedistCommonNetCoreSdkPlaceholderx64100Version>
68+
<VSRedistCommonNetCoreSdkPlaceholderx64100Version>10.0.100-preview.4.25211.22</VSRedistCommonNetCoreSdkPlaceholderx64100Version>
6969
<!-- dotnet/symstore references -->
7070
<MicrosoftFileFormatsVersion>1.0.615501</MicrosoftFileFormatsVersion>
7171
</PropertyGroup>

eng/common/core-templates/steps/install-microbuild.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,18 @@ steps:
9191
script: |
9292
Write-Host "Copying Linux Path"
9393
$MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
94-
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER -replace '/build', ''
95-
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER + '/1.1.1032' + '/build'
94+
$MBSIGN_APPFOLDER = ($MBSIGN_APPFOLDER -replace '/build', '')
95+
96+
$versionRegex = '\d+\.\d+\.\d+'
97+
$package = Get-ChildItem -Path $MBSIGN_APPFOLDER -Directory |
98+
Where-Object { $_.Name -match $versionRegex }
99+
100+
if ($package.Count -ne 1) {
101+
Write-Host "There should be exactly one matching subfolder, but found $($package.Count)."
102+
exit 1
103+
}
104+
105+
$MBSIGN_APPFOLDER = $package[0].FullName + '/build'
96106
$MBSIGN_APPFOLDER | Write-Host
97107
$SignConfigPath = $MBSIGN_APPFOLDER + '/signconfig.xml'
98108
Copy-Item -Path "$(MBSIGN_APPFOLDER)/signconfig.xml" -Destination $SignConfigPath -Force

eng/common/sdl/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Guardian.Cli" version="0.109.0"/>
3+
<package id="Microsoft.Guardian.Cli" version="0.199.0"/>
44
</packages>

eng/dependabot/independent/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AzureIdentityVersion>1.13.2</AzureIdentityVersion>
77
<AzureStorageBlobsVersion>12.24.0</AzureStorageBlobsVersion>
88
<AzureStorageQueuesVersion>12.22.0</AzureStorageQueuesVersion>
9-
<MicrosoftIdentityWebVersion>3.6.2</MicrosoftIdentityWebVersion>
9+
<MicrosoftIdentityWebVersion>3.8.3</MicrosoftIdentityWebVersion>
1010
<MicrosoftOpenApiReadersVersion>1.6.24</MicrosoftOpenApiReadersVersion>
1111
<SystemPrivateUriVersion>4.3.2</SystemPrivateUriVersion>
1212
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"msbuild-sdks": {
2828
"Microsoft.Build.NoTargets": "3.7.0",
29-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25210.1",
30-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25210.1"
29+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25214.8",
30+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25214.8"
3131
}
3232
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using Microsoft.AspNetCore.Builder;
5+
using Microsoft.AspNetCore.Http;
6+
using Microsoft.AspNetCore.Mvc;
7+
using Microsoft.Extensions.DependencyInjection;
8+
using Microsoft.Extensions.Logging;
9+
using Microsoft.Extensions.Primitives;
10+
using System.Threading.Tasks;
11+
12+
namespace Microsoft.Diagnostics.Monitoring.WebApi
13+
{
14+
public class EgressValidationFilter : IEndpointFilter
15+
{
16+
private const string EgressQuery = "egressprovider";
17+
private readonly ILogger _logger;
18+
19+
public EgressValidationFilter(ILogger<EgressValidationFilter> logger)
20+
{
21+
_logger = logger;
22+
}
23+
24+
public async ValueTask<object?> InvokeAsync(EndpointFilterInvocationContext context, EndpointFilterDelegate next)
25+
{
26+
var services = context.HttpContext.RequestServices;
27+
var egressOutputConfiguration = services.GetRequiredService<IEgressOutputConfiguration>();
28+
29+
StringValues value;
30+
bool egressProviderGiven = context.HttpContext.Request.Query.TryGetValue(EgressQuery, out value);
31+
32+
if (!egressProviderGiven || StringValues.IsNullOrEmpty(value))
33+
{
34+
if (!egressOutputConfiguration.IsHttpEgressEnabled)
35+
{
36+
var problemDetails = new ProblemDetails
37+
{
38+
Detail = Strings.ErrorMessage_HttpEgressDisabled,
39+
Status = StatusCodes.Status400BadRequest
40+
};
41+
42+
_logger.LogError(Strings.ErrorMessage_HttpEgressDisabled);
43+
44+
return TypedResults.Problem(problemDetails);
45+
}
46+
}
47+
return await next(context);
48+
}
49+
}
50+
51+
public static class EgressValidationExtensions
52+
{
53+
public static RouteHandlerBuilder RequireEgressValidation(this RouteHandlerBuilder builder)
54+
{
55+
return builder.AddEndpointFilter<EgressValidationFilter>();
56+
}
57+
}
58+
}

src/Microsoft.Diagnostics.Monitoring.WebApi/EgressValidationFilter.cs.cs

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/Tools/dotnet-monitor/Startup.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using Microsoft.AspNetCore.Builder;
55
using Microsoft.AspNetCore.Hosting;
6-
using Microsoft.AspNetCore.Mvc;
76
using Microsoft.AspNetCore.ResponseCompression;
87
using Microsoft.Diagnostics.Monitoring.WebApi;
98
using Microsoft.Diagnostics.Monitoring.WebApi.Controllers;
@@ -36,17 +35,6 @@ public void ConfigureServices(IServiceCollection services)
3635
options.SerializerOptions.TypeInfoResolverChain.Add(MonitorJsonSerializerContext.Default);
3736
});
3837

39-
services.Configure<ApiBehaviorOptions>(options =>
40-
{
41-
options.InvalidModelStateResponseFactory = context =>
42-
{
43-
var details = new ValidationProblemDetails(context.ModelState);
44-
var result = new BadRequestObjectResult(details);
45-
result.ContentTypes.Add(ContentTypes.ApplicationProblemJson);
46-
return result;
47-
};
48-
});
49-
5038
services.Configure<BrotliCompressionProviderOptions>(options =>
5139
{
5240
options.Level = CompressionLevel.Optimal;
@@ -94,17 +82,13 @@ public static void Configure(IApplicationBuilder app, IWebHostEnvironment env, I
9482

9583
app.UseEndpoints(builder =>
9684
{
97-
var serviceProvider = builder.ServiceProvider;
98-
9985
DiagController.MapActionMethods(builder);
10086
DiagController.MapMetricsActionMethods(builder);
10187
ExceptionsController.MapActionMethods(builder);
10288
MetricsController.MapActionMethods(builder);
10389
OperationsController.MapActionMethods(builder);
10490

10591
builder.MapOpenApi("/");
106-
107-
app.UseMiddleware<EgressValidationUnhandledExceptionMiddleware>();
10892
});
10993
}
11094
}

0 commit comments

Comments
 (0)