-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Extensions commit mop-up #34208
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
Extensions commit mop-up #34208
Conversation
- add debug information for `Assert` failures in `MaximumOSVersionTest` - update src/TestingUtils/Microsoft.AspNetCore.Testing/test/MaximumOSVersionTest.cs - co-Authored-By: @Tratcher - try with VS2019 queues - skip `MaximumOSVersion` tests on .NET due to xunit issue - co-authored-by: @Tratcher Commit migrated from dotnet/extensions@26ff835
* Remove Serilog dependency in extensions * Add xunit logging for shutdown tests * Need to remove dependency on AspNetCore.Testing and remove DumpCollector Commit migrated from dotnet/extensions@540b4e8
Commit migrated from dotnet/extensions@6171c14
…x-logging-event-source Fix LoggingEventSource to handle null strings Commit migrated from dotnet/extensions@8d0fa05
Commit migrated from dotnet/extensions@5bcbaa2
…dotnet/extensions#2940) * Add environment var to allow disabling live reload in default builder * Switch to using hostingContext, rename flag to fit nomenclature. * Change flag to memory data source. Change content root default instead of runtime default. * Update config key to be hierarchical. Change await on positive case to be longer and cancel using the reload token. * Uncomment a development test case. * Apply suggestions from code review Co-authored-by: Chris Ross <Tratcher@Outlook.com> Commit migrated from dotnet/extensions@64140f9
Filed an issue for the net472 failure here: #34216
https://dev.azure.com/dnceng/public/_build/results?buildId=576706 PR: #34218 |
Failure is due to number formatting issue in test:
|
Yea somehow it's using the European format for the decimal. Hmm |
So the issue here is that the machines are setup with a non-US local so the format here: https://github.com/dotnet/runtime/blob/master/src/libraries/Microsoft.Extensions.Logging.EventSource/tests/EventSourceLoggerTest.cs#L723 uses a comma instead of a decimal point. I would check what format EventSource uses for doubles and use the same format in the test code. My assumption would be that they are using |
yes, the spanish locale is setup on the machines. I get a repro on the test failures locally by changing the locale like below:
|
InvariantCulture seems to be the right choice. I believe this is the code that is doing the formatting: runtime/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs Lines 127 to 147 in b85563d
|
@@ -720,7 +810,7 @@ private static class EventTypes | |||
{ "E6MSG", (e) => VerifySingleEvent(e, "Logger2", EventTypes.Message, 6, null, LogLevel.Warning) }, | |||
|
|||
{ "E7FM", (e) => VerifySingleEvent(e, "Logger3", EventTypes.FormattedMessage, 7, null, LogLevel.Information, | |||
@"""FormattedMessage"":""Logger3 Event7 Information inner scope closed " + DoubleParam2.ToString() + " 37") }, | |||
@"""FormattedMessage"":""Logger3 Event7 Information inner scope closed " + DoubleParam2.ToString("G", CultureInfo.InvariantCulture) + " 37") }, | |||
{ "E7JS", (e) => VerifySingleEvent(e, "Logger3", EventTypes.MessageJson, 7, null, LogLevel.Information, | |||
@"""ArgumentsJson"":{""stringParam"":""inner scope closed"",""doubleParam"":""" + DoubleParam2.ToString() + @""",""intParam"":""37""") }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I see another double ToString() here. Should that be fixed here as well? If it's not causing failures it might be because it's not used, in which case why is it present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed them as well. but seems only this change should be sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d fix them all for correctness. It’s not like we have a reason for using current culture
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that in a future PR.
@@ -245,6 +244,9 @@ | |||
<!-- Always pass portable to override arcade sdk which uses embedded for local builds --> | |||
<DebugType>portable</DebugType> | |||
|
|||
<!-- Microsoft.Extensions projects have a separate StrongNameKeyId --> | |||
<StrongNameKeyId Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">MicrosoftAspNetCore</StrongNameKeyId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why here and not at line 154?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has to go somewhere after line https://github.com/dotnet/runtime/blob/master/src/libraries/Directory.Build.props#L238 otherwise the property would get reassigned with MicrosoftShared by:
https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props#L6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so line 154 does nothing. 🤦♂ We should file a bug on that. I wonder if that caused other projects to get a different public key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think other projects have a problem, because other projects have each their own Directory.Build.props next to their solution files which specifies the StrongNameKeyId. e.g.:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the intent of that line was to make the default for corefx (at the time) to be the Open key. If it’s not having any effect that means we may have some projects which relied on it but no longer get it. IOW they didn’t set Open key in their d.b.p. As it stands it does nothing and should be deleted.
- Updates InternalsVisibleTo files as well - Setup Logging.EventSource.Tests - Fix three failing EventSourceLoggerTest tests - Delete file: IntegrationTesting csproj not needed. - Rename folder test -> tests (Logging/tests/DI.Common/tests) - Cleanup other csproj fix compile issue
732b7e5
to
87e7991
Compare
squashed last three commits into one and keeping rest as they were mop up commits |
@ericstj @JunTaoLuo
UPDATE: