Skip to content

Commit 3c92af9

Browse files
[Rollout] Production rollout 2025-02-19 (#4470)
<!-- 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 --> #4469
2 parents f2f44ec + f7808ce commit 3c92af9

File tree

23 files changed

+209
-149
lines changed

23 files changed

+209
-149
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.25105.1",
6+
"version": "1.1.0-beta.25112.1",
77
"commands": [
88
"secret-manager"
99
]
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dnceng.configuration.bootstrap": {
18-
"version": "1.1.0-beta.25105.1",
18+
"version": "1.1.0-beta.25112.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.25111.4">
62+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.25114.5">
6363
<Uri>https://github.com/dotnet/arcade</Uri>
64-
<Sha>a319ada170a54ee87c7a81e3309948e3d3ea7aca</Sha>
64+
<Sha>221fba21fbd6a29f17af7a7004f8ef18a51519bd</Sha>
6565
</Dependency>
66-
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.25111.4">
66+
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.25114.5">
6767
<Uri>https://github.com/dotnet/arcade</Uri>
68-
<Sha>a319ada170a54ee87c7a81e3309948e3d3ea7aca</Sha>
68+
<Sha>221fba21fbd6a29f17af7a7004f8ef18a51519bd</Sha>
6969
</Dependency>
70-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.25111.4">
70+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.25114.5">
7171
<Uri>https://github.com/dotnet/arcade</Uri>
72-
<Sha>a319ada170a54ee87c7a81e3309948e3d3ea7aca</Sha>
72+
<Sha>221fba21fbd6a29f17af7a7004f8ef18a51519bd</Sha>
7373
</Dependency>
74-
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.25111.4">
74+
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.25114.5">
7575
<Uri>https://github.com/dotnet/arcade</Uri>
76-
<Sha>a319ada170a54ee87c7a81e3309948e3d3ea7aca</Sha>
76+
<Sha>221fba21fbd6a29f17af7a7004f8ef18a51519bd</Sha>
7777
</Dependency>
78-
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.25111.4">
78+
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.25114.5">
7979
<Uri>https://github.com/dotnet/arcade</Uri>
80-
<Sha>a319ada170a54ee87c7a81e3309948e3d3ea7aca</Sha>
80+
<Sha>221fba21fbd6a29f17af7a7004f8ef18a51519bd</Sha>
8181
</Dependency>
82-
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.25111.4">
82+
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.25114.5">
8383
<Uri>https://github.com/dotnet/arcade</Uri>
84-
<Sha>a319ada170a54ee87c7a81e3309948e3d3ea7aca</Sha>
84+
<Sha>221fba21fbd6a29f17af7a7004f8ef18a51519bd</Sha>
8585
</Dependency>
86-
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.25105.1">
86+
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.25112.1">
8787
<Uri>https://github.com/dotnet/dnceng</Uri>
88-
<Sha>4bed5dae695e1e6ac0c35e35c7231d09f5661eab</Sha>
88+
<Sha>311b348d2b56b83ad0ae81986835b050430eb63e</Sha>
8989
</Dependency>
90-
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.25105.1">
90+
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.25112.1">
9191
<Uri>https://github.com/dotnet/dnceng</Uri>
92-
<Sha>4bed5dae695e1e6ac0c35e35c7231d09f5661eab</Sha>
92+
<Sha>311b348d2b56b83ad0ae81986835b050430eb63e</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.25111.4</MicrosoftDotNetSignToolVersion>
13-
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.25111.4</MicrosoftDotNetBuildTasksFeedVersion>
14-
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.25111.4</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
15-
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.25111.4</MicrosoftDotNetGitIssueManagerVersion>
16-
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.25111.4</MicrosoftDotNetVersionToolsVersion>
12+
<MicrosoftDotNetSignToolVersion>8.0.0-beta.25114.5</MicrosoftDotNetSignToolVersion>
13+
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.25114.5</MicrosoftDotNetBuildTasksFeedVersion>
14+
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.25114.5</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
15+
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.25114.5</MicrosoftDotNetGitIssueManagerVersion>
16+
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.25114.5</MicrosoftDotNetVersionToolsVersion>
1717
<MicrosoftNetTestSdkVersion>17.4.1</MicrosoftNetTestSdkVersion>
1818
<MicrosoftDotNetInternalLoggingVersion>1.1.0-beta.25111.1</MicrosoftDotNetInternalLoggingVersion>
1919
<MicrosoftAspNetCoreApiPaginationVersion>1.1.0-beta.25111.1</MicrosoftAspNetCoreApiPaginationVersion>
@@ -32,8 +32,8 @@
3232
<MicrosoftDotNetMetricsVersion>1.1.0-beta.25052.1</MicrosoftDotNetMetricsVersion>
3333
<MicrosoftDotNetServicesUtilityVersion>1.1.0-beta.25111.1</MicrosoftDotNetServicesUtilityVersion>
3434
<MicrosoftDotNetWebAuthenticationVersion>1.1.0-beta.25053.1</MicrosoftDotNetWebAuthenticationVersion>
35-
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.25105.1</MicrosoftDncEngSecretManagerVersion>
36-
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.25105.1</MicrosoftDncEngConfigurationBootstrapVersion>
35+
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.25112.1</MicrosoftDncEngSecretManagerVersion>
36+
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.25112.1</MicrosoftDncEngConfigurationBootstrapVersion>
3737
</PropertyGroup>
3838
<!--Package names-->
3939
<PropertyGroup>

eng/common/templates-official/steps/send-to-helix.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parameters:
88
HelixConfiguration: '' # optional -- additional property attached to a job
99
HelixPreCommands: '' # optional -- commands to run before Helix work item execution
1010
HelixPostCommands: '' # optional -- commands to run after Helix work item execution
11+
HelixProjectArguments: '' # optional -- arguments passed to the build command for helixpublish.proj
1112
WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
1213
WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
1314
WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
@@ -24,12 +25,12 @@ parameters:
2425
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
2526
HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net )
2627
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
27-
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
28+
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
2829
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
2930
continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
3031

3132
steps:
32-
- powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
33+
- powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
3334
displayName: ${{ parameters.DisplayNamePrefix }} (Windows)
3435
env:
3536
BuildConfig: $(_BuildConfig)
@@ -59,7 +60,7 @@ steps:
5960
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
6061
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
6162
continueOnError: ${{ parameters.continueOnError }}
62-
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
63+
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
6364
displayName: ${{ parameters.DisplayNamePrefix }} (Unix)
6465
env:
6566
BuildConfig: $(_BuildConfig)

eng/common/templates/steps/send-to-helix.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parameters:
88
HelixConfiguration: '' # optional -- additional property attached to a job
99
HelixPreCommands: '' # optional -- commands to run before Helix work item execution
1010
HelixPostCommands: '' # optional -- commands to run after Helix work item execution
11+
HelixProjectArguments: '' # optional -- arguments passed to the build command for helixpublish.proj
1112
WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
1213
WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
1314
WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
@@ -24,12 +25,12 @@ parameters:
2425
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
2526
HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net )
2627
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
27-
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
28+
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
2829
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
2930
continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
3031

3132
steps:
32-
- powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
33+
- powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
3334
displayName: ${{ parameters.DisplayNamePrefix }} (Windows)
3435
env:
3536
BuildConfig: $(_BuildConfig)
@@ -59,7 +60,7 @@ steps:
5960
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
6061
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
6162
continueOnError: ${{ parameters.continueOnError }}
62-
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
63+
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj ${{ parameters.HelixProjectArguments }} /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
6364
displayName: ${{ parameters.DisplayNamePrefix }} (Unix)
6465
env:
6566
BuildConfig: $(_BuildConfig)

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.25111.4"
18+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25114.5"
1919
}
2020
}

src/Maestro/Maestro.Common/AppCredentials/AppCredential.cs

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static AppCredential CreateUserCredential(string appId, TokenRequestConte
5959
/// Creates an interactive credential. Checks local cache first for an authentication record.
6060
/// Authentication record is a set of app and user-specific metadata used by the library to authenticate
6161
/// </summary>
62-
private static InteractiveBrowserCredential GetInteractiveCredential(
62+
private static CachedInteractiveBrowserCredential GetInteractiveCredential(
6363
string appId,
6464
TokenRequestContext requestContext,
6565
string authRecordPath)
@@ -77,43 +77,7 @@ private static InteractiveBrowserCredential GetInteractiveCredential(
7777
},
7878
};
7979

80-
81-
var authRecordDir = Path.GetDirectoryName(authRecordPath) ??
82-
throw new ArgumentException($"Cannot resolve cache dir from auth record: {authRecordPath}");
83-
84-
if (!Directory.Exists(authRecordDir))
85-
{
86-
Directory.CreateDirectory(authRecordDir);
87-
}
88-
89-
if (File.Exists(authRecordPath))
90-
{
91-
try
92-
{
93-
// Fetch existing authentication record to not prompt the user for consent
94-
using var authRecordReadStream = new FileStream(authRecordPath, FileMode.Open, FileAccess.Read);
95-
credentialOptions.AuthenticationRecord = AuthenticationRecord.Deserialize(authRecordReadStream);
96-
}
97-
catch
98-
{
99-
// We failed to read the authentication record, we should delete the invalid file and re-create it
100-
File.Delete(authRecordPath);
101-
102-
return GetInteractiveCredential(appId, requestContext, authRecordPath);
103-
}
104-
105-
return new InteractiveBrowserCredential(credentialOptions);
106-
}
107-
108-
var credential = new InteractiveBrowserCredential(credentialOptions);
109-
110-
// Prompt the user for consent and save the resulting authentication record on disk
111-
var authRecord = credential.Authenticate(requestContext);
112-
113-
using var authRecordStream = new FileStream(authRecordPath, FileMode.Create, FileAccess.Write);
114-
authRecord.Serialize(authRecordStream);
115-
116-
return credential;
80+
return new CachedInteractiveBrowserCredential(credentialOptions, authRecordPath);
11781
}
11882

11983
/// <summary>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using Azure.Core;
5+
using Azure.Identity;
6+
7+
namespace Maestro.Common.AppCredentials;
8+
public class CachedInteractiveBrowserCredential: TokenCredential
9+
{
10+
private readonly InteractiveBrowserCredential _credential;
11+
private readonly string _authRecordPath;
12+
13+
private bool _isCached = false;
14+
15+
public CachedInteractiveBrowserCredential(
16+
InteractiveBrowserCredentialOptions options,
17+
string authRecordPath)
18+
{
19+
_authRecordPath = authRecordPath;
20+
21+
if (File.Exists(_authRecordPath))
22+
{
23+
try
24+
{
25+
// Fetch existing authentication record to not prompt the user for consent
26+
options.AuthenticationRecord = GetAuthenticationRecord();
27+
_isCached = true;
28+
}
29+
catch
30+
{
31+
// We failed to read the authentication record, we should delete the invalid file
32+
File.Delete(_authRecordPath);
33+
}
34+
}
35+
36+
_credential = new InteractiveBrowserCredential(options);
37+
}
38+
39+
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
40+
{
41+
CacheAuthenticationRecord(requestContext);
42+
43+
return _credential.GetToken(requestContext, cancellationToken);
44+
}
45+
46+
public override ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
47+
{
48+
CacheAuthenticationRecord(requestContext);
49+
50+
return _credential.GetTokenAsync(requestContext, cancellationToken);
51+
}
52+
53+
private AuthenticationRecord GetAuthenticationRecord()
54+
{
55+
using var authRecordReadStream = new FileStream(_authRecordPath, FileMode.Open, FileAccess.Read);
56+
return AuthenticationRecord.Deserialize(authRecordReadStream);
57+
}
58+
59+
private void CacheAuthenticationRecord(TokenRequestContext requestContext)
60+
{
61+
if (_isCached)
62+
{
63+
return;
64+
}
65+
66+
var authRecordDir = Path.GetDirectoryName(_authRecordPath) ??
67+
throw new ArgumentException($"Cannot resolve cache dir from auth record: {_authRecordPath}");
68+
69+
if (!Directory.Exists(authRecordDir))
70+
{
71+
Directory.CreateDirectory(authRecordDir);
72+
}
73+
74+
// Prompt the user for consent and save the resulting authentication record on disk
75+
var authRecord = _credential.Authenticate(requestContext);
76+
77+
using var authRecordStream = new FileStream(_authRecordPath, FileMode.Create, FileAccess.Write);
78+
authRecord.Serialize(authRecordStream);
79+
80+
_isCached = true;
81+
}
82+
}

src/Microsoft.DotNet.Darc/DarcLib/Models/Darc/DependencyDetail.cs

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

44
using System.Collections.Generic;
5+
using System.Diagnostics;
56

67
namespace Microsoft.DotNet.DarcLib.Models.Darc;
78

9+
[DebuggerDisplay("{Name} {Version}")]
810
public class DependencyDetail
911
{
1012
public DependencyDetail()

src/Microsoft.DotNet.Darc/DarcLib/Models/Darc/DependencyUpdate.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics;
5+
46
namespace Microsoft.DotNet.DarcLib.Models.Darc;
57

68
/// <summary>
79
/// Represents a dependency update, from an existing
810
/// dependency detail to a new dependency detail
911
/// </summary>
12+
[DebuggerDisplay("{From} -> {To}")]
1013
public class DependencyUpdate
1114
{
1215
/// <summary>

0 commit comments

Comments
 (0)