diff --git a/NuGet.config b/NuGet.config index 76ccfd79eeeebfe4a90414e84e23dfc34b1fed17..4b821f800992e3c37517c61bef0dc570f13f4abf 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,8 @@ <clear /> <!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.--> <!-- Begin: Package sources from dotnet-runtime --> - <add key="darc-int-dotnet-runtime-be98e88" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-be98e88c/nuget/v3/index.json" /> <!-- End: Package sources from dotnet-runtime --> <!-- Begin: Package sources from dotnet-efcore --> - <add key="darc-int-dotnet-efcore-aca50ae" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-aca50aef/nuget/v3/index.json" /> <!-- End: Package sources from dotnet-efcore --> <!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.--> <add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" /> @@ -27,10 +25,8 @@ <clear /> <!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.--> <!-- Begin: Package sources from dotnet-efcore --> - <add key="darc-int-dotnet-efcore-aca50ae" value="true" /> <!-- End: Package sources from dotnet-efcore --> <!-- Begin: Package sources from dotnet-runtime --> - <add key="darc-int-dotnet-runtime-be98e88" value="true" /> <!-- End: Package sources from dotnet-runtime --> <!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.--> </disabledPackageSources> diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 252b148735171e7ab4ce981292dfda7c87e874a2..761f0375d247fdb9621d4e691fcfad3456df3cd0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -280,22 +280,22 @@ <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri> <Sha>be98e88c760526452df94ef452fff4602fb5bded</Sha> </Dependency> - <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22212.5"> + <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22254.3"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>1a6b24397e50146d0fece9cfb9c0b87275691e6f</Sha> + <Sha>5fdd5b6c08c6c39edf12001400a11786c03b3e35</Sha> <SourceBuild RepoName="arcade" ManagedOnly="true" /> </Dependency> - <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.22212.5"> + <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.22254.3"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>1a6b24397e50146d0fece9cfb9c0b87275691e6f</Sha> + <Sha>5fdd5b6c08c6c39edf12001400a11786c03b3e35</Sha> </Dependency> - <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.22212.5"> + <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.22254.3"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>1a6b24397e50146d0fece9cfb9c0b87275691e6f</Sha> + <Sha>5fdd5b6c08c6c39edf12001400a11786c03b3e35</Sha> </Dependency> - <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.22212.5"> + <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.22254.3"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>1a6b24397e50146d0fece9cfb9c0b87275691e6f</Sha> + <Sha>5fdd5b6c08c6c39edf12001400a11786c03b3e35</Sha> </Dependency> </ToolsetDependencies> </Dependencies> diff --git a/eng/Versions.props b/eng/Versions.props index 83e23d0b8b0d74a3ed04ad438afb820cac863d47..3e7361d33eb6ff3edc1f4d20482a949c4df8eb81 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,8 +131,8 @@ <MicrosoftEntityFrameworkCoreVersion>6.0.4</MicrosoftEntityFrameworkCoreVersion> <MicrosoftEntityFrameworkCoreDesignVersion>6.0.4</MicrosoftEntityFrameworkCoreDesignVersion> <!-- Packages from dotnet/arcade --> - <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.22212.5</MicrosoftDotNetBuildTasksInstallersVersion> - <MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.22212.5</MicrosoftDotNetBuildTasksTemplatingVersion> + <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.22254.3</MicrosoftDotNetBuildTasksInstallersVersion> + <MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.22254.3</MicrosoftDotNetBuildTasksTemplatingVersion> </PropertyGroup> <!-- diff --git a/global.json b/global.json index 30a17d2cce7a4de55cc026154072e3b87d544356..9cb19f0e265efcf82369ac347fd19bb7e734e37c 100644 --- a/global.json +++ b/global.json @@ -29,7 +29,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.10", - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22212.5", - "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22212.5" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22254.3", + "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22254.3" } } diff --git a/src/Middleware/HttpLogging/src/W3CLoggerProcessor.cs b/src/Middleware/HttpLogging/src/W3CLoggerProcessor.cs index 749da2b6cfbe28960a8ccaea4a1de2652459ba97..d3a44994a8bb080cb4b275b29212b2216f526884 100644 --- a/src/Middleware/HttpLogging/src/W3CLoggerProcessor.cs +++ b/src/Middleware/HttpLogging/src/W3CLoggerProcessor.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.HttpLogging { await WriteMessageAsync("#Version: 1.0", streamWriter, cancellationToken); - await WriteMessageAsync("#Start-Date: " + DateTimeOffset.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture), streamWriter, cancellationToken); + await WriteMessageAsync("#Start-Date: " + DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture), streamWriter, cancellationToken); await WriteMessageAsync(GetFieldsDirective(), streamWriter, cancellationToken); } diff --git a/src/Middleware/HttpLogging/test/W3CLoggerTests.cs b/src/Middleware/HttpLogging/test/W3CLoggerTests.cs index 759f6354ea866b112638351806a5fcba45651b43..078aa5af4c4628c1d81e1724a91be468ce4b370c 100644 --- a/src/Middleware/HttpLogging/test/W3CLoggerTests.cs +++ b/src/Middleware/HttpLogging/test/W3CLoggerTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.HttpLogging public async Task WritesDateTime() { var path = Path.GetTempFileName() + "_"; - var now = DateTime.Now; + var now = DateTime.UtcNow; var options = new W3CLoggerOptions() { LoggingFields = W3CLoggingFields.Date | W3CLoggingFields.Time, @@ -48,7 +48,9 @@ namespace Microsoft.AspNetCore.HttpLogging Assert.StartsWith("#Start-Date: ", lines[1]); var startDate = DateTime.Parse(lines[1].Substring(13), CultureInfo.InvariantCulture); // Assert that the log was written in the last 10 seconds - Assert.True(now.Subtract(startDate).TotalSeconds < 10); + // W3CLogger writes start-time to second precision, so delta could be as low as -0.999... + var delta = startDate.Subtract(now).TotalSeconds; + Assert.InRange(delta, -1, 10); Assert.Equal("#Fields: date time", lines[2]); @@ -89,7 +91,9 @@ namespace Microsoft.AspNetCore.HttpLogging Assert.StartsWith("#Start-Date: ", lines[1]); var startDate = DateTime.Parse(lines[1].Substring(13), CultureInfo.InvariantCulture); // Assert that the log was written in the last 10 seconds - Assert.True(now.Subtract(startDate).TotalSeconds < 10); + // W3CLogger writes start-time to second precision, so delta could be as low as -0.999... + var delta = startDate.Subtract(now).TotalSeconds; + Assert.InRange(delta, -1, 10); Assert.Equal("#Fields: cs-uri-query sc-status cs-host", lines[2]); Assert.Equal("- - -", lines[3]); diff --git a/src/Middleware/HttpLogging/test/W3CLoggingMiddlewareTests.cs b/src/Middleware/HttpLogging/test/W3CLoggingMiddlewareTests.cs index e1f1d0ab68497707608261fa78b90fe6f573197b..9c4a20f3e72c002fe57ff75b92db1026cf0637eb 100644 --- a/src/Middleware/HttpLogging/test/W3CLoggingMiddlewareTests.cs +++ b/src/Middleware/HttpLogging/test/W3CLoggingMiddlewareTests.cs @@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.HttpLogging httpContext.Request.Headers["Cookie"] = "Snickerdoodle"; httpContext.Response.StatusCode = 200; - var now = DateTime.Now; + var now = DateTime.UtcNow; await middleware.Invoke(httpContext); await logger.Processor.WaitForWrites(4).DefaultTimeout(); @@ -104,7 +104,9 @@ namespace Microsoft.AspNetCore.HttpLogging Assert.StartsWith("#Start-Date: ", lines[1]); var startDate = DateTime.Parse(lines[1].Substring(13), CultureInfo.InvariantCulture); // Assert that the log was written in the last 10 seconds - Assert.True(now.Subtract(startDate).TotalSeconds < 10); + // W3CLogger writes start-time to second precision, so delta could be as low as -0.999... + var delta = startDate.Subtract(now).TotalSeconds; + Assert.InRange(delta, -1, 10); Assert.Equal("#Fields: date time c-ip s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status time-taken cs-version cs-host cs(User-Agent) cs(Referer)", lines[2]); Assert.DoesNotContain(lines[3], "Snickerdoodle"); @@ -128,7 +130,7 @@ namespace Microsoft.AspNetCore.HttpLogging var httpContext = new DefaultHttpContext(); - var now = DateTime.Now; + var now = DateTime.UtcNow; await middleware.Invoke(httpContext); await logger.Processor.WaitForWrites(4).DefaultTimeout(); @@ -138,7 +140,9 @@ namespace Microsoft.AspNetCore.HttpLogging Assert.StartsWith("#Start-Date: ", lines[1]); var startDate = DateTime.Parse(lines[1].Substring(13), CultureInfo.InvariantCulture); // Assert that the log was written in the last 10 seconds - Assert.True(now.Subtract(startDate).TotalSeconds < 10); + // W3CLogger writes start-time to second precision, so delta could be as low as -0.999... + var delta = startDate.Subtract(now).TotalSeconds; + Assert.InRange(delta, -1, 10); Assert.Equal("#Fields: time-taken", lines[2]); double num; diff --git a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/ShadowCopyTests.cs b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/ShadowCopyTests.cs index 375bf607eaedc11a2d8ccf52015db955632dbc9d..cdf62949405936bfa5d03739609cd30fa9a2f821 100644 --- a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/ShadowCopyTests.cs +++ b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/ShadowCopyTests.cs @@ -199,7 +199,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests // Depending on timing, this could result in a shutdown failure, but sometimes it succeeds, handle both situations if (!response.IsSuccessStatusCode) { - Assert.Equal("Application Shutting Down", response.ReasonPhrase); + Assert.True(response.ReasonPhrase == "Application Shutting Down" || response.ReasonPhrase == "Server has been shutdown"); } // This shutdown should trigger a copy to the next highest directory, which will be 2