diff --git a/sdk/identity/identity/integration/AzureKubernetes/package.json b/sdk/identity/identity/integration/AzureKubernetes/package.json index e817d3c7abb7..1991ac1cb528 100644 --- a/sdk/identity/identity/integration/AzureKubernetes/package.json +++ b/sdk/identity/identity/integration/AzureKubernetes/package.json @@ -11,7 +11,7 @@ "author": "", "license": "ISC", "dependencies": { - "@azure/identity": "dev", + "@azure/identity": "beta", "@azure/storage-blob": "^12.17.0", "express": "^5.2.1", "dotenv": "^16.0.0" diff --git a/sdk/identity/identity/integration/AzureWebApps/package.json b/sdk/identity/identity/integration/AzureWebApps/package.json index 511905204fd6..2225b0cb13c9 100644 --- a/sdk/identity/identity/integration/AzureWebApps/package.json +++ b/sdk/identity/identity/integration/AzureWebApps/package.json @@ -13,7 +13,7 @@ "type": "module", "license": "ISC", "dependencies": { - "@azure/identity": "dev", + "@azure/identity": "beta", "@azure/storage-blob": "^12.17.0", "express": "^5.2.1", "tslib": "^1.10.0" diff --git a/sdk/identity/identity/test/integration/azureFunctionsTest.spec.ts b/sdk/identity/identity/test/integration/azureFunctionsTest.spec.ts index 7d0ce8f5cebe..18018e6ca511 100644 --- a/sdk/identity/identity/test/integration/azureFunctionsTest.spec.ts +++ b/sdk/identity/identity/test/integration/azureFunctionsTest.spec.ts @@ -7,8 +7,7 @@ import { describe, it, assert } from "vitest"; import { requireEnvVar } from "../authTestUtils.js"; describe("AzureFunctions Integration test", function () { - // TODO: Reenable the test https://github.com/Azure/azure-sdk-for-js/issues/35416 - it.skip("test the Azure Functions endpoint where the sync MI credential is used.", async function () { + it("test the Azure Functions endpoint where the sync MI credential is used.", async function () { const baseUri = baseUrl(); const client = new ServiceClient({ baseUri: baseUri }); const pipelineRequest = createPipelineRequest({ diff --git a/sdk/identity/test-resources-managed-identity.bicep b/sdk/identity/test-resources-managed-identity.bicep index 05f5f90a2a21..579ffdf5328e 100644 --- a/sdk/identity/test-resources-managed-identity.bicep +++ b/sdk/identity/test-resources-managed-identity.bicep @@ -6,6 +6,9 @@ param baseName string = resourceGroup().name @description('The location of the resource. By default, this is the same as the resource group.') param location string = resourceGroup().location +@description('The AKS cluster location. Defaults to eastus2 to avoid capacity constraints in the resource group region.') +param aksLocation string = 'eastus2' + @description('The client OID to grant access to test resources.') param testApplicationOid string @@ -220,6 +223,7 @@ resource azureFunction 'Microsoft.Web/sites@2022-09-01' = { alwaysOn: true http20Enabled: true minTlsVersion: '1.2' + linuxFxVersion: 'Node|22' appSettings: [ { name: 'IDENTITY_STORAGE_NAME_1' @@ -253,10 +257,6 @@ resource azureFunction 'Microsoft.Web/sites@2022-09-01' = { name: 'FUNCTIONS_WORKER_RUNTIME' value: 'node' } - { - name: 'DOCKER_CUSTOM_IMAGE_NAME' - value: 'mcr.microsoft.com/azure-functions/node:4-node24-appservice' - } ] } } @@ -293,7 +293,7 @@ resource acrResource 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' resource kubernetesCluster 'Microsoft.ContainerService/managedClusters@2023-06-01' = { name: baseName - location: location + location: aksLocation identity: { type: 'SystemAssigned' } @@ -305,7 +305,7 @@ resource kubernetesCluster 'Microsoft.ContainerService/managedClusters@2023-06-0 { name: 'agentpool' count: 1 - vmSize: 'Standard_D2s_v3' + vmSize: 'Standard_D2s_v5' osDiskSizeGB: 128 osDiskType: 'Managed' kubeletDiskType: 'OS' diff --git a/sdk/identity/test-resources-post.ps1 b/sdk/identity/test-resources-post.ps1 index 5b35158c4ac3..75185df19cb8 100644 --- a/sdk/identity/test-resources-post.ps1 +++ b/sdk/identity/test-resources-post.ps1 @@ -61,17 +61,18 @@ if ($CI) { } # Azure Functions app deployment -# TODO: Skip Azure Functions deployment for timeout error -# Write-Host "Building the code for functions app" -# Push-Location "$webappRoot/AzureFunctions/RunTest" -# npm install -# npm run build -# Pop-Location -# Write-Host "starting azure functions deployment" -# Compress-Archive -Path "$workingFolder/AzureFunctions/RunTest/*" -DestinationPath "$workingFolder/AzureFunctions/app.zip" -Force -# az functionapp deployment source config-zip -g $identityResourceGroup -n $DeploymentOutputs['IDENTITY_FUNCTION_NAME'] --src "$workingFolder/AzureFunctions/app.zip" -# Remove-Item -Force "$workingFolder/AzureFunctions/app.zip" -# Write-Host "Deployed function app" +Write-Host "##[group]Deploying Azure Functions App" +Write-Host "Building the code for functions app" +Push-Location "$webappRoot/AzureFunctions/RunTest" +npm install +npm run build +Pop-Location +Write-Host "starting azure functions deployment" +Compress-Archive -Path "$workingFolder/AzureFunctions/RunTest/*" -DestinationPath "$workingFolder/AzureFunctions/app.zip" -Force +az functionapp deployment source config-zip -g $identityResourceGroup -n $DeploymentOutputs['IDENTITY_FUNCTION_NAME'] --src "$workingFolder/AzureFunctions/app.zip" +Remove-Item -Force "$workingFolder/AzureFunctions/app.zip" +Write-Host "Deployed function app" +Write-Host "##[endgroup]" Write-Host "##[group]Deploying Identity Web App" Push-Location "$webappRoot/AzureWebApps"