WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 553d7c3

Browse files
[Rollout] Production rollout 2025-03-25 (#4593)
<!-- 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 --> Rollout issue: #4592
2 parents c8755e7 + 7571def commit 553d7c3

File tree

18 files changed

+85
-38
lines changed

18 files changed

+85
-38
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.25161.2",
6+
"version": "1.1.0-beta.25169.1",
77
"commands": [
88
"secret-manager"
99
]
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dnceng.configuration.bootstrap": {
18-
"version": "1.1.0-beta.25161.2",
18+
"version": "1.1.0-beta.25169.1",
1919
"commands": [
2020
"bootstrap-dnceng-configuration"
2121
]

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@
8383
<Uri>https://github.com/dotnet/arcade</Uri>
8484
<Sha>802042c6e779b73b4edb012ee1d5bae02ec8d41c</Sha>
8585
</Dependency>
86-
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.25161.2">
86+
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.25169.1">
8787
<Uri>https://github.com/dotnet/dnceng</Uri>
88-
<Sha>a584d02e4dee6715fc76104ace6192411bc3c4ed</Sha>
88+
<Sha>5dd38e0f431bcb1a7a829246e0ab6b863eddd966</Sha>
8989
</Dependency>
90-
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.25161.2">
90+
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.25169.1">
9191
<Uri>https://github.com/dotnet/dnceng</Uri>
92-
<Sha>a584d02e4dee6715fc76104ace6192411bc3c4ed</Sha>
92+
<Sha>5dd38e0f431bcb1a7a829246e0ab6b863eddd966</Sha>
9393
</Dependency>
9494
</ToolsetDependencies>
9595
</Dependencies>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<MicrosoftDotNetMetricsVersion>1.1.0-beta.25052.1</MicrosoftDotNetMetricsVersion>
3333
<MicrosoftDotNetServicesUtilityVersion>1.1.0-beta.25164.1</MicrosoftDotNetServicesUtilityVersion>
3434
<MicrosoftDotNetWebAuthenticationVersion>1.1.0-beta.25053.1</MicrosoftDotNetWebAuthenticationVersion>
35-
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.25161.2</MicrosoftDncEngSecretManagerVersion>
36-
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.25161.2</MicrosoftDncEngConfigurationBootstrapVersion>
35+
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.25169.1</MicrosoftDncEngSecretManagerVersion>
36+
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.25169.1</MicrosoftDncEngConfigurationBootstrapVersion>
3737
</PropertyGroup>
3838
<!--Package names-->
3939
<PropertyGroup>

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public async Task<SemanticVersion> ReadToolsDotnetVersionAsync(string repoUri, s
150150

151151
if (!SemanticVersion.TryParse(dotnet.ToString(), out SemanticVersion dotnetVersion))
152152
{
153-
_logger.LogError($"Failed to parse dotnet version from global.json from repo: {repoUri} at commit {commit}. Version: {dotnet}");
153+
_logger.LogError("Failed to parse dotnet version from global.json from repo: {repoUri} at commit {commit}. Version: {version}", repoUri, commit, dotnet);
154154
}
155155

156156
return dotnetVersion;
@@ -163,7 +163,7 @@ public async Task<XmlDocument> ReadNugetConfigAsync(string repoUri, string branc
163163

164164
public async Task<VersionDetails> ParseVersionDetailsXmlAsync(string repoUri, string branch, bool includePinned = true)
165165
{
166-
_logger.LogInformation(
166+
_logger.LogDebug(
167167
$"Getting a collection of dependencies from '{VersionFiles.VersionDetailsXml}' in repo '{repoUri}'" +
168168
(!string.IsNullOrEmpty(branch) ? $" and branch '{branch}'" : string.Empty) + "...");
169169

@@ -1028,21 +1028,31 @@ public static XmlDocument GetXmlDocument(string fileContent)
10281028

10291029
private async Task<XmlDocument> ReadXmlFileAsync(string filePath, string repoUri, string branch)
10301030
{
1031-
_logger.LogInformation($"Reading '{filePath}' in repo '{repoUri}' and branch '{branch}'...");
1031+
_logger.LogDebug("Reading '{file}' in repo '{repoUri}' and branch '{branch}'...",
1032+
filePath,
1033+
repoUri,
1034+
branch);
10321035

10331036
var fileContent = await GetGitClient(repoUri).GetFileContentsAsync(filePath, repoUri, branch);
10341037

10351038
try
10361039
{
10371040
XmlDocument document = GetXmlDocument(fileContent);
10381041

1039-
_logger.LogInformation($"Reading '{filePath}' from repo '{repoUri}' and branch '{branch}' succeeded!");
1042+
_logger.LogDebug("Reading '{filePath}' from repo '{repoUri}' and branch '{branch}' succeeded!",
1043+
filePath,
1044+
repoUri,
1045+
branch);
10401046

10411047
return document;
10421048
}
1043-
catch (Exception exc)
1049+
catch
10441050
{
1045-
_logger.LogError(exc, $"There was an exception while loading '{filePath}'");
1051+
_logger.LogError(
1052+
"Failed to read '{filePath}' from repo '{repoUri}' and branch '{branch}'",
1053+
filePath,
1054+
repoUri,
1055+
branch);
10461056
throw;
10471057
}
10481058
}

src/Microsoft.DotNet.Darc/DarcLib/ILocalGitClient.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ Task<string> BlameLineAsync(
5454
/// <param name="repoPath">Path to the repository</param>
5555
Task<bool> HasWorkingTreeChangesAsync(string repoPath);
5656

57+
/// <summary>
58+
/// Checks if the repository has any staged changes.
59+
/// </summary>
60+
/// <param name="repoPath">Path to the repository</param>
61+
Task<bool> HasStagedChangesAsync(string repoPath);
62+
5763
/// <summary>
5864
/// Checkout the repo to the specified state.
5965
/// </summary>
@@ -97,6 +103,13 @@ Task CommitAsync(
97103
/// <param name="overwriteExistingBranch">Whether to overwrite an already existing branch</param>
98104
Task CreateBranchAsync(string repoPath, string branchName, bool overwriteExistingBranch = false);
99105

106+
/// <summary>
107+
/// Deletes a local branch.
108+
/// </summary>
109+
/// <param name="repoPath">Path to a git repository</param>
110+
/// <param name="branchName">Name of the branch to delete</param>
111+
Task DeleteBranchAsync(string repoPath, string branchName);
112+
100113
/// <summary>
101114
/// Fetches from a given remote.
102115
/// </summary>

src/Microsoft.DotNet.Darc/DarcLib/ILocalGitRepo.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ Task<string> BlameLineAsync(
6464
/// </summary>
6565
Task<bool> HasWorkingTreeChangesAsync();
6666

67+
/// <summary>
68+
/// Checks if the repository has any staged changes.
69+
/// </summary>
70+
Task<bool> HasStagedChangesAsync();
71+
6772
/// <summary>
6873
/// Checkout the repo to the specified state.
6974
/// </summary>
@@ -102,6 +107,12 @@ Task CommitAsync(
102107
/// <param name="overwriteExistingBranch">Whether to overwrite an already existing branch</param>
103108
Task CreateBranchAsync(string branchName, bool overwriteExistingBranch = false);
104109

110+
/// <summary>
111+
/// Deletes a local branch.
112+
/// </summary>
113+
/// <param name="branchName">Name of the branch to delete</param>
114+
Task DeleteBranchAsync(string branchName);
115+
105116
/// <summary>
106117
/// Fetches from a given remote.
107118
/// </summary>

src/Microsoft.DotNet.Darc/DarcLib/LocalGitClient.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ public async Task CreateBranchAsync(string repoPath, string branchName, bool ove
125125
result.ThrowIfFailed($"Failed to create {branchName} in {repoPath}");
126126
}
127127

128+
public async Task DeleteBranchAsync(string repoPath, string branchName)
129+
{
130+
var result = await _processManager.ExecuteGit(repoPath, ["branch", "-D", branchName]);
131+
result.ThrowIfFailed($"Failed to delete branch {branchName} in {repoPath}");
132+
}
133+
128134
public async Task CommitAsync(
129135
string repoPath,
130136
string message,
@@ -494,6 +500,12 @@ public async Task<bool> HasWorkingTreeChangesAsync(string repoPath)
494500
return !result.Succeeded;
495501
}
496502

503+
public async Task<bool> HasStagedChangesAsync(string repoPath)
504+
{
505+
var result = await _processManager.ExecuteGit(repoPath, ["diff", "--cached", "--exit-code", "--quiet"]);
506+
return !result.Succeeded;
507+
}
508+
497509
public async Task AddGitAuthHeader(IList<string> args, IDictionary<string, string> envVars, string repoUri)
498510
{
499511
var token = await _remoteConfiguration.GetTokenForRepositoryAsync(repoUri);

src/Microsoft.DotNet.Darc/DarcLib/LocalGitRepo.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public async Task<string> BlameLineAsync(string filePath, Func<string, bool> isT
4242
public async Task<bool> HasWorkingTreeChangesAsync()
4343
=> await _localGitClient.HasWorkingTreeChangesAsync(Path);
4444

45+
public async Task<bool> HasStagedChangesAsync()
46+
=> await _localGitClient.HasStagedChangesAsync(Path);
47+
4548
public async Task CheckoutAsync(string refToCheckout)
4649
=> await _localGitClient.CheckoutAsync(Path, refToCheckout);
4750

@@ -54,6 +57,9 @@ public async Task CommitAmendAsync(CancellationToken cancellationToken = default
5457
public async Task CreateBranchAsync(string branchName, bool overwriteExistingBranch = false)
5558
=> await _localGitClient.CreateBranchAsync(Path, branchName, overwriteExistingBranch);
5659

60+
public async Task DeleteBranchAsync(string branchName)
61+
=> await _localGitClient.DeleteBranchAsync(Path, branchName);
62+
5763
public async Task<string?> GetFileFromGitAsync(string relativeFilePath, string revision = "HEAD", string? outputPath = null)
5864
=> await _localGitClient.GetFileFromGitAsync(Path, relativeFilePath, revision, outputPath);
5965

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Task<CodeFlowResult> FlowBackAsync(
4141
CancellationToken cancellationToken = default);
4242
}
4343

44-
internal class VmrBackFlower : VmrCodeFlower, IVmrBackFlower
44+
public class VmrBackFlower : VmrCodeFlower, IVmrBackFlower
4545
{
4646
private readonly IVmrInfo _vmrInfo;
4747
private readonly ISourceManifest _sourceManifest;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.DotNet.DarcLib.VirtualMonoRepo;
1818
/// This class is responsible for taking changes done to a repo in the VMR and backflowing them into the repo.
1919
/// It only makes patches/changes locally, no other effects are done.
2020
/// </summary>
21-
internal abstract class VmrCodeFlower
21+
public abstract class VmrCodeFlower
2222
{
2323
private readonly IVmrInfo _vmrInfo;
2424
private readonly ISourceManifest _sourceManifest;

0 commit comments

Comments
 (0)