Skip to content

Commit cd10295

Browse files
Merge main into darc-main-9b7f1a35-54ef-4967-9955-a8825ecaf3a1
2 parents bf1f642 + e7d49f5 commit cd10295

File tree

51 files changed

+509
-363
lines changed

Some content is hidden

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

51 files changed

+509
-363
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@d777c20040bdc2e52b372fa98dcb84141ed692d3 # 2025-01-13
17+
uses: dotnet/arcade/.github/workflows/backport-base.yml@e2fed65f9c524d12c64876194ae4ce177b935bb3 # 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@d777c20040bdc2e52b372fa98dcb84141ed692d3 # 2024-06-24
13+
uses: dotnet/arcade/.github/workflows/backport-base.yml@e2fed65f9c524d12c64876194ae4ce177b935bb3 # 2024-06-24

eng/Version.Details.xml

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

eng/Versions.props

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

eng/common/core-templates/job/job.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ parameters:
2020
artifacts: ''
2121
enableMicrobuild: false
2222
enableMicrobuildForMacAndLinux: false
23+
microbuildUseESRP: true
2324
enablePublishBuildArtifacts: false
2425
enablePublishBuildAssets: false
2526
enablePublishTestResults: false
@@ -128,6 +129,7 @@ jobs:
128129
parameters:
129130
enableMicrobuild: ${{ parameters.enableMicrobuild }}
130131
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
132+
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
131133
continueOnError: ${{ parameters.continueOnError }}
132134

133135
- ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:

eng/common/core-templates/steps/install-microbuild.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ parameters:
44
# Enable install tasks for MicroBuild on Mac and Linux
55
# Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'
66
enableMicrobuildForMacAndLinux: false
7+
# Determines whether the ESRP service connection information should be passed to the signing plugin.
8+
# This overlaps with _SignType to some degree. We only need the service connection for real signing.
9+
# It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place.
10+
# Doing so will cause the service connection to be authorized for the pipeline, which isn't allowed and won't work for non-prod.
11+
# Unfortunately, _SignType can't be used to exclude the use of the service connection in non-real sign scenarios. The
12+
# variable is not available in template expression. _SignType has a very large proliferation across .NET, so replacing it is tough.
13+
microbuildUseESRP: true
714
# Location of the MicroBuild output folder
815
microBuildOutputFolder: '$(Build.SourcesDirectory)'
16+
917
continueOnError: false
1018

1119
steps:
@@ -21,19 +29,37 @@ steps:
2129
workingDirectory: ${{ parameters.microBuildOutputFolder }}
2230
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
2331

32+
- script: |
33+
REM Check if ESRP is disabled while SignType is real
34+
if /I "${{ parameters.microbuildUseESRP }}"=="false" if /I "$(_SignType)"=="real" (
35+
echo Error: ESRP must be enabled when SignType is real.
36+
exit /b 1
37+
)
38+
displayName: 'Validate ESRP usage (Windows)'
39+
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
40+
- script: |
41+
# Check if ESRP is disabled while SignType is real
42+
if [ "${{ parameters.microbuildUseESRP }}" = "false" ] && [ "$(_SignType)" = "real" ]; then
43+
echo "Error: ESRP must be enabled when SignType is real."
44+
exit 1
45+
fi
46+
displayName: 'Validate ESRP usage (Non-Windows)'
47+
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
48+
2449
- task: MicroBuildSigningPlugin@4
2550
displayName: Install MicroBuild plugin
2651
inputs:
2752
signType: $(_SignType)
2853
zipSources: false
2954
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
30-
${{ if and(eq(parameters.enableMicrobuildForMacAndLinux, 'true'), ne(variables['Agent.Os'], 'Windows_NT')) }}:
31-
azureSubscription: 'MicroBuild Signing Task (DevDiv)'
32-
useEsrpCli: true
33-
${{ elseif eq(variables['System.TeamProject'], 'DevDiv') }}:
34-
ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
35-
${{ else }}:
36-
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
55+
${{ if eq(parameters.microbuildUseESRP, true) }}:
56+
${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:
57+
azureSubscription: 'MicroBuild Signing Task (DevDiv)'
58+
useEsrpCli: true
59+
${{ elseif eq(variables['System.TeamProject'], 'DevDiv') }}:
60+
ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
61+
${{ else }}:
62+
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
3763
env:
3864
TeamName: $(_TeamName)
3965
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}

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.25373.104",
31-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25373.104",
32-
"Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25373.104",
30+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25374.102",
31+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25374.102",
32+
"Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25374.102",
3333
"Microsoft.Build.NoTargets": "3.7.0",
3434
"Microsoft.Build.Traversal": "3.4.0"
3535
}

src/Components/Authorization/src/AttributeAuthorizeDataCache.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@
33

44
using System.Collections.Concurrent;
55
using Microsoft.AspNetCore.Authorization;
6+
using Microsoft.AspNetCore.Components.HotReload;
67

78
namespace Microsoft.AspNetCore.Components.Authorization;
89

910
internal static class AttributeAuthorizeDataCache
1011
{
12+
static AttributeAuthorizeDataCache()
13+
{
14+
if (HotReloadManager.Default.MetadataUpdateSupported)
15+
{
16+
HotReloadManager.Default.OnDeltaApplied += ClearCache;
17+
}
18+
}
19+
1120
private static readonly ConcurrentDictionary<Type, IAuthorizeData[]?> _cache = new();
1221

22+
private static void ClearCache() => _cache.Clear();
23+
1324
public static IAuthorizeData[]? GetAuthorizeDataForType(Type type)
1425
{
1526
if (!_cache.TryGetValue(type, out var result))

src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@
1414
<Reference Include="Microsoft.AspNetCore.Components" />
1515
</ItemGroup>
1616

17+
<ItemGroup>
18+
<Compile Include="$(ComponentsSharedSourceRoot)src\HotReloadManager.cs" LinkBase="HotReload" />
19+
</ItemGroup>
20+
1721
</Project>

src/Components/Components/src/BindConverter.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Reflection;
99
using System.Text;
1010
using System.Text.Json;
11+
using Microsoft.AspNetCore.Components.HotReload;
1112

1213
namespace Microsoft.AspNetCore.Components;
1314

@@ -1667,6 +1668,14 @@ private static class FormatterDelegateCache
16671668
{
16681669
private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
16691670

1671+
static FormatterDelegateCache()
1672+
{
1673+
if (HotReloadManager.Default.MetadataUpdateSupported)
1674+
{
1675+
HotReloadManager.Default.OnDeltaApplied += _cache.Clear;
1676+
}
1677+
}
1678+
16701679
private static MethodInfo? _makeArrayFormatter;
16711680

16721681
[UnconditionalSuppressMessage(
@@ -1856,6 +1865,14 @@ internal static class ParserDelegateCache
18561865
{
18571866
private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
18581867

1868+
static ParserDelegateCache()
1869+
{
1870+
if (HotReloadManager.Default.MetadataUpdateSupported)
1871+
{
1872+
HotReloadManager.Default.OnDeltaApplied += _cache.Clear;
1873+
}
1874+
}
1875+
18591876
private static MethodInfo? _convertToEnum;
18601877
private static MethodInfo? _convertToNullableEnum;
18611878
private static MethodInfo? _makeArrayTypeConverter;

0 commit comments

Comments
 (0)