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 c8755e7

Browse files
authored
[Rollout] Production rollout 2025-03-19 (#4582)
#4581
2 parents 982d599 + 70026ab commit c8755e7

File tree

9 files changed

+23
-16
lines changed

9 files changed

+23
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ public void UpdateVersionDetails(
320320
dependenciesNode.PrependChild(sourceNode);
321321
}
322322

323-
SetAttribute(versionDetails, sourceNode, VersionDetailsParser.MappingElementName, sourceDependency.Mapping);
324323
SetAttribute(versionDetails, sourceNode, VersionDetailsParser.UriElementName, sourceDependency.Uri);
324+
SetAttribute(versionDetails, sourceNode, VersionDetailsParser.MappingElementName, sourceDependency.Mapping);
325325
SetAttribute(versionDetails, sourceNode, VersionDetailsParser.ShaElementName, sourceDependency.Sha);
326326
if (sourceDependency.BarId != null) {
327327
SetAttribute(versionDetails, sourceNode, VersionDetailsParser.BarIdElementName, sourceDependency.BarId.ToString());

src/ProductConstructionService/ProductConstructionService.Common/AddJobLoggingExtension.cs

Lines changed: 3 additions & 0 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

5+
using Microsoft.ApplicationInsights;
56
using Microsoft.ApplicationInsights.Channel;
67
using Microsoft.ApplicationInsights.Extensibility;
78
using Microsoft.Extensions.DependencyInjection;
@@ -44,6 +45,8 @@ public static IHostApplicationBuilder RegisterLogging(
4445
builder.AddConsole();
4546
});
4647

48+
builder.Services.AddSingleton<TelemetryClient>();
49+
4750
return builder;
4851
}
4952
}

src/ProductConstructionService/ProductConstructionService.DependencyFlow/InProgressPullRequest.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ public class InProgressPullRequest : DependencyFlowWorkItem, IPullRequest
3333
[DataMember]
3434
public List<SubscriptionPullRequestUpdate> ContainedSubscriptions { get; set; }
3535

36-
[DataMember]
37-
public List<SubscriptionPullRequestUpdate> Contained { get; init; }
38-
3936
[DataMember]
4037
public List<DependencyUpdateSummary> RequiredUpdates { get; set; }
4138

src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public string GenerateCodeFlowPRTitle(
219219
string targetBranch,
220220
List<string> repoNames)
221221
{
222-
return GeneratePRTitle($"[{targetBranch}] Source code updates from ", repoNames);
222+
return GeneratePRTitle($"[{targetBranch}] Source code updates from", repoNames);
223223
}
224224

225225
public string GenerateCodeFlowPRDescription(

src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ private static TimeSpan GetReminderDelay(DateTimeOffset updatedAt)
919919
>= 30 => TimeSpan.FromHours(12),
920920
>= 21 => TimeSpan.FromHours(1),
921921
>= 14 => TimeSpan.FromMinutes(30),
922-
>= 7 => TimeSpan.FromMinutes(15),
922+
>= 2 => TimeSpan.FromMinutes(15),
923923
_ => DefaultReminderDelay,
924924
};
925925
}

src/ProductConstructionService/ProductConstructionService.FeedCleaner/FeedCleanerJob.cs

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

44
using Kusto.Cloud.Platform.Utils;
5+
using Microsoft.ApplicationInsights;
6+
using Microsoft.ApplicationInsights.DataContracts;
57
using Microsoft.DotNet.DarcLib;
68
using Microsoft.DotNet.DarcLib.Helpers;
79
using Microsoft.DotNet.DarcLib.Models.AzureDevOps;
@@ -93,15 +95,18 @@ await Parallel.ForEachAsync(
9395
async (AzureDevOpsFeed feed, CancellationToken cancellationToken) =>
9496
{
9597
using var scope = _serviceProvider.CreateScope();
96-
97-
try
98-
{
99-
cancellationToken.ThrowIfCancellationRequested();
100-
await feedProcessor(scope, feed);
101-
}
102-
catch (Exception e)
98+
TelemetryClient telemetryClient = scope.ServiceProvider.GetRequiredService<TelemetryClient>();
99+
using (var operation = telemetryClient.StartOperation<RequestTelemetry>(feed.Name))
103100
{
104-
_logger.LogError(e, "Failed to process feed {feed}", feed.Name);
101+
try
102+
{
103+
cancellationToken.ThrowIfCancellationRequested();
104+
await feedProcessor(scope, feed);
105+
}
106+
catch (Exception e)
107+
{
108+
_logger.LogError(e, "Failed to process feed {feed}", feed.Name);
109+
}
105110
}
106111

107112
Interlocked.Increment(ref feedsProcessed);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void IsVmrCodeflowParsedTest()
143143
"""
144144
<?xml version="1.0" encoding="utf-8"?>
145145
<Dependencies>
146-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="SomeRepo" Sha="86ba5fba7c39323011c2bfc6b713142affc76171" BarId="23412" />
146+
<Source Mapping="SomeRepo" Uri="https://github.com/dotnet/dotnet" Sha="86ba5fba7c39323011c2bfc6b713142affc76171" BarId="23412" />
147147
<ProductDependencies>
148148
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0" Pinned="true">
149149
<Uri>https://github.com/dotnet/core-setup</Uri>

test/ProductConstructionService.FeedCleaner.Tests/FeedCleanerTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Maestro.Common.AzureDevOpsTokens;
77
using Maestro.Data;
88
using Maestro.Data.Models;
9+
using Microsoft.ApplicationInsights;
910
using Microsoft.DotNet.DarcLib;
1011
using Microsoft.DotNet.DarcLib.Helpers;
1112
using Microsoft.DotNet.DarcLib.Models.AzureDevOps;
@@ -39,6 +40,7 @@ private FeedCleanerJob InitializeFeedCleaner(string name, Dictionary<string, Azu
3940

4041
services.AddSingleton(_env.Object);
4142
services.AddLogging();
43+
services.AddSingleton<TelemetryClient>();
4244
services.AddDbContext<BuildAssetRegistryContext>(
4345
options =>
4446
{

test/ProductConstructionService.ScenarioTests/ScenarioTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ protected async Task CheckNonBatchedGitHubPullRequest(
268268
}
269269

270270
protected static string GetExpectedCodeFlowDependencyVersionEntry(string repo, string sha, int buildId) =>
271-
$"Source Uri=\"{GetGitHubRepoUrl(repo)}\" Sha=\"{sha}\" BarId=\"{buildId}\" />";
271+
$"<Source Uri=\"{GetGitHubRepoUrl(repo)}\" Mapping=\"{repo}\" Sha=\"{sha}\" BarId=\"{buildId}\" />";
272272

273273
protected async Task CheckGitHubPullRequest(
274274
string expectedPRTitle,

0 commit comments

Comments
 (0)