Skip to content

Commit bd23096

Browse files
authored
[Rollout] Production Rollout 2025 05 09 (#4824)
<!-- Link the GitHub or AzDO issue this pull request is associated with. Please copy and paste the full URL rather than using the dotnet/arcade-services# syntax --> #4823
2 parents 83dd68a + bf98afe commit bd23096

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

src/Maestro/Maestro.MergePolicies/BackFlowMergePolicy.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private static List<string> CalculateConfigurationErrors(
7777
PullRequestUpdateSummary pr,
7878
SubscriptionUpdateSummary update)
7979
{
80-
List<string> configurationErrors = new();
80+
List<string> configurationErrors = [];
8181
if (sourceDependency.BarId != update.BuildId)
8282
{
8383
configurationErrors.Add($"""
@@ -96,16 +96,6 @@ private static List<string> CalculateConfigurationErrors(
9696
""");
9797
}
9898

99-
(string targetRepoName, _) = GitRepoUrlUtils.GetRepoNameAndOwner(pr.TargetRepoUrl);
100-
if (!targetRepoName.Equals(sourceDependency.Mapping, StringComparison.OrdinalIgnoreCase))
101-
{
102-
configurationErrors.Add($"""
103-
#### {configurationErrors.Count + 1}. Mapping Mismatch in `{VersionFiles.VersionDetailsXml}`
104-
- **Source Repository**: {update.SourceRepo}
105-
- **Error**: Mapping value `{sourceDependency.Mapping}` found in `{VersionFiles.VersionDetailsXml}` does not match the source repository name of the current update (`{targetRepoName}`).
106-
""");
107-
}
108-
10999
if (sourceDependency.Uri != update.SourceRepo)
110100
{
111101
configurationErrors.Add($"""

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ await repo.CommitAsync(
427427
{
428428
await repo.CommitAsync(
429429
$"Merge branch {branchToMerge} into {targetBranch}",
430-
allowEmpty: false,
430+
allowEmpty: true,
431431
cancellationToken: CancellationToken.None);
432432
}
433433
catch (Exception e) when (e.Message.Contains("Your branch is ahead of"))
@@ -512,12 +512,18 @@ private async Task TryResolvingSourceManifestConflict(ILocalGitRepo vmr, string
512512
updatedMapping.PackageVersion,
513513
updatedMapping.BarId);
514514

515-
foreach (var submodule in theirSourceManifest.Submodules.Where(s => s.Path.StartsWith(mappingName + "/")))
515+
var theirAffectedSubmodules = theirSourceManifest.Submodules
516+
.Where(s => s.Path.StartsWith(mappingName + "/"))
517+
.ToList();
518+
foreach (var submodule in theirAffectedSubmodules)
516519
{
517520
theirSourceManifest.RemoveSubmodule(submodule);
518521
}
519522

520-
foreach (var submodule in _sourceManifest.Submodules.Where(s => s.Path.StartsWith(mappingName + "/")))
523+
var ourAffectedSubmodules = ourSourceManifest.Submodules
524+
.Where(s => s.Path.StartsWith(mappingName + "/"))
525+
.ToList();
526+
foreach (var submodule in ourAffectedSubmodules)
521527
{
522528
theirSourceManifest.UpdateSubmodule(submodule);
523529
}

0 commit comments

Comments
 (0)