Skip to content

Commit c6d57cf

Browse files
authored
[Rollout] Production rollout 2025-02-05 (#4417)
#4416
2 parents 0a9f6b1 + b5e6b42 commit c6d57cf

File tree

11 files changed

+368
-59
lines changed

11 files changed

+368
-59
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"microsoft.dnceng.secretmanager": {
6-
"version": "1.1.0-beta.25071.2",
6+
"version": "1.1.0-beta.25079.1",
77
"commands": [
88
"secret-manager"
99
]
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dnceng.configuration.bootstrap": {
18-
"version": "1.1.0-beta.25071.2",
18+
"version": "1.1.0-beta.25079.1",
1919
"commands": [
2020
"bootstrap-dnceng-configuration"
2121
]

eng/Version.Details.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,37 +59,37 @@
5959
</Dependency>
6060
</ProductDependencies>
6161
<ToolsetDependencies>
62-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.25066.6">
62+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.25079.1">
6363
<Uri>https://github.com/dotnet/arcade</Uri>
64-
<Sha>4db725213dccb0d1102427bce1c39ba3117da7f7</Sha>
64+
<Sha>cae548d41ddb92922d78f3d9737635d104f650a5</Sha>
6565
</Dependency>
66-
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.25066.6">
66+
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.25079.1">
6767
<Uri>https://github.com/dotnet/arcade</Uri>
68-
<Sha>4db725213dccb0d1102427bce1c39ba3117da7f7</Sha>
68+
<Sha>cae548d41ddb92922d78f3d9737635d104f650a5</Sha>
6969
</Dependency>
70-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.25066.6">
70+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.25079.1">
7171
<Uri>https://github.com/dotnet/arcade</Uri>
72-
<Sha>4db725213dccb0d1102427bce1c39ba3117da7f7</Sha>
72+
<Sha>cae548d41ddb92922d78f3d9737635d104f650a5</Sha>
7373
</Dependency>
74-
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.25066.6">
74+
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.25079.1">
7575
<Uri>https://github.com/dotnet/arcade</Uri>
76-
<Sha>4db725213dccb0d1102427bce1c39ba3117da7f7</Sha>
76+
<Sha>cae548d41ddb92922d78f3d9737635d104f650a5</Sha>
7777
</Dependency>
78-
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.25066.6">
78+
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.25079.1">
7979
<Uri>https://github.com/dotnet/arcade</Uri>
80-
<Sha>4db725213dccb0d1102427bce1c39ba3117da7f7</Sha>
80+
<Sha>cae548d41ddb92922d78f3d9737635d104f650a5</Sha>
8181
</Dependency>
82-
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.25066.6">
82+
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.25079.1">
8383
<Uri>https://github.com/dotnet/arcade</Uri>
84-
<Sha>4db725213dccb0d1102427bce1c39ba3117da7f7</Sha>
84+
<Sha>cae548d41ddb92922d78f3d9737635d104f650a5</Sha>
8585
</Dependency>
86-
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.25071.2">
86+
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.25079.1">
8787
<Uri>https://github.com/dotnet/dnceng</Uri>
88-
<Sha>919c3cbb47ad56b61ba59e3f0ccf6555d4607c7e</Sha>
88+
<Sha>a2f07fa3c2454f47998e7c48652ea91982362a74</Sha>
8989
</Dependency>
90-
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.25071.2">
90+
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.25079.1">
9191
<Uri>https://github.com/dotnet/dnceng</Uri>
92-
<Sha>919c3cbb47ad56b61ba59e3f0ccf6555d4607c7e</Sha>
92+
<Sha>a2f07fa3c2454f47998e7c48652ea91982362a74</Sha>
9393
</Dependency>
9494
</ToolsetDependencies>
9595
</Dependencies>

eng/Versions.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
1010
<MicrosoftNetFrameworkReferenceAssembliesVersion>1.0.0-preview.1</MicrosoftNetFrameworkReferenceAssembliesVersion>
1111
<!-- Libs -->
12-
<MicrosoftDotNetSignToolVersion>8.0.0-beta.25066.6</MicrosoftDotNetSignToolVersion>
13-
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.25066.6</MicrosoftDotNetBuildTasksFeedVersion>
14-
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.25066.6</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
15-
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.25066.6</MicrosoftDotNetGitIssueManagerVersion>
16-
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.25066.6</MicrosoftDotNetVersionToolsVersion>
12+
<MicrosoftDotNetSignToolVersion>8.0.0-beta.25079.1</MicrosoftDotNetSignToolVersion>
13+
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.25079.1</MicrosoftDotNetBuildTasksFeedVersion>
14+
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.25079.1</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
15+
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.25079.1</MicrosoftDotNetGitIssueManagerVersion>
16+
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.25079.1</MicrosoftDotNetVersionToolsVersion>
1717
<MicrosoftNetTestSdkVersion>17.4.1</MicrosoftNetTestSdkVersion>
1818
<MicrosoftDotNetInternalLoggingVersion>1.1.0-beta.25080.1</MicrosoftDotNetInternalLoggingVersion>
1919
<MicrosoftAspNetCoreApiPaginationVersion>1.1.0-beta.25080.1</MicrosoftAspNetCoreApiPaginationVersion>
@@ -32,8 +32,8 @@
3232
<MicrosoftDotNetMetricsVersion>1.1.0-beta.25052.1</MicrosoftDotNetMetricsVersion>
3333
<MicrosoftDotNetServicesUtilityVersion>1.1.0-beta.25080.1</MicrosoftDotNetServicesUtilityVersion>
3434
<MicrosoftDotNetWebAuthenticationVersion>1.1.0-beta.25053.1</MicrosoftDotNetWebAuthenticationVersion>
35-
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.25071.2</MicrosoftDncEngSecretManagerVersion>
36-
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.25071.2</MicrosoftDncEngConfigurationBootstrapVersion>
35+
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.25079.1</MicrosoftDncEngSecretManagerVersion>
36+
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.25079.1</MicrosoftDncEngConfigurationBootstrapVersion>
3737
</PropertyGroup>
3838
<!--Package names-->
3939
<PropertyGroup>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
}
1616
},
1717
"msbuild-sdks": {
18-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25066.6"
18+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25079.1"
1919
}
2020
}

src/Microsoft.DotNet.Darc/Darc/Helpers/LocalSettings.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System;
5+
using System.IO;
56
using Microsoft.DotNet.Darc.Options;
67
using Microsoft.DotNet.ProductConstructionService.Client;
78
using Microsoft.Extensions.Logging;
@@ -14,11 +15,6 @@ namespace Microsoft.DotNet.Darc.Helpers;
1415
/// </summary>
1516
internal class LocalSettings
1617
{
17-
public string BuildAssetRegistryToken { get; set; }
18-
19-
// Old way of storing the settings had the password and not the token so we keep both to deserialize these correctly.
20-
public string BuildAssetRegistryPassword { get; set; }
21-
2218
public string GitHubToken { get; set; }
2319

2420
public string AzureDevOpsToken { get; set; }
@@ -55,6 +51,11 @@ public static LocalSettings GetSettings(ICommandLineOptions options, ILogger log
5551
{
5652
localSettings = LoadSettingsFile();
5753
}
54+
catch (FileNotFoundException)
55+
{
56+
// User has not called darc authenticate yet
57+
// Not a problem of it self unless the operation they run needs the GitHub token
58+
}
5859
catch (Exception e)
5960
{
6061
if (!options.IsCi && options.OutputFormat != DarcOutputType.json)
@@ -71,15 +72,8 @@ static string PreferOptionToSetting(string option, string localSetting)
7172
// Prefer the command line options over the settings file
7273
localSettings ??= new LocalSettings();
7374

74-
if (string.IsNullOrEmpty(localSettings.BuildAssetRegistryToken))
75-
{
76-
// Old way of storing the settings had the password and not the token
77-
localSettings.BuildAssetRegistryToken = localSettings.BuildAssetRegistryPassword;
78-
}
79-
8075
localSettings.AzureDevOpsToken = PreferOptionToSetting(options.AzureDevOpsPat, localSettings.AzureDevOpsToken);
8176
localSettings.GitHubToken = PreferOptionToSetting(options.GitHubPat, localSettings.GitHubToken);
82-
localSettings.BuildAssetRegistryToken = PreferOptionToSetting(options.BuildAssetRegistryToken, localSettings.BuildAssetRegistryToken);
8377
localSettings.BuildAssetRegistryBaseUri = options.BuildAssetRegistryBaseUri
8478
?? localSettings.BuildAssetRegistryBaseUri
8579
?? ProductConstructionServiceApiOptions.ProductionMaestroUri;

src/Microsoft.DotNet.Darc/Darc/Models/PopUps/AuthenticateEditorPopUp.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ internal class AuthenticateEditorPopUp : EditorPopUp
1313
{
1414
private readonly ILogger _logger;
1515

16-
private const string BarPasswordElement = "bar_password";
1716
private const string GithubTokenElement = "github_token";
1817
private const string AzureDevOpsTokenElement = "azure_devops_token";
1918
private const string BarBaseUriElement = "build_asset_registry_base_uri";
@@ -40,12 +39,6 @@ public AuthenticateEditorPopUp(string path, ILogger logger)
4039
// Initialize line contents.
4140
Contents =
4241
[
43-
new("[DEPRECATED]", isComment: true),
44-
new("BAR tokens (formerly created at https://maestro.dot.net/Account/Tokens) are now deprecated.", isComment: true),
45-
new("Interactive sign-in through a security group is now enabled.", isComment: true),
46-
new("See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#setting-up-your-darc-client for more information.", isComment: true),
47-
new($"{BarPasswordElement}={GetCurrentSettingForDisplay(settings.BuildAssetRegistryToken, string.Empty, true)}"),
48-
new(string.Empty),
4942
new("Create new GitHub personal access tokens at https://github.com/settings/tokens (no scopes needed but needs SSO enabled on the PAT)", isComment: true),
5043
new($"{GithubTokenElement}={GetCurrentSettingForDisplay(settings.GitHubToken, string.Empty, true)}"),
5144
new(string.Empty),
@@ -72,15 +65,6 @@ public override Task<int> ProcessContents(IList<Line> contents)
7265

7366
switch (keyValue[0])
7467
{
75-
case BarPasswordElement:
76-
settings.BuildAssetRegistryToken = ParseSetting(keyValue[1], settings.BuildAssetRegistryToken, true);
77-
78-
if (!string.IsNullOrEmpty(settings.BuildAssetRegistryToken))
79-
{
80-
_logger.LogWarning("BAR password is being deprecated and will stop working soon.");
81-
}
82-
83-
break;
8468
case GithubTokenElement:
8569
settings.GitHubToken = ParseSetting(keyValue[1], settings.GitHubToken, true);
8670
break;

src/Microsoft.DotNet.Darc/Darc/Options/CommandLineOptions.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,19 @@ public override Operation GetOperation(ServiceProvider sp)
2828
public abstract class CommandLineOptions : ICommandLineOptions
2929
{
3030
[Option('p', "password",
31-
HelpText = "Token used to authenticate to BAR. If it or the federated token are omitted, auth falls back to Azure CLI or an interactive browser login flow.")]
31+
HelpText = "[DEPRECATED] Token used to authenticate to BAR. Please use Azure CLI or an interactive browser login flow.")]
3232
[RedactFromLogging]
33-
public string BuildAssetRegistryToken { get; set; }
33+
public string BuildAssetRegistryToken
34+
{
35+
get => null;
36+
set
37+
{
38+
if (!string.IsNullOrEmpty(value))
39+
{
40+
Console.WriteLine("The --password option is deprecated. Please use Azure CLI or an interactive browser login flow.");
41+
}
42+
}
43+
}
3444

3545
[Option("github-pat", HelpText = "Token used to authenticate GitHub.")]
3646
[RedactFromLogging]
@@ -106,7 +116,6 @@ public void InitializeFromSettings(ILogger logger)
106116
AzureDevOpsPat ??= localSettings.AzureDevOpsToken;
107117
GitHubPat ??= localSettings.GitHubToken;
108118
BuildAssetRegistryBaseUri ??= localSettings.BuildAssetRegistryBaseUri;
109-
BuildAssetRegistryToken ??= localSettings.BuildAssetRegistryToken;
110119
}
111120

112121
/// <summary>

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

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,86 @@ public async Task AddDependencyAsync(
211211
await AddDependencyToVersionDetailsAsync(repoUri, branch, dependency);
212212
}
213213

214+
public async Task RemoveDependencyAsync(DependencyDetail dependency, string repoUri, string branch, bool repoIsVmr = false)
215+
{
216+
var updatedDependencyVersionFile =
217+
new GitFile(VersionFiles.VersionDetailsXml, await RemoveDependencyFromVersionDetailsAsync(dependency, repoUri, branch));
218+
var updatedVersionPropsFile =
219+
new GitFile(VersionFiles.VersionProps, await RemoveDependencyFromVersionPropsAsync(dependency, repoUri, branch));
220+
List<GitFile> gitFiles = [updatedDependencyVersionFile, updatedVersionPropsFile];
221+
222+
var updatedDotnetTools = await RemoveDotnetToolsDependencyAsync(dependency, repoUri, branch, repoIsVmr);
223+
if (updatedDotnetTools != null)
224+
{
225+
gitFiles.Add(new(VersionFiles.DotnetToolsConfigJson, updatedDotnetTools));
226+
}
227+
228+
await GetGitClient(repoUri).CommitFilesAsync(
229+
gitFiles,
230+
repoUri,
231+
branch,
232+
$"Remove {dependency.Name} from Version.Details.xml and Version.props'");
233+
234+
_logger.LogInformation($"Dependency '{dependency.Name}' successfully removed from '{VersionFiles.VersionDetailsXml}'");
235+
}
236+
237+
private async Task<JObject> RemoveDotnetToolsDependencyAsync(DependencyDetail dependency, string repoUri, string branch, bool repoIsVmr)
238+
{
239+
var dotnetTools = await ReadDotNetToolsConfigJsonAsync(repoUri, branch, repoIsVmr);
240+
241+
if (dotnetTools == null)
242+
{
243+
return null;
244+
}
245+
246+
if (dotnetTools["tools"] is not JObject tools)
247+
{
248+
return null;
249+
}
250+
251+
// we have to do this because JObject is case sensitive
252+
var toolProperty = tools.Properties().FirstOrDefault(p => p.Name.Equals(dependency.Name, StringComparison.OrdinalIgnoreCase));
253+
if (toolProperty != null)
254+
{
255+
tools.Remove(toolProperty.Name);
256+
}
257+
258+
return dotnetTools;
259+
}
260+
261+
private async Task<XmlDocument> RemoveDependencyFromVersionPropsAsync(DependencyDetail dependency, string repoUri, string branch)
262+
{
263+
var versionProps = await ReadVersionPropsAsync(repoUri, branch);
264+
string nodeName = VersionFiles.GetVersionPropsPackageVersionElementName(dependency.Name);
265+
XmlNode element = versionProps.SelectSingleNode($"//{nodeName}");
266+
if (element == null)
267+
{
268+
string alternateNodeName = VersionFiles.GetVersionPropsAlternatePackageVersionElementName(dependency.Name);
269+
element = versionProps.SelectSingleNode($"//{alternateNodeName}");
270+
if (element == null)
271+
{
272+
throw new DependencyException($"Couldn't find dependency {dependency.Name} in Version.props");
273+
}
274+
}
275+
element.ParentNode.RemoveChild(element);
276+
277+
return versionProps;
278+
}
279+
280+
private async Task<XmlDocument> RemoveDependencyFromVersionDetailsAsync(DependencyDetail dependency, string repoUri, string branch)
281+
{
282+
var versionDetails = await ReadVersionDetailsXmlAsync(repoUri, branch);
283+
XmlNode dependencyNode = versionDetails.SelectSingleNode($"//{VersionDetailsParser.DependencyElementName}[@Name='{dependency.Name}']");
284+
285+
if (dependencyNode == null)
286+
{
287+
throw new DependencyException($"Dependency {dependency.Name} not found in Version.Details.xml");
288+
}
289+
290+
dependencyNode.ParentNode.RemoveChild(dependencyNode);
291+
return versionDetails;
292+
}
293+
214294
private static void SetAttribute(XmlDocument document, XmlNode node, string name, string value)
215295
{
216296
XmlAttribute attribute = node.Attributes[name];
@@ -805,8 +885,8 @@ private async Task AddDependencyToVersionsPropsAsync(string repo, string branch,
805885

806886
// Attempt to find the element name or alternate element name under
807887
// the property group nodes
808-
XmlNode existingVersionNode = versionProps.DocumentElement.SelectSingleNode($"//*[local-name()='{packageVersionElementName}' and parent::PropertyGroup]");
809-
existingVersionNode ??= versionProps.DocumentElement.SelectSingleNode($"//*[local-name()='{packageVersionAlternateElementName}' and parent::PropertyGroup]");
888+
XmlNode existingVersionNode = versionProps.DocumentElement.SelectSingleNode($"//*[local-name()='{packageVersionElementName}' and parent::PropertyGroup]")
889+
?? versionProps.DocumentElement.SelectSingleNode($"//*[local-name()='{packageVersionAlternateElementName}' and parent::PropertyGroup]");
810890

811891
if (existingVersionNode != null)
812892
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public interface IDependencyFileManager
2121
{
2222
Task AddDependencyAsync(DependencyDetail dependency, string repoUri, string branch);
2323

24+
Task RemoveDependencyAsync(DependencyDetail dependency, string repoUri, string branch, bool repoIsVmr = false);
25+
2426
Dictionary<string, HashSet<string>> FlattenLocationsAndSplitIntoGroups(Dictionary<string, HashSet<string>> assetLocationMap);
2527

2628
List<(string key, string feed)> GetPackageSources(XmlDocument nugetConfig, Func<string, bool>? filter = null);

src/ProductConstructionService/ProductConstructionService.Api/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ await app.Services.UseLocalWorkItemQueues([
135135
};
136136
});
137137

138+
app.UseHttpLogging();
139+
138140
await app.SetWorkItemProcessorInitialState();
139141

140142
app.Run();

0 commit comments

Comments
 (0)