Skip to content

Commit

Permalink
Merge pull request #9559 from dotnet-maestro-bot/merge/vs17.9-to-main
Browse files Browse the repository at this point in the history
[automated] Merge branch 'vs17.9' => 'main'
  • Loading branch information
AR-May authored Dec 21, 2023
2 parents 5cf7858 + 5a3f203 commit b59f07e
Show file tree
Hide file tree
Showing 91 changed files with 712 additions and 485 deletions.
61 changes: 61 additions & 0 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
mergeTestResults: true
continueOnError: true
condition: always()
- task: CmdLine@2
displayName: 'Set flag to publish Verify *.received.* files when test step fails'
condition: failed()
inputs:
script: 'echo "##vso[task.setvariable variable=publishverify]Yes"'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
inputs:
Expand All @@ -49,6 +54,22 @@ jobs:
ArtifactName: 'FullOnWindows test logs'
continueOnError: true
condition: always()
- task: CopyFiles@2
condition: eq(variables['publishverify'], 'Yes')
displayName: 'Copy Verify *.received.* files to Artifact Staging'
inputs:
contents: '**\*.received.*'
targetFolder: '$(Build.ArtifactStagingDirectory)\Verify'
cleanTargetFolder: true
overWrite: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Verify *.received.* files as Artifacts'
name: 'verifypublish'
condition: eq(variables['publishverify'], 'Yes')
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify'
ArtifactName: 'Windows-on-full Verify $(System.JobAttempt)'


- job: BootstrapMSBuildOnCoreWindows
displayName: "Windows Core"
Expand Down Expand Up @@ -185,6 +206,11 @@ jobs:
mergeTestResults: true
continueOnError: true
condition: always()
- task: CmdLine@2
displayName: 'Set flag to publish Verify *.received.* files when test step fails'
condition: failed()
inputs:
script: 'echo "##vso[task.setvariable variable=publishverify]Yes"'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
inputs:
Expand All @@ -199,6 +225,21 @@ jobs:
ArtifactName: 'CoreOnLinux test logs'
continueOnError: true
condition: always()
- task: CopyFiles@2
condition: eq(variables['publishverify'], 'Yes')
displayName: 'Copy Verify *.received.* files to Artifact Staging'
inputs:
contents: '**/*.received.*'
targetFolder: '$(Build.ArtifactStagingDirectory)/Verify'
cleanTargetFolder: true
overWrite: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Verify *.received.* files as Artifacts'
name: 'verifypublish'
condition: eq(variables['publishverify'], 'Yes')
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Verify'
ArtifactName: 'Linux Verify $(System.JobAttempt)'

- job: CoreOnMac
displayName: "macOS Core"
Expand All @@ -219,6 +260,11 @@ jobs:
mergeTestResults: true
continueOnError: true
condition: always()
- task: CmdLine@2
displayName: 'Set flag to publish Verify *.received.* files when test step fails'
condition: failed()
inputs:
script: 'echo "##vso[task.setvariable variable=publishverify]Yes"'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
inputs:
Expand All @@ -233,5 +279,20 @@ jobs:
ArtifactName: 'CoreOnMac test logs'
continueOnError: true
condition: always()
- task: CopyFiles@2
condition: eq(variables['publishverify'], 'Yes')
displayName: 'Copy Verify *.received.* files to Artifact Staging'
inputs:
contents: '**/*.received.*'
targetFolder: '$(Build.ArtifactStagingDirectory)/Verify'
cleanTargetFolder: true
overWrite: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Verify *.received.* files as Artifacts'
name: 'verifypublish'
condition: eq(variables['publishverify'], 'Yes')
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Verify'
ArtifactName: 'macOS Verify $(System.JobAttempt)'

- template: /eng/common/templates/jobs/source-build.yml
1 change: 1 addition & 0 deletions eng/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<PackageVersion Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesVersion)" />
<PackageVersion Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
<PackageVersion Include="System.Threading.Channels" Version="$(SystemThreadingChannelsVersion)" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="$(SystemThreadingTasksDataflowVersion)" />
<PackageVersion Include="xunit.console" Version="$(XUnitVersion)" />
</ItemGroup>
Expand Down
14 changes: 9 additions & 5 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
<IgnorePatterns>
<!-- Baseline 7.0 dependencies until msbuild targets net8 and uses a net8 arcade, SBRP, etc.
These cannot be added to 7.0 SBRP, because they would are produced in the 7.0 build. -->
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/*7.0.0*" />
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/*7.0.0*" />
<UsagePattern IdentityGlob="System.Reflection.MetadataLoadContext/*7.0.0*" />
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/*7.0.0*" />
<UsagePattern IdentityGlob="System.Text.Json/*7.0.3*" />
<UsagePattern IdentityGlob="System.Collections.Immutable/*8.0.0*" />
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/*8.0.0*" />
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/*8.0.0*" />
<UsagePattern IdentityGlob="System.Reflection.Metadata/*8.0.0*" />
<UsagePattern IdentityGlob="System.Reflection.MetadataLoadContext/*8.0.0*" />
<UsagePattern IdentityGlob="System.Resources.Extensions/*8.0.0*" />
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/*8.0.0*" />
<UsagePattern IdentityGlob="System.Text.Json/*8.0.0*" />
<UsagePattern IdentityGlob="System.Threading.Tasks.Dataflow/*8.0.0*" />
</IgnorePatterns>
<Usages>
</Usages>
Expand Down
70 changes: 39 additions & 31 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,62 @@
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
<Dependency Name="System.CodeDom" Version="7.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.CodeDom" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build due to being a transitive dependency of System.Reflection.MetadataLoadContext.
This allows the package to be retrieved from previously-source-built artifacts and flow in as dependencies
of the packages produced by msbuild. -->
<Dependency Name="System.Collections.Immutable" Version="7.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Collections.Immutable" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
and flow in as dependencies of the packages produced by msbuild. -->
<Dependency Name="System.Configuration.ConfigurationManager" Version="7.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Configuration.ConfigurationManager" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
and flow in as dependencies of the packages produced by msbuild. -->
<Dependency Name="System.Reflection.Metadata" Version="7.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Reflection.Metadata" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
and flow in as dependencies of the packages produced by msbuild. -->
<Dependency Name="System.Reflection.MetadataLoadContext" Version="7.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Reflection.MetadataLoadContext" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
<Dependency Name="System.Resources.Extensions" Version="7.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Resources.Extensions" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
and flow in as dependencies of the packages produced by msbuild. -->
<Dependency Name="System.Security.Cryptography.Pkcs" Version="7.0.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Security.Cryptography.Pkcs" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
<Dependency Name="System.Security.Cryptography.Xml" Version="7.0.1">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
<Dependency Name="System.Security.Cryptography.Xml" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="7.0.3">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5b20af47d99620150c53eaf5db8636fdf730b126</Sha>
<Dependency Name="System.Text.Json" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<Dependency Name="System.Threading.Tasks.Dataflow" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="8.0.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand All @@ -68,13 +76,13 @@
<Sha>73f0850939d96131c28cf6ea6ee5aacb4da0083a</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
<Dependency Name="NuGet.Build.Tasks" Version="6.9.0-preview.1.50">
<Dependency Name="NuGet.Build.Tasks" Version="6.9.0-preview.1.64">
<Uri>https://github.com/nuget/nuget.client</Uri>
<Sha>a59e64507383b64bcfbe9bf63b34aca946ab0da9</Sha>
<Sha>2a234707a663f731e4de93cba4014ed1a8259def</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.9.0-3.23608.9">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.9.0-3.23615.7">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>8e4ab418a8f9703f7dfe3a66adc9b3876ef9382f</Sha>
<Sha>6a1cfc22d6b40c4e0fe5ac98a77a251c987a7c51</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.23580.1">
Expand Down
19 changes: 10 additions & 9 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@
</PropertyGroup>
<!-- Production Dependencies -->
<PropertyGroup>
<SystemCollectionsImmutableVersion>7.0.0</SystemCollectionsImmutableVersion>
<SystemConfigurationConfigurationManagerVersion>7.0.0</SystemConfigurationConfigurationManagerVersion>
<SystemCollectionsImmutableVersion>8.0.0</SystemCollectionsImmutableVersion>
<SystemConfigurationConfigurationManagerVersion>8.0.0</SystemConfigurationConfigurationManagerVersion>
<!--
Modifying the version of System.Memory is very high impact and causes downstream breaks in third-party tooling that uses the MSBuild API.
When updating the version of System.Memory file a breaking change here: https://github.com/dotnet/docs/issues/new?assignees=gewarren&labels=breaking-change%2CPri1%2Cdoc-idea&template=breaking-change.yml&title=%5BBreaking+change%5D%3A+
and follow the guidelines written here (internal-link): https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/1796/How-to-add-a-Known-Issue
-->
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemNetHttpVersion>4.3.4</SystemNetHttpVersion>
<SystemReflectionMetadataLoadContextVersion>7.0.0</SystemReflectionMetadataLoadContextVersion>
<SystemReflectionMetadataVersion>7.0.0</SystemReflectionMetadataVersion>
<SystemResourcesExtensionsPackageVersion>7.0.0</SystemResourcesExtensionsPackageVersion>
<SystemReflectionMetadataLoadContextVersion>8.0.0</SystemReflectionMetadataLoadContextVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
<SystemResourcesExtensionsPackageVersion>8.0.0</SystemResourcesExtensionsPackageVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
<SystemTextEncodingCodePagesVersion>7.0.0</SystemTextEncodingCodePagesVersion>
<SystemThreadingChannelsVersion>8.0.0</SystemThreadingChannelsVersion>
<SystemThreadingTasksDataflowVersion>8.0.0</SystemThreadingTasksDataflowVersion>
</PropertyGroup>
<!-- Toolset Dependencies -->
<PropertyGroup>
Expand All @@ -50,11 +52,10 @@
<MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.23580.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftExtensionsDependencyModelVersion>7.0.0</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftIORedistVersion>6.0.0</MicrosoftIORedistVersion>
<MicrosoftNetCompilersToolsetVersion>4.9.0-3.23608.9</MicrosoftNetCompilersToolsetVersion>
<NuGetBuildTasksVersion>6.9.0-preview.1.50</NuGetBuildTasksVersion>
<MicrosoftNetCompilersToolsetVersion>4.9.0-3.23615.7</MicrosoftNetCompilersToolsetVersion>
<NuGetBuildTasksVersion>6.9.0-preview.1.64</NuGetBuildTasksVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemTextJsonVersion>7.0.3</SystemTextJsonVersion>
<SystemThreadingTasksDataflowVersion>7.0.0</SystemThreadingTasksDataflowVersion>
<SystemTextJsonVersion>8.0.0</SystemTextJsonVersion>
</PropertyGroup>
<Target Name="OverrideArcadeFileVersion" AfterTargets="_InitializeAssemblyVersion">
<!-- See https://github.com/dotnet/arcade/issues/3386
Expand Down
42 changes: 19 additions & 23 deletions src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public void BuildTelemetryConstructedHasNoProperties()
buildTelemetry.Target.ShouldBeNull();
buildTelemetry.Version.ShouldBeNull();

buildTelemetry.UpdateEventProperties();
buildTelemetry.Properties.ShouldBeEmpty();
buildTelemetry.GetProperties().ShouldBeEmpty();
}

[Fact]
Expand All @@ -75,22 +74,23 @@ public void BuildTelemetryCreateProperProperties()
buildTelemetry.Target = "clean";
buildTelemetry.Version = new Version(1, 2, 3, 4);

buildTelemetry.UpdateEventProperties();
buildTelemetry.Properties.Count.ShouldBe(11);
var properties = buildTelemetry.GetProperties();

buildTelemetry.Properties["BuildEngineDisplayVersion"].ShouldBe("Some Display Version");
buildTelemetry.Properties["BuildEngineFrameworkName"].ShouldBe("new .NET");
buildTelemetry.Properties["BuildEngineHost"].ShouldBe("Host description");
buildTelemetry.Properties["InitialMSBuildServerState"].ShouldBe("hot");
buildTelemetry.Properties["ProjectPath"].ShouldBe(@"C:\\dev\\theProject");
buildTelemetry.Properties["ServerFallbackReason"].ShouldBe("busy");
buildTelemetry.Properties["BuildSuccess"].ShouldBe("True");
buildTelemetry.Properties["BuildTarget"].ShouldBe("clean");
buildTelemetry.Properties["BuildEngineVersion"].ShouldBe("1.2.3.4");
properties.Count.ShouldBe(11);

properties["BuildEngineDisplayVersion"].ShouldBe("Some Display Version");
properties["BuildEngineFrameworkName"].ShouldBe("new .NET");
properties["BuildEngineHost"].ShouldBe("Host description");
properties["InitialMSBuildServerState"].ShouldBe("hot");
properties["ProjectPath"].ShouldBe(@"C:\\dev\\theProject");
properties["ServerFallbackReason"].ShouldBe("busy");
properties["BuildSuccess"].ShouldBe("True");
properties["BuildTarget"].ShouldBe("clean");
properties["BuildEngineVersion"].ShouldBe("1.2.3.4");

// verify computed
buildTelemetry.Properties["BuildDurationInMilliseconds"] = (finishedAt - startAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);
buildTelemetry.Properties["InnerBuildDurationInMilliseconds"] = (finishedAt - innerStartAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);
properties["BuildDurationInMilliseconds"] = (finishedAt - startAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);
properties["InnerBuildDurationInMilliseconds"] = (finishedAt - innerStartAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);
}

[Fact]
Expand All @@ -100,22 +100,18 @@ public void BuildTelemetryHandleNullsInRecordedTimes()

buildTelemetry.StartAt = DateTime.MinValue;
buildTelemetry.FinishedAt = null;
buildTelemetry.UpdateEventProperties();
buildTelemetry.Properties.ShouldBeEmpty();
buildTelemetry.GetProperties().ShouldBeEmpty();

buildTelemetry.StartAt = null;
buildTelemetry.FinishedAt = DateTime.MaxValue;
buildTelemetry.UpdateEventProperties();
buildTelemetry.Properties.ShouldBeEmpty();
buildTelemetry.GetProperties().ShouldBeEmpty();

buildTelemetry.InnerStartAt = DateTime.MinValue;
buildTelemetry.FinishedAt = null;
buildTelemetry.UpdateEventProperties();
buildTelemetry.Properties.ShouldBeEmpty();
buildTelemetry.GetProperties().ShouldBeEmpty();

buildTelemetry.InnerStartAt = null;
buildTelemetry.FinishedAt = DateTime.MaxValue;
buildTelemetry.UpdateEventProperties();
buildTelemetry.Properties.ShouldBeEmpty();
buildTelemetry.GetProperties().ShouldBeEmpty();
}
}
Loading

0 comments on commit b59f07e

Please sign in to comment.