Skip to content

Commit 7a20970

Browse files
authored
[Rollout] Production rollout 2025-04-24 (#4731)
#4730
2 parents f960530 + 68f17e1 commit 7a20970

File tree

7 files changed

+135
-6
lines changed

7 files changed

+135
-6
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</PropertyGroup>
5858

5959
<ItemGroup Condition=" '$(IsTestProject)' == 'true' ">
60-
<PackageReference Include="FluentAssertions" />
60+
<PackageReference Include="AwesomeAssertions" />
6161
<PackageReference Include="Moq" />
6262
<PackageReference Include="NUnit" />
6363
<PackageReference Include="NUnit3TestAdapter">

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
3434
<PackageVersion Include="DistributedLock.Redis" Version="1.0.3" />
3535
<PackageVersion Include="EntityFrameworkCore.Triggers" Version="1.1.1" />
36-
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
36+
<PackageVersion Include="AwesomeAssertions" Version="8.1.0" />
3737
<PackageVersion Include="FluentValidation.AspNetCore" Version="8.6.2" />
3838
<PackageVersion Include="LibGit2Sharp" Version="0.30.0" />
3939
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<package pattern="AspNetCore.*" />
1515
<package pattern="AspNetCoreRateLimit" />
1616
<package pattern="AutoMapper" />
17+
<package pattern="AwesomeAssertions" />
1718
<package pattern="Azure.*" />
1819
<package pattern="Ben.Demystifier" />
1920
<package pattern="BenchmarkDotNet" />

src/Microsoft.DotNet.Darc/DarcLib/Helpers/DependencyFileManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public class DependencyFileManager : IDependencyFileManager
4040
{ "Microsoft.DotNet.Helix.Sdk", "msbuild-sdks" },
4141
{ "Microsoft.DotNet.SharedFramework.Sdk", "msbuild-sdks" },
4242
{ "Microsoft.NET.SharedFramework.Sdk", "msbuild-sdks" },
43+
{ "Microsoft.DotNet.CMake.Sdk", "msbuild-sdks" },
44+
{ "Microsoft.NET.Sdk.IL", "msbuild-sdks" },
4345
{ "dotnet", "tools" },
4446
}.ToImmutableDictionary();
4547

@@ -1666,5 +1668,5 @@ private static Dictionary<string, HashSet<string>> GetAssetLocationMapping(IEnum
16661668
}
16671669

16681670
public static XmlNode GetVersionPropsNode(XmlDocument versionProps, string nodeName) =>
1669-
versionProps.DocumentElement?.SelectSingleNode($"//*[local-name()='{nodeName}' and parent::PropertyGroup]");
1671+
versionProps.DocumentElement?.SelectSingleNode($"//*[local-name()='{nodeName}' and parent::*[local-name()='PropertyGroup']]");
16701672
}

src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/VersionFileCodeFlowUpdater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ private async Task<List<DependencyUpdate>> BackflowDependenciesAndToolset(
518518
// Later we update them
519519
foreach (var update in updates)
520520
{
521-
await _dependencyFileManager.AddDependencyAsync(new DependencyDetail(update) { Version = "0.0.0" }, targetRepo.Path, branch: null!);
521+
await _dependencyFileManager.AddDependencyAsync(new DependencyDetail(update), targetRepo.Path, branch: null!);
522522
}
523523

524524
// If we are updating the arcade sdk we need to update the eng/common files as well

test/Microsoft.DotNet.DarcLib.Tests/Helpers/DependencyFileManagerTests.cs

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Microsoft.DotNet.DarcLib.Helpers;
1111
using Microsoft.DotNet.DarcLib.Models.Darc;
1212
using Microsoft.Extensions.Logging.Abstractions;
13-
using Microsoft.VisualStudio.Services.Profile;
1413
using Moq;
1514
using NUnit.Framework;
1615

@@ -235,4 +234,131 @@ public async Task RemoveDependencyShouldNotThrowWhenDependencyDoesNotExist()
235234
Func<Task> act = async () => await manager.RemoveDependencyAsync(dependency.Name, string.Empty, string.Empty);
236235
await act.Should().NotThrowAsync<DependencyException>();
237236
}
237+
238+
[Test]
239+
public async Task AddDependencyShouldMatchAlternatePropNames()
240+
{
241+
string versionDetails =
242+
"""
243+
<?xml version="1.0" encoding="utf-8"?>
244+
<Dependencies>
245+
<ProductDependencies>
246+
</ProductDependencies>
247+
<ToolsetDependencies>
248+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="10.0.0-beta.25217.1">
249+
<Uri>https://github.com/dotnet/arcade</Uri>
250+
<Sha>76dd1b4eb3b15881da350de93805ea6ab936364c</Sha>
251+
</Dependency>
252+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="10.0.0-beta.25217.1">
253+
<Uri>https://github.com/dotnet/arcade</Uri>
254+
<Sha>76dd1b4eb3b15881da350de93805ea6ab936364c</Sha>
255+
</Dependency>
256+
</ToolsetDependencies>
257+
</Dependencies>
258+
""";
259+
260+
string versionProps =
261+
"""
262+
<?xml version="1.0" encoding="utf-8"?>
263+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
264+
<PropertyGroup>
265+
<MicrosoftDotNetBuildTasksPackagingVersion>10.0.0-beta.25217.1</MicrosoftDotNetBuildTasksPackagingVersion>
266+
<MicrosoftDotNetBuildTasksInstallersPackageVersion>10.0.0-beta.25217.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
267+
</PropertyGroup>
268+
</Project>
269+
""";
270+
271+
Mock<IGitRepo> repo = new();
272+
Mock<IGitRepoFactory> repoFactory = new();
273+
274+
repo.Setup(r => r.GetFileContentsAsync(VersionFiles.VersionDetailsXml, It.IsAny<string>(), It.IsAny<string>()))
275+
.ReturnsAsync(() => versionDetails);
276+
repo.Setup(r => r.GetFileContentsAsync(VersionFiles.VersionProps, It.IsAny<string>(), It.IsAny<string>()))
277+
.ReturnsAsync(() => versionProps);
278+
repoFactory
279+
.Setup(repoFactory => repoFactory.CreateClient(It.IsAny<string>()))
280+
.Returns(repo.Object);
281+
282+
repo.Setup(r => r.CommitFilesAsync(
283+
It.IsAny<List<GitFile>>(),
284+
It.IsAny<string>(),
285+
It.IsAny<string>(),
286+
It.IsAny<string>()))
287+
.Callback<List<GitFile>, string, string, string>((files, repoUri, branch, commitMessage) =>
288+
{
289+
foreach(var file in files)
290+
{
291+
if (file.FilePath == VersionFiles.VersionDetailsXml)
292+
{
293+
versionDetails = file.Content;
294+
}
295+
else if (file.FilePath == VersionFiles.VersionProps)
296+
{
297+
versionProps = file.Content;
298+
}
299+
}
300+
});
301+
302+
DependencyFileManager manager = new(
303+
repoFactory.Object,
304+
new VersionDetailsParser(),
305+
NullLogger.Instance);
306+
307+
await manager.AddDependencyAsync(
308+
new DependencyDetail()
309+
{
310+
Name = "Microsoft.DotNet.Build.Tasks.Packaging",
311+
Version = "10.0.0-beta.22222.3",
312+
Commit = "abc",
313+
Type = DependencyType.Toolset,
314+
RepoUri = "https://github.com/dotnet/arcade",
315+
},
316+
string.Empty,
317+
string.Empty);
318+
319+
await manager.AddDependencyAsync(
320+
new DependencyDetail()
321+
{
322+
Name = "Microsoft.DotNet.Build.Tasks.Installers",
323+
Version = "10.0.0-beta.33333.1",
324+
Commit = "def",
325+
Type = DependencyType.Toolset,
326+
RepoUri = "https://github.com/dotnet/arcade",
327+
},
328+
string.Empty,
329+
string.Empty);
330+
331+
string expectedVersionDetails =
332+
"""
333+
<?xml version="1.0" encoding="utf-8"?>
334+
<Dependencies>
335+
<ProductDependencies>
336+
</ProductDependencies>
337+
<ToolsetDependencies>
338+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="10.0.0-beta.22222.3">
339+
<Uri>https://github.com/dotnet/arcade</Uri>
340+
<Sha>abc</Sha>
341+
</Dependency>
342+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="10.0.0-beta.33333.1">
343+
<Uri>https://github.com/dotnet/arcade</Uri>
344+
<Sha>def</Sha>
345+
</Dependency>
346+
</ToolsetDependencies>
347+
</Dependencies>
348+
""";
349+
350+
string expectedVersionProps =
351+
"""
352+
<?xml version="1.0" encoding="utf-8"?>
353+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
354+
<PropertyGroup>
355+
<MicrosoftDotNetBuildTasksPackagingVersion>10.0.0-beta.22222.3</MicrosoftDotNetBuildTasksPackagingVersion>
356+
<MicrosoftDotNetBuildTasksInstallersPackageVersion>10.0.0-beta.33333.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
357+
</PropertyGroup>
358+
</Project>
359+
""";
360+
361+
versionDetails.Replace("\r\n", "\n").TrimEnd().Should().Be(expectedVersionDetails.Replace("\r\n", "\n").TrimEnd());
362+
versionProps.Replace("\r\n", "\n").TrimEnd().Should().Be(expectedVersionProps.Replace("\r\n", "\n").TrimEnd());
363+
}
238364
}

tools/FlatFlowMigrationCli/Operations/MigrateOperation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class MigrateOperation : Operation
2525
"https:/github.com/nuget/nuget.client",
2626
"https:/github.com/dotnet/razor",
2727
"https:/github.com/dotnet/roslyn",
28-
"https:/github.com/dotnet/vstest",
28+
"https:/github.com/microsoft/vstest",
2929
];
3030

3131
internal static readonly string[] SkippedRepos =

0 commit comments

Comments
 (0)