From c7ee8f18f4274dccfca8c01c34b388bdcf8f852e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Tue, 7 Nov 2023 16:05:56 +0100 Subject: [PATCH 1/4] [release/8.0.1xx] Bump `darc` to fix VMR sync (#17704) --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 8 +-- eng/Versions.props | 2 +- .../templates/steps/vmr-pull-updates.yml | 13 +++++ eng/vmr-sync.sh | 4 +- .../Tasks/GitFileManagerFactory.cs | 52 ------------------- .../Tasks/VirtualMonoRepo_Initialize.cs | 5 +- 7 files changed, 24 insertions(+), 62 deletions(-) delete mode 100644 src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2b7fecfce..eddbc806d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "microsoft.dotnet.darc": { - "version": "1.1.0-beta.23416.3", + "version": "1.1.0-beta.23551.2", "commands": [ "darc" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 783b33db9..516265649 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -222,13 +222,13 @@ https://github.com/dotnet/arcade 39042b4048580366d35a7c1c4f4ce8fc0dbea4b4 - + https://github.com/dotnet/arcade-services - 5d63a226d022fda90cae2c239e882ad253baa758 + 88b0cbb096999d03068ddc9945465a3f5b6ba5da - + https://github.com/dotnet/arcade-services - 5d63a226d022fda90cae2c239e882ad253baa758 + 88b0cbb096999d03068ddc9945465a3f5b6ba5da https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 4367c47a7..0594bf69e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,7 +44,7 @@ - 1.1.0-beta.23416.3 + 1.1.0-beta.23551.2 diff --git a/eng/pipelines/templates/steps/vmr-pull-updates.yml b/eng/pipelines/templates/steps/vmr-pull-updates.yml index 673062c25..debe748e6 100644 --- a/eng/pipelines/templates/steps/vmr-pull-updates.yml +++ b/eng/pipelines/templates/steps/vmr-pull-updates.yml @@ -22,6 +22,19 @@ steps: displayName: Clone dotnet/installer path: installer +# This step is needed so that when we get a detached HEAD / shallow clone, +# we still pull the commit into the temporary installer clone to use it during the sync. +- script: | + git branch installer-head + displayName: Label PR commit + workingDirectory: $(Agent.BuildDirectory)/installer + +- script: | + git checkout -B ${{ parameters.vmrBranch }} + echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" + displayName: Prepare branch ${{ parameters.vmrBranch }} + workingDirectory: ${{ parameters.vmrPath }} + - script: > ./eng/vmr-sync.sh --vmr ${{ parameters.vmrPath }} diff --git a/eng/vmr-sync.sh b/eng/vmr-sync.sh index a753efdd8..db0f704e2 100755 --- a/eng/vmr-sync.sh +++ b/eng/vmr-sync.sh @@ -135,7 +135,7 @@ while [[ $# -gt 0 ]]; do recursive=true ;; --remote) - additional_remotes="$additional_remotes,$2" + additional_remotes="$additional_remotes $2" shift ;; --readme-template) @@ -265,9 +265,9 @@ fi $azdev_pat \ --$verbosity \ $recursive_arg \ + $additional_remotes \ --readme-template "$readme_template" \ --tpn-template "$tpn_template" \ - $additional_remotes \ "$repository" if [[ $? == 0 ]]; then diff --git a/src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs b/src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs deleted file mode 100644 index 2da3d540b..000000000 --- a/src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using Microsoft.DotNet.DarcLib; -using Microsoft.DotNet.DarcLib.Helpers; -using Microsoft.DotNet.DarcLib.VirtualMonoRepo; -using Microsoft.Extensions.Logging; - -namespace Microsoft.DotNet.VirtualMonoRepo.Tasks; - -public class GitFileManagerFactory : IGitFileManagerFactory -{ - private readonly IVmrInfo _vmrInfo; - private readonly VmrRemoteConfiguration _remoteConfiguration; - private readonly IProcessManager _processManager; - private readonly IVersionDetailsParser _versionDetailsParser; - private readonly ILoggerFactory _loggerFactory; - - public GitFileManagerFactory( - IVmrInfo vmrInfo, - VmrRemoteConfiguration remoteConfiguration, - IProcessManager processManager, - IVersionDetailsParser versionDetailsParser, - ILoggerFactory loggerFactory) - { - _vmrInfo = vmrInfo; - _remoteConfiguration = remoteConfiguration; - _processManager = processManager; - _versionDetailsParser = versionDetailsParser; - _loggerFactory = loggerFactory; - } - - public IGitFileManager Create(string repoUri) - => new GitFileManager(CreateGitRepo(repoUri), _versionDetailsParser, _loggerFactory.CreateLogger()); - - private IGitRepo CreateGitRepo(string repoUri) => GitRepoTypeParser.ParseFromUri(repoUri) switch - { - GitRepoType.AzureDevOps => throw new Exception("VMR initialization should not require Azure DevOps repositories"), - - GitRepoType.GitHub => new GitHubClient( - _processManager.GitExecutable, - _remoteConfiguration.GitHubToken, - _loggerFactory.CreateLogger(), - _vmrInfo.TmpPath, - // Caching not in use for Darc local client. - null), - - GitRepoType.Local => new LocalGitClient(_processManager.GitExecutable, _loggerFactory.CreateLogger()), - _ => throw new ArgumentException("Unknown git repository type", nameof(repoUri)), - }; -} diff --git a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs index eae76d532..2a8c1d726 100644 --- a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs +++ b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs @@ -74,6 +74,8 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask additionalRemotes, ReadmeTemplatePath, TpnTemplatePath, + generateCodeowners: false, + discardPatches: true, _cancellationToken.Token); return true; } @@ -82,7 +84,6 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask private IServiceProvider CreateServiceProvider() => new ServiceCollection() .AddLogging(b => b.AddConsole().AddFilter(l => l >= LogLevel.Information)) - .AddTransient() - .AddVmrManagers(sp => sp.GetRequiredService(), "git", VmrPath, TmpPath, null, null) + .AddVmrManagers("git", VmrPath, TmpPath, null, null) .BuildServiceProvider(); } From 0ca5cfe3202f5c3de3316804ce008a5b7945ce73 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 7 Nov 2023 10:59:33 -0800 Subject: [PATCH 2/4] Update branding to 8.0.101 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 0594bf69e..6c96107a1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,7 +8,7 @@ 8 0 1 - 00 + 01 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) $(VersionMajor).$(VersionMinor) $(MajorMinorVersion).$(VersionSDKMinor) From 2a6e1c3f474fe064f088b1ee8b95dc75b4f7b638 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Wed, 8 Nov 2023 16:33:51 -0800 Subject: [PATCH 3/4] Update Versions.props --- eng/Versions.props | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 6c96107a1..78404717f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,8 +145,10 @@ Therefore we stay at last month's version. We also need to special case the 1st patch release, because the incoming SDK version will never be 2 versions behind us in that case. Instead the indicator is that the incoming SDK version is not RTM or greater yet. - Preview releases already use -1 versionining so don't subtract one for that version + Preview releases already use -1 versionining so don't subtract one for that version. + In public builds, we always use the 2 month old version. --> + true true $([MSBuild]::Subtract($(VersionFeature60), 1)) From de66fe5b4bc145419de8537f6b01716bcfc72625 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Wed, 8 Nov 2023 16:38:53 -0800 Subject: [PATCH 4/4] Update Versions.props --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 78404717f..aa53d192b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -148,7 +148,7 @@ Preview releases already use -1 versionining so don't subtract one for that version. In public builds, we always use the 2 month old version. --> - true true true $([MSBuild]::Subtract($(VersionFeature60), 1))