Skip to content

Commit 90d4ccf

Browse files
Update Microsoft.Extensions.Azure to 1.12.0 (#11115)
* Initial plan for issue * Update Microsoft.Extensions.Azure to 1.12.0 for cross-tenant triggers support Co-authored-by: mattchenderson <[email protected]> * Update Azure.Core and Azure.Identity to support Microsoft.Extensions.Azure 1.12.0 Co-authored-by: mattchenderson <[email protected]> * Update deps.json files for Microsoft.Extensions.Azure 1.12.0 and dependencies Co-authored-by: mattchenderson <[email protected]> * updating deps file * preventing package downgrade * Fixing more transitive deps, reflection-based test over private members * Updating Azure SDK dependencies and transitives --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mattchenderson <[email protected]> Co-authored-by: Matthew Henderson <[email protected]>
1 parent 51e16f0 commit 90d4ccf

File tree

6 files changed

+237
-205
lines changed

6 files changed

+237
-205
lines changed

src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<ItemGroup>
5353
<PackageReference Include="Azure.Data.Tables" Version="12.8.3" />
54-
<PackageReference Include="Azure.Identity" Version="1.11.4" />
54+
<PackageReference Include="Azure.Identity" Version="1.14.2" />
5555
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
5656
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
5757
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />

src/WebJobs.Script/WebJobs.Script.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
<ItemGroup>
2828
<!-- Dependencies needed for Storage Providers -->
29-
<PackageReference Include="Azure.Core" Version="1.45.0" />
29+
<PackageReference Include="Azure.Core" Version="1.47.1" />
3030
<PackageReference Include="Azure.Data.Tables" Version="12.8.3" />
31-
<PackageReference Include="Azure.Identity" Version="1.11.4" />
31+
<PackageReference Include="Azure.Identity" Version="1.14.2" />
3232
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.2.0-beta.2" />
3333
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
3434
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
@@ -39,7 +39,7 @@
3939
<PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.2.0" NoWarn="NU1701" />
4040
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
4141
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.1" />
42-
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.1" />
42+
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.12.0" />
4343
<PackageReference Include="Microsoft.Azure.AppService.Proxy.Client" Version="2.3.20240307.67" />
4444
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="5.2.0-12287" />
4545
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="3.2.0" />

test/Resources/TestProjects/DotNetIsolated60/DotNetIsolated60.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
1919
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="6.6.0" />
2020
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.15.1" /> <!-- Do not update. Verifies worker behavior. -->
21-
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.5" />
21+
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.12.0" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

test/Resources/TestProjects/DotNetIsolatedUnsupportedWorker/DotNetIsolatedUnsupportedWorker.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
1717
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="6.6.0" />
1818
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.14.0" /> <!-- Do not update. Verifies worker behavior. -->
19-
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.5" />
19+
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.12.0" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

test/WebJobs.Script.Tests/Diagnostics/OpenTelemetry/OpenTelemetryConfigurationExtensionsTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@ public void ConfigureTelemetry_Should_UseOpenTelemetryWhenModeSetAndAppInsightsA
263263
var resolvedClient = ExtractTraceManagedIdentityCredential(tracerProviderDescriptors);
264264

265265
// Extract the clientId from the client object
266-
var clientIdValue = resolvedClient?.GetType().GetProperty("ClientId", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(resolvedClient)?.ToString();
266+
var managedIdentityId = resolvedClient?.GetType().GetProperty("ManagedIdentityId", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(resolvedClient);
267+
string resolvedIdType = managedIdentityId?.GetType().InvokeMember("_idType", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.GetField, null, managedIdentityId, []).ToString();
268+
string resolvedUserAssignedIdValue = managedIdentityId?.GetType().InvokeMember("_userAssignedId", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.GetField, null, managedIdentityId, []).ToString();
267269

268270
// Assert
269271
serviceCollection.Should().NotBeNullOrEmpty();
270-
clientIdValue.Should().Be(clientId.ToString());
271272
resolvedClient.GetType().Name.Should().Be("ManagedIdentityClient");
273+
resolvedIdType.Should().Be("ClientId");
274+
resolvedUserAssignedIdValue.Should().Be(clientId.ToString());
272275
}
273276

274277
[Fact]

0 commit comments

Comments
 (0)