Skip to content

Commit ac7e0aa

Browse files
committed
Merge branch 'main' into copilot/fix-50548
Resolved conflicts: - WebAssemblyHotReload.cs: Accepted deletion from main (entire class was removed) - PublicAPI.Unshipped.txt: Merged *REMOVED* entries properly
2 parents 5df2b0b + 773dd5a commit ac7e0aa

File tree

161 files changed

+1665
-1045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+1665
-1045
lines changed

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
backport:
17-
uses: dotnet/arcade/.github/workflows/backport-base.yml@5a11b260f9b0f31b4e7643ad823a4e0f2cdb3ddb # 2025-01-13
17+
uses: dotnet/arcade/.github/workflows/backport-base.yml@d777c20040bdc2e52b372fa98dcb84141ed692d3 # 2025-01-13
1818
with:
1919
pr_description_template: |
2020
Backport of #%source_pr_number% to %target_branch%

.github/workflows/inter-branch-merge-flow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ permissions:
1010

1111
jobs:
1212
Merge:
13-
uses: dotnet/arcade/.github/workflows/backport-base.yml@5a11b260f9b0f31b4e7643ad823a4e0f2cdb3ddb # 2024-06-24
13+
uses: dotnet/arcade/.github/workflows/backport-base.yml@d777c20040bdc2e52b372fa98dcb84141ed692d3 # 2024-06-24

eng/Version.Details.xml

Lines changed: 215 additions & 211 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 103 additions & 104 deletions
Large diffs are not rendered by default.

eng/scripts/CodeCheck.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ try {
124124
foreach ($dep in $versionDetails.SelectNodes('//Dependency')) {
125125
Write-Verbose "Found $dep"
126126

127+
if ($dep.Label -eq 'Manual') {
128+
# skip dependencies that are manually updated
129+
continue
130+
}
131+
127132
$expectedVersion = $dep.Version
128133

129134
if ($dep.Name -in $globalJson.'msbuild-sdks'.PSObject.Properties.Name) {

eng/targets/Helix.Common.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<ItemGroup>
3232
<HelixAvailableTargetQueue Include="Ubuntu.2004.Amd64.Open" Platform="Linux" />
3333
<HelixAvailableTargetQueue Include="OSX.15.Amd64.Open" Platform="OSX" />
34-
<HelixAvailableTargetQueue Include="Windows.11.Amd64.Client.Open" Platform="Windows" />
34+
<HelixAvailableTargetQueue Include="Windows.Amd64.VS2022.Pre.Open" Platform="Windows" />
3535
</ItemGroup>
3636
</When>
3737
<Otherwise>
@@ -54,7 +54,7 @@
5454

5555
<!-- Windows -->
5656
<HelixAvailableTargetQueue Include="Windows.Amd64.Server2022.Open" Platform="Windows" />
57-
<HelixAvailableTargetQueue Include="Windows.Amd64.VS2022.Pre.Open" Platform="Windows" />
57+
<HelixAvailableTargetQueue Include="Windows.11.Amd64.Client.Open" Platform="Windows" />
5858

5959
<!-- IIS Express isn't supported on arm64 and most of the IsWindowsOnlyTests depend on its setup scripts. -->
6060
<HelixAvailableTargetQueue Include="windows.11.arm64.open" Platform="Windows"

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
"jdk": "latest"
2828
},
2929
"msbuild-sdks": {
30-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25358.102",
31-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25358.102",
32-
"Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25358.102",
30+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25367.101",
31+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25367.101",
32+
"Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25367.101",
3333
"Microsoft.Build.NoTargets": "3.7.0",
3434
"Microsoft.Build.Traversal": "3.4.0"
3535
}

src/Components/Components/src/ComponentsActivitySource.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Components;
1212
internal class ComponentsActivitySource
1313
{
1414
internal const string Name = "Microsoft.AspNetCore.Components";
15-
internal const string OnRouteName = $"{Name}.RouteChange";
15+
internal const string OnRouteName = $"{Name}.Navigate";
1616
internal const string OnEventName = $"{Name}.HandleEvent";
1717

1818
private static ActivitySource ActivitySource { get; } = new ActivitySource(Name);
@@ -23,7 +23,7 @@ public void Init(ComponentsActivityLinkStore store)
2323
_componentsActivityLinkStore = store;
2424
}
2525

26-
public ComponentsActivityHandle StartRouteActivity(string componentType, string route)
26+
public ComponentsActivityHandle StartNavigateActivity(string componentType, string route)
2727
{
2828
var activity = ActivitySource.CreateActivity(OnRouteName, ActivityKind.Internal, parentId: null, null, null);
2929
if (activity is not null)
@@ -54,12 +54,12 @@ public ComponentsActivityHandle StartRouteActivity(string componentType, string
5454
return default;
5555
}
5656

57-
public void StopRouteActivity(ComponentsActivityHandle activityHandle, Exception? ex)
57+
public void StopNavigateActivity(ComponentsActivityHandle activityHandle, Exception? ex)
5858
{
5959
StopComponentActivity(ComponentsActivityLinkStore.Route, activityHandle, ex);
6060
}
6161

62-
public static ComponentsActivityHandle StartEventActivity(string? componentType, string? methodName, string? attributeName)
62+
public static ComponentsActivityHandle StartHandleEventActivity(string? componentType, string? methodName, string? attributeName)
6363
{
6464
var activity = ActivitySource.CreateActivity(OnEventName, ActivityKind.Internal, parentId: null, null, null);
6565

@@ -91,21 +91,21 @@ public static ComponentsActivityHandle StartEventActivity(string? componentType,
9191
return default;
9292
}
9393

94-
public void StopEventActivity(ComponentsActivityHandle activityHandle, Exception? ex)
94+
public void StopHandleEventActivity(ComponentsActivityHandle activityHandle, Exception? ex)
9595
{
9696
StopComponentActivity(ComponentsActivityLinkStore.Event, activityHandle, ex);
9797
}
9898

99-
public async Task CaptureEventStopAsync(Task task, ComponentsActivityHandle activityHandle)
99+
public async Task CaptureHandleEventStopAsync(Task task, ComponentsActivityHandle activityHandle)
100100
{
101101
try
102102
{
103103
await task;
104-
StopEventActivity(activityHandle, null);
104+
StopHandleEventActivity(activityHandle, null);
105105
}
106106
catch (Exception ex)
107107
{
108-
StopEventActivity(activityHandle, ex);
108+
StopHandleEventActivity(activityHandle, ex);
109109
}
110110
}
111111

src/Components/Components/src/ComponentsMetrics.cs

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal sealed class ComponentsMetrics : IDisposable
2020
private readonly Histogram<double> _eventDuration;
2121
private readonly Histogram<double> _parametersDuration;
2222
private readonly Histogram<double> _batchDuration;
23+
private readonly Histogram<int> _batchSize;
2324

2425
public bool IsNavigationEnabled => _navigationCount.Enabled;
2526

@@ -37,27 +38,33 @@ public ComponentsMetrics(IMeterFactory meterFactory)
3738
_lifeCycleMeter = meterFactory.Create(LifecycleMeterName);
3839

3940
_navigationCount = _meter.CreateCounter<long>(
40-
"aspnetcore.components.navigation",
41+
"aspnetcore.components.navigate",
4142
unit: "{route}",
4243
description: "Total number of route changes.");
4344

4445
_eventDuration = _meter.CreateHistogram(
45-
"aspnetcore.components.event_handler",
46+
"aspnetcore.components.handle_event.duration",
4647
unit: "s",
4748
description: "Duration of processing browser event. It includes business logic of the component but not affected child components.",
4849
advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries });
4950

5051
_parametersDuration = _lifeCycleMeter.CreateHistogram(
51-
"aspnetcore.components.update_parameters",
52+
"aspnetcore.components.update_parameters.duration",
5253
unit: "s",
5354
description: "Duration of processing component parameters. It includes business logic of the component.",
5455
advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingSecondsBucketBoundaries });
5556

5657
_batchDuration = _lifeCycleMeter.CreateHistogram(
57-
"aspnetcore.components.render_diff",
58+
"aspnetcore.components.render_diff.duration",
5859
unit: "s",
5960
description: "Duration of rendering component tree and producing HTML diff. It includes business logic of the changed components.",
6061
advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingSecondsBucketBoundaries });
62+
63+
_batchSize = _lifeCycleMeter.CreateHistogram(
64+
"aspnetcore.components.render_diff.size",
65+
unit: "{elements}",
66+
description: "Number of HTML elements modified during a rendering batch.",
67+
advice: new InstrumentAdvice<int> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingDiffLengthBucketBoundaries });
6168
}
6269

6370
public void Navigation(string componentType, string route)
@@ -137,10 +144,7 @@ public void FailParametersSync(Exception ex, long startTimestamp, string? compon
137144

138145
public async Task CaptureBatchDuration(Task task, long startTimestamp, int diffLength)
139146
{
140-
var tags = new TagList
141-
{
142-
{ "aspnetcore.components.diff.length", BucketDiffLength(diffLength) }
143-
};
147+
var tags = new TagList();
144148

145149
try
146150
{
@@ -152,37 +156,19 @@ public async Task CaptureBatchDuration(Task task, long startTimestamp, int diffL
152156
}
153157
var duration = Stopwatch.GetElapsedTime(startTimestamp);
154158
_batchDuration.Record(duration.TotalSeconds, tags);
159+
_batchSize.Record(diffLength, tags);
155160
}
156161

157162
public void FailBatchSync(Exception ex, long startTimestamp)
158163
{
159164
var duration = Stopwatch.GetElapsedTime(startTimestamp);
160165
var tags = new TagList
161166
{
162-
{ "aspnetcore.components.diff.length", 0 },
163167
{ "error.type", ex.GetType().FullName ?? "unknown" }
164168
};
165169
_batchDuration.Record(duration.TotalSeconds, tags);
166170
}
167171

168-
private static int BucketDiffLength(int diffLength)
169-
{
170-
return diffLength switch
171-
{
172-
<= 1 => 1,
173-
<= 2 => 2,
174-
<= 5 => 5,
175-
<= 10 => 10,
176-
<= 20 => 20,
177-
<= 50 => 50,
178-
<= 100 => 100,
179-
<= 500 => 500,
180-
<= 1000 => 1000,
181-
<= 10000 => 10000,
182-
_ => 10001,
183-
};
184-
}
185-
186172
public void Dispose()
187173
{
188174
_meter.Dispose();

src/Components/Components/src/NavigationManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public event EventHandler<NotFoundEventArgs> OnNotFound
6161
// The URI. Always represented an absolute URI.
6262
private string? _uri;
6363
private bool _isInitialized;
64-
internal string NotFoundPageRoute { get; set; } = string.Empty;
6564

6665
/// <summary>
6766
/// Gets or sets the current base URI. The <see cref="BaseUri" /> is always represented as an absolute URI in string form with trailing slash.
@@ -211,7 +210,7 @@ private void NotFoundCore()
211210
}
212211
else
213212
{
214-
_notFound.Invoke(this, new NotFoundEventArgs(NotFoundPageRoute));
213+
_notFound.Invoke(this, new NotFoundEventArgs());
215214
}
216215
}
217216

0 commit comments

Comments
 (0)