Skip to content
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

[main] Update dependencies from dotnet/efcore dotnet/runtime #34033

Merged
merged 51 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ef1a0e5
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 2, 2021
42412d4
Workaround duplicate logging source generator
pranavkm Jul 2, 2021
bf18ea4
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 3, 2021
2533e93
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 5, 2021
1b37f79
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 5, 2021
6fbf14b
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 6, 2021
8f99347
Merge branch 'main' into darc-main-1709b9ed-50a0-4e28-b9b8-0e3759aee720
TanayParikh Jul 6, 2021
a2ec9d6
Fix CS8795
TanayParikh Jul 7, 2021
81fdc44
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 7, 2021
c2344ed
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 7, 2021
a54fe68
Update Wasm.Performance.TestApp.csproj
TanayParikh Jul 7, 2021
91b5158
Fix skipEnabledCheck
TanayParikh Jul 7, 2021
db9d09f
Merge branch 'main' into darc-main-1709b9ed-50a0-4e28-b9b8-0e3759aee720
TanayParikh Jul 7, 2021
2df9266
Update Workarounds.targets
TanayParikh Jul 7, 2021
ce1c062
Revert "Fix CS8795"
TanayParikh Jul 7, 2021
5d6e21e
Revert "Convert HealthChecks logging to use new Logging Source Genera…
TanayParikh Jul 7, 2021
fd25b6b
Utilize class level SkipEnabledCheckLogOptions
TanayParikh Jul 8, 2021
7148dcb
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 8, 2021
6f08d04
React to MvcCoreLoggerExtensions feedback
captainsafia Jul 8, 2021
8731131
Merge remote-tracking branch 'origin/main' into darc-main-1709b9ed-50…
captainsafia Jul 8, 2021
56977cd
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 8, 2021
9a90983
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 8, 2021
ed196cb
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 9, 2021
bcfb3e1
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 9, 2021
6f72cf7
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 9, 2021
d92ac8f
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Jul 9, 2021
72b736c
React to nullability changes in TypeConverter
captainsafia Jul 9, 2021
2d1ca9b
Merge branch 'main' into darc-main-1709b9ed-50a0-4e28-b9b8-0e3759aee720
BrennanConroy Jul 9, 2021
0b06bf5
React to new analyzer warnings
captainsafia Jul 9, 2021
544458f
Revert "Revert "Convert HealthChecks logging to use new Logging Sourc…
captainsafia Jul 9, 2021
ff4cd8d
Update src/Http/Routing/src/Matching/DfaMatcher.cs
captainsafia Jul 9, 2021
1f32895
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 10, 2021
b782842
Update exception caught in HTTP2 tests
captainsafia Jul 11, 2021
9d60f25
Merge branch 'main' of https://github.com/dotnet/aspnetcore into darc…
captainsafia Jul 11, 2021
cce1bd7
Revert "Remove usings from templates implicitly added by the SDK (#34…
captainsafia Jul 11, 2021
cde8ba4
Fix up exceptions for HTTP2 tests
captainsafia Jul 11, 2021
a355d6b
Revert "Revert "Remove usings from templates implicitly added by the …
captainsafia Jul 11, 2021
1f88826
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Jul 11, 2021
1c9a52e
Bump up SDK to bring in usings changes
captainsafia Jul 11, 2021
6bdb3ac
Try running template tests on non-Helix
captainsafia Jul 11, 2021
1ca4eaa
Update ci.yml
captainsafia Jul 11, 2021
2136f31
Try disabling template tests on Helix
captainsafia Jul 11, 2021
62fbc87
Revert "Stop running template tests on azdo job (already helix-ified)…
captainsafia Jul 11, 2021
1714f50
Don't build Helix payload for template tests
captainsafia Jul 11, 2021
d7fe599
Temporarily skip FrameworkListListsContainsCorrectPaths
captainsafia Jul 11, 2021
f5cecb2
Use dotnet test for test discovery
captainsafia Jul 11, 2021
f201b29
Revert "Use dotnet test for test discovery"
davidfowl Jul 12, 2021
00a8f1f
Try skipping listing tests list in helix
davidfowl Jul 12, 2021
a94dde5
Revert "Try disabling template tests on Helix"
davidfowl Jul 12, 2021
942e2c6
Remove generic type from test method
davidfowl Jul 12, 2021
0079eee
Removed another generic from the test method
davidfowl Jul 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 140 additions & 140 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

140 changes: 70 additions & 70 deletions eng/Versions.props

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions eng/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@
<RazorReferencePath Include="@(ReferencePathWithRefAssemblies)" />
</ItemGroup>
</Target>

<!-- Work around https://github.com/dotnet/aspnetcore/issues/34048 -->
<Target Name="_RemoveDuplicateLoggingSourceGenerator" AfterTargets="ResolvePackageAssets" Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dougbu I did a random workaround because I couldn't get PrivateAssets / ExcludeAssets to work for some reason. Could you have a look and see if there's a better way to do this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks about right b/c Logging.Abstractions is referenced transitively so often. But, I'd like to hear from @ericstj why the offending assembly is duplicated between Logging.Abstractions and our transport package.

<ItemGroup>
<ResolvedAnalyzers Remove="@(ResolvedAnalyzers)" Condition="'%(ResolvedAnalyzers.NuGetPackageId)' == 'Microsoft.Extensions.Logging.Abstractions'" />
<ResolvedAnalyzers Remove="@(ResolvedAnalyzers)" Condition="'%(ResolvedAnalyzers.NuGetPackageId)' == 'System.Text.Json'" />
</ItemGroup>
</Target>
</Project>
10 changes: 6 additions & 4 deletions src/Components/Components/src/RenderTree/Renderer.Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ public abstract partial class Renderer
{
internal static class Log
{
private static readonly LogDefineOptions SkipEnabledCheckLogOptions = new() { SkipEnabledCheck = true };

private static readonly Action<ILogger, int, Type, int, Type, Exception> _initializingChildComponent =
LoggerMessage.Define<int, Type, int, Type>(LogLevel.Debug, new EventId(1, "InitializingChildComponent"), "Initializing component {ComponentId} ({ComponentType}) as child of {ParentComponentId} ({ParentComponentId})", skipEnabledCheck: true);
LoggerMessage.Define<int, Type, int, Type>(LogLevel.Debug, new EventId(1, "InitializingChildComponent"), "Initializing component {ComponentId} ({ComponentType}) as child of {ParentComponentId} ({ParentComponentId})", SkipEnabledCheckLogOptions);

private static readonly Action<ILogger, int, Type, Exception> _initializingRootComponent =
LoggerMessage.Define<int, Type>(LogLevel.Debug, new EventId(2, "InitializingRootComponent"), "Initializing root component {ComponentId} ({ComponentType})", skipEnabledCheck: true);
LoggerMessage.Define<int, Type>(LogLevel.Debug, new EventId(2, "InitializingRootComponent"), "Initializing root component {ComponentId} ({ComponentType})", SkipEnabledCheckLogOptions);

private static readonly Action<ILogger, int, Type, Exception> _renderingComponent =
LoggerMessage.Define<int, Type>(LogLevel.Debug, new EventId(3, "RenderingComponent"), "Rendering component {ComponentId} of type {ComponentType}", skipEnabledCheck: true);
LoggerMessage.Define<int, Type>(LogLevel.Debug, new EventId(3, "RenderingComponent"), "Rendering component {ComponentId} of type {ComponentType}", SkipEnabledCheckLogOptions);

private static readonly Action<ILogger, int, Type, Exception> _disposingComponent =
LoggerMessage.Define<int, Type>(LogLevel.Debug, new EventId(4, "DisposingComponent"), "Disposing component {ComponentId} of type {ComponentType}", skipEnabledCheck: true);
LoggerMessage.Define<int, Type>(LogLevel.Debug, new EventId(4, "DisposingComponent"), "Disposing component {ComponentId} of type {ComponentType}", SkipEnabledCheckLogOptions);

private static readonly Action<ILogger, ulong, string, Exception> _handlingEvent =
LoggerMessage.Define<ulong, string>(LogLevel.Debug, new EventId(5, "HandlingEvent"), "Handling event {EventId} of type '{EventType}'");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@

<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<Reference Include="System.Text.Json" />
</ItemGroup>
</Project>
105 changes: 61 additions & 44 deletions src/HealthChecks/HealthChecks/src/DefaultHealthCheckService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Microsoft.Extensions.Diagnostics.HealthChecks
{
internal partial class DefaultHealthCheckService : HealthCheckService
internal class DefaultHealthCheckService : HealthCheckService
{
private readonly IServiceScopeFactory _scopeFactory;
private readonly IOptions<HealthCheckServiceOptions> _options;
Expand Down Expand Up @@ -87,7 +87,7 @@ private async Task<HealthReportEntry> RunCheckAsync(HealthCheckRegistration regi
var stopwatch = ValueStopwatch.StartNew();
var context = new HealthCheckContext { Registration = registration };

Log.HealthCheckBegin(_logger, registration.Name);
Log.HealthCheckBegin(_logger, registration);

HealthReportEntry entry;
CancellationTokenSource? timeoutCancellationTokenSource = null;
Expand Down Expand Up @@ -182,75 +182,92 @@ private static void ValidateRegistrations(IEnumerable<HealthCheckRegistration> r

internal static class EventIds
{
public const int HealthCheckProcessingBeginId = 100;
public const int HealthCheckProcessingEndId = 101;
public const int HealthCheckBeginId = 102;
public const int HealthCheckEndId = 103;
public const int HealthCheckErrorId = 104;
public const int HealthCheckDataId = 105;

// Hard code the event names to avoid breaking changes. Even if the methods are renamed, these hard-coded names shouldn't change.
public const string HealthCheckProcessingBeginName = "HealthCheckProcessingBegin";
public const string HealthCheckProcessingEndName = "HealthCheckProcessingEnd";
public const string HealthCheckBeginName = "HealthCheckBegin";
public const string HealthCheckEndName = "HealthCheckEnd";
public const string HealthCheckErrorName = "HealthCheckError";
public const string HealthCheckDataName = "HealthCheckData";

public static readonly EventId HealthCheckData = new EventId(HealthCheckDataId, HealthCheckDataName);
public static readonly EventId HealthCheckProcessingBegin = new EventId(100, "HealthCheckProcessingBegin");
public static readonly EventId HealthCheckProcessingEnd = new EventId(101, "HealthCheckProcessingEnd");

public static readonly EventId HealthCheckBegin = new EventId(102, "HealthCheckBegin");
public static readonly EventId HealthCheckEnd = new EventId(103, "HealthCheckEnd");
public static readonly EventId HealthCheckError = new EventId(104, "HealthCheckError");
public static readonly EventId HealthCheckData = new EventId(105, "HealthCheckData");
}

private static partial class Log
private static class Log
{
[LoggerMessage(EventIds.HealthCheckProcessingBeginId, LogLevel.Debug, "Running health checks", EventName = EventIds.HealthCheckProcessingBeginName)]
public static partial void HealthCheckProcessingBegin(ILogger logger);

public static void HealthCheckProcessingEnd(ILogger logger, HealthStatus status, TimeSpan duration) =>
HealthCheckProcessingEnd(logger, status, duration.TotalMilliseconds);
private static readonly Action<ILogger, Exception?> _healthCheckProcessingBegin = LoggerMessage.Define(
LogLevel.Debug,
EventIds.HealthCheckProcessingBegin,
"Running health checks");

[LoggerMessage(EventIds.HealthCheckProcessingEndId, LogLevel.Debug, "Health check processing with combined status {HealthStatus} completed after {ElapsedMilliseconds}ms", EventName = EventIds.HealthCheckProcessingEndName)]
private static partial void HealthCheckProcessingEnd(ILogger logger, HealthStatus HealthStatus, double ElapsedMilliseconds);
private static readonly Action<ILogger, double, HealthStatus, Exception?> _healthCheckProcessingEnd = LoggerMessage.Define<double, HealthStatus>(
LogLevel.Debug,
EventIds.HealthCheckProcessingEnd,
"Health check processing with combined status {HealthStatus} completed after {ElapsedMilliseconds}ms");

[LoggerMessage(EventIds.HealthCheckBeginId, LogLevel.Debug, "Running health check {HealthCheckName}", EventName = EventIds.HealthCheckBeginName)]
public static partial void HealthCheckBegin(ILogger logger, string HealthCheckName);
private static readonly Action<ILogger, string, Exception?> _healthCheckBegin = LoggerMessage.Define<string>(
LogLevel.Debug,
EventIds.HealthCheckBegin,
"Running health check {HealthCheckName}");

// These are separate so they can have different log levels
private const string HealthCheckEndText = "Health check {HealthCheckName} with status {HealthStatus} completed after {ElapsedMilliseconds}ms with message '{HealthCheckDescription}'";

#pragma warning disable SYSLIB1006
[LoggerMessage(EventIds.HealthCheckEndId, LogLevel.Debug, HealthCheckEndText, EventName = EventIds.HealthCheckEndName)]
private static partial void HealthCheckEndHealthy(ILogger logger, string HealthCheckName, HealthStatus HealthStatus, double ElapsedMilliseconds, string? HealthCheckDescription);
private static readonly Action<ILogger, string, double, HealthStatus, string?, Exception?> _healthCheckEndHealthy = LoggerMessage.Define<string, double, HealthStatus, string?>(
LogLevel.Debug,
EventIds.HealthCheckEnd,
HealthCheckEndText);

private static readonly Action<ILogger, string, double, HealthStatus, string?, Exception?> _healthCheckEndDegraded = LoggerMessage.Define<string, double, HealthStatus, string?>(
LogLevel.Warning,
EventIds.HealthCheckEnd,
HealthCheckEndText);

private static readonly Action<ILogger, string, double, HealthStatus, string?, Exception?> _healthCheckEndUnhealthy = LoggerMessage.Define<string, double, HealthStatus, string?>(
LogLevel.Error,
EventIds.HealthCheckEnd,
HealthCheckEndText);

[LoggerMessage(EventIds.HealthCheckEndId, LogLevel.Warning, HealthCheckEndText, EventName = EventIds.HealthCheckEndName)]
private static partial void HealthCheckEndDegraded(ILogger logger, string HealthCheckName, HealthStatus HealthStatus, double ElapsedMilliseconds, string? HealthCheckDescription);
private static readonly Action<ILogger, string, double, Exception?> _healthCheckError = LoggerMessage.Define<string, double>(
LogLevel.Error,
EventIds.HealthCheckError,
"Health check {HealthCheckName} threw an unhandled exception after {ElapsedMilliseconds}ms");

[LoggerMessage(EventIds.HealthCheckEndId, LogLevel.Error, HealthCheckEndText, EventName = EventIds.HealthCheckEndName)]
private static partial void HealthCheckEndUnhealthy(ILogger logger, string HealthCheckName, HealthStatus HealthStatus, double ElapsedMilliseconds, string? HealthCheckDescription, Exception? exception);
#pragma warning restore SYSLIB1006
public static void HealthCheckProcessingBegin(ILogger logger)
{
_healthCheckProcessingBegin(logger, null);
}

public static void HealthCheckProcessingEnd(ILogger logger, HealthStatus status, TimeSpan duration)
{
_healthCheckProcessingEnd(logger, duration.TotalMilliseconds, status, null);
}

public static void HealthCheckBegin(ILogger logger, HealthCheckRegistration registration)
{
_healthCheckBegin(logger, registration.Name, null);
}

public static void HealthCheckEnd(ILogger logger, HealthCheckRegistration registration, HealthReportEntry entry, TimeSpan duration)
{
switch (entry.Status)
{
case HealthStatus.Healthy:
HealthCheckEndHealthy(logger, registration.Name, entry.Status, duration.TotalMilliseconds, entry.Description);
_healthCheckEndHealthy(logger, registration.Name, duration.TotalMilliseconds, entry.Status, entry.Description, null);
break;

case HealthStatus.Degraded:
HealthCheckEndDegraded(logger, registration.Name, entry.Status, duration.TotalMilliseconds, entry.Description);
_healthCheckEndDegraded(logger, registration.Name, duration.TotalMilliseconds, entry.Status, entry.Description, null);
break;

case HealthStatus.Unhealthy:
HealthCheckEndUnhealthy(logger, registration.Name, entry.Status, duration.TotalMilliseconds, entry.Description, entry.Exception);
_healthCheckEndUnhealthy(logger, registration.Name, duration.TotalMilliseconds, entry.Status, entry.Description, entry.Exception);
break;
}
}

[LoggerMessage(EventIds.HealthCheckErrorId, LogLevel.Error, "Health check {HealthCheckName} threw an unhandled exception after {ElapsedMilliseconds}ms", EventName = EventIds.HealthCheckErrorName)]
private static partial void HealthCheckError(ILogger logger, string HealthCheckName, double ElapsedMilliseconds, Exception exception);

public static void HealthCheckError(ILogger logger, HealthCheckRegistration registration, Exception exception, TimeSpan duration) =>
HealthCheckError(logger, registration.Name, duration.TotalMilliseconds, exception);
public static void HealthCheckError(ILogger logger, HealthCheckRegistration registration, Exception exception, TimeSpan duration)
{
_healthCheckError(logger, registration.Name, duration.TotalMilliseconds, exception);
}

public static void HealthCheckData(ILogger logger, HealthCheckRegistration registration, HealthReportEntry entry)
{
Expand Down
Loading