Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex Consumption plan without FUNCTIONS_EXTENSION_VERSION breaks function app #10714

Open
erwinkramer opened this issue Jan 2, 2025 · 1 comment
Assignees
Labels
area: flex-consumption Items related to Flex Consumption support Needs: Triage (Functions)

Comments

@erwinkramer
Copy link

https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#flex-consumption-plan-deprecations tells us that FUNCTIONS_EXTENSION_VERSION is not needed anymore.

Removing FUNCTIONS_EXTENSION_VERSION breaks my function app with message We were not able to load some functions in the list due to errors. Refresh the page to try again. See details (no details). Just adding FUNCTIONS_EXTENSION_VERSION back again with value ~4 solves it.

If you look at the docs here: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites?pivots=deployment-language-bicep#functionsruntime - it specifies: Function app runtime version. Example: 8 (for dotnet-isolated) - but how is version 8 of dot net (which you should specify there) related to function runtime 4? There is no relation and thus FUNCTIONS_EXTENSION_VERSION is still needed (as i've proven by breaking it).

Investigative information

Please provide the following:

  • Timestamp: 1-1-2025
  • Region: north europe

Repro steps

Run with bicep:

resource functionApp 'Microsoft.Web/sites@2024-04-01' = {
  name: name
  location: location
  kind: 'functionapp,linux'
  tags: tags
  identity: {
     type: 'SystemAssigned'
  }
  properties: {
    httpsOnly: true
    publicNetworkAccess: 'Disabled'
    serverFarmId: appServicePlanId
    functionAppConfig: {
      deployment: {
        storage: {
          type: 'blobContainer'
          value: '${storage.properties.primaryEndpoints.blob}${deploymentStorageContainerName}'
          authentication: {
            type: 'SystemAssignedIdentity'
          }
        }
      }
      scaleAndConcurrency: {
        maximumInstanceCount: maximumInstanceCount
        instanceMemoryMB: instanceMemoryMB
      }
      runtime: { 
        name: functionAppRuntime
        version: dotNetVersion
      }
    }
    siteConfig: {
      publicNetworkAccess: 'Disabled'
      vnetName: vnetName
      functionAppScaleLimit: maximumInstanceCount
      cors: {
        allowedOrigins: [
          'https://portal.azure.com'
        ]
        supportCredentials: false
      }
    }
    virtualNetworkSubnetId: appServicePlanSubnetId
  }

and environment settings:

resource appSettings 'Microsoft.Web/sites/config@2024-04-01' = {
  name: 'appsettings'
  parent: functionApp
  properties: {
    AzureWebJobsStorage__accountName: storage.name
    FUNCTIONS_EXTENSION_VERSION: '~4' // is still needed for flex plan, unlike what the docs tell you
    WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED: '1'
    APPLICATIONINSIGHTS_CONNECTION_STRING: appInsightsConnectionString
  }
}

Expected behavior

Should work when leaving out FUNCTIONS_EXTENSION_VERSION as the docs say.

Actual behavior

Gives message We were not able to load some functions in the list due to errors. Refresh the page to try again. See details

Related information

I'm using this to deploy functions (because the original task for normal function apps doesn't seem to work either (with the flex option enabled):

 - task: FuncToolsInstaller@0
    inputs:
      version: 'latest'

  - task: AzurePowerShell@5
    displayName: Azure Function App Deploy
    inputs:
      azureSubscription: SC-abc
      azurePowerShellVersion: LatestVersion
      ScriptType: "InlineScript"
      Inline: |
        cd "$(Pipeline.Workspace)/drop/dotnet"
        func azure functionapp publish "func-hello-abc" --dotnet-isolated
@JAdluri
Copy link

JAdluri commented Jan 3, 2025

Hello @erwinkramer Thank you for reporting this issue. Will investigate furtherly and come back.

@satvu satvu added the area: flex-consumption Items related to Flex Consumption support label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: flex-consumption Items related to Flex Consumption support Needs: Triage (Functions)
Projects
None yet
Development

No branches or pull requests

3 participants