Skip to content

FUNCTIONS_WORKER_RUNTIME dotnet-isolated can't be changed #10909

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

Open
rpetersson opened this issue Mar 6, 2025 · 4 comments
Open

FUNCTIONS_WORKER_RUNTIME dotnet-isolated can't be changed #10909

rpetersson opened this issue Mar 6, 2025 · 4 comments
Assignees

Comments

@rpetersson
Copy link

rpetersson commented Mar 6, 2025

Investigative information

Please provide the following:

  • Timestamp: 2025-03-05 09:50:10 CET
  • Function App version: Microsoft.Web/sites@2024-04-01
  • Function App name: n-qa-bannerdata-func
  • Function name(s) (as appropriate):
  • Invocation ID:
  • Region: swedencentral

Repro steps

Provide the steps required to reproduce the problem:

  1. Deploy a function app with FUNCTION_WORKER_RUNTIME='dotnet-isolated'
  2. Change to 'dotnet'
  3. Unable to get rid of the warning that the function app requires 'dotnet'
  4. Redeploy the function app with a new name to circumvent the issue is the only possibility.

Expected behavior

To be able to change from dotnet-isolated to dotnet.

Actual behavior

Even after changing to dotnet we get the below error:

Image

Image

Known workarounds

Redeploy the function app with a different name. Redeploying with same name will cause the issue to persist.

Related information

Source

module functionApp 'br/public:avm/res/web/site:0.15.0' = {
name: 'functionApp-${uniqueString('functionApp', deployment().name)}'
scope: resourceGroup(resourceGroupConfiguration.name)
params: {
kind: 'functionapp,linux'
name: functionAppConfiguration.name
serverFarmResourceId: serverFarm.outputs.resourceId
appSettingsKeyValuePairs: {
AzureFunctionsJobHost__logging__logLevel__default: 'Trace'
FUNCTIONS_EXTENSION_VERSION: '~4'
FUNCTIONS_WORKER_RUNTIME: 'dotnet'
}
siteConfig: {
appSettings: union(
[
{
name: 'FUNCTIONS_INPROC_NET8_ENABLED'
value: '1'
}
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: applicationInsights.outputs.instrumentationKey
}
{
name: 'WEBSITE_RUN_FROM_PACKAGE'
value: '1'
}
{
name: 'WEBSITE_WEBDEPLOY_USE_SCM'
value: 'false'
}
{
name: 'AzureWebJobsStorage'
value: 'DefaultEndpointsProtocol=https;AccountName=${sa.outputs.name};EndpointSuffix=${environment().suffixes.storage};AccountKey=${existingStorageAccount.listKeys().keys[0].value}'
}
{
name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
value: 'DefaultEndpointsProtocol=https;AccountName=${sa.outputs.name};EndpointSuffix=${environment().suffixes.storage};AccountKey=${existingStorageAccount.listKeys().keys[0].value}'
}
{
name: 'WEBSITE_CONTENTSHARE'
value: toLower(functionAppConfiguration.name)
}
],
functionAppConfiguration.additionalAppsettings ?? []
)
netFrameworkVersion: '8.0'
ftpsState: 'FtpsOnly'
minTlsVersion: '1.2'
alwaysOn: true
ipSecurityRestrictions: ipSecurityRestrictions
}
httpsOnly: true
virtualNetworkSubnetId: subnet.outputs.subnet.resourceId
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
uami.outputs.resourceId
]
}
roleAssignments: [
{
principalId: uami.outputs.principalId
roleDefinitionIdOrName: 'de139f84-1756-47ae-9be6-808fbbe84772' // Website Contributor
}
{
principalId: uami.outputs.principalId
roleDefinitionIdOrName: '4633458b-17de-408a-b874-0445c86b69e6' // Key Vault Secrets User
}
]
storageAccountResourceId: sa.outputs.resourceId
storageAccountUseIdentityAuthentication: false
vnetRouteAllEnabled: true
appInsightResourceId: applicationInsights.outputs.resourceId
}
dependsOn: [rg]
}

@kshyju
Copy link
Member

kshyju commented Mar 7, 2025

The FUNCTIONS_WORKER_RUNTIME is a crucial setting for ensuring the reliability of an app. What is the use case where you deploy a .NET isolated app and then later change it to "dotnet"? These are two different models, so it is expected to warn you about potential unreliable behavior in this state (your deployed payload is .NET isolated, but your app settings indicate "dotnet"). Can you elaborate on the use case where you would want to do this?

@rpetersson
Copy link
Author

rpetersson commented Mar 8, 2025

The FUNCTIONS_WORKER_RUNTIME is a crucial setting for ensuring the reliability of an app. What is the use case where you deploy a .NET isolated app and then later change it to "dotnet"? These are two different models, so it is expected to warn you about potential unreliable behavior in this state (your deployed payload is .NET isolated, but your app settings indicate "dotnet"). Can you elaborate on the use case where you would want to do this?

The issue occurs when you choose dotnet isolated by mistake and then want to change to the correct runtime for your application. The function app will continue to throw this warning as if the runtime was not changed. Also unable to redeploy the function app as the setting seems to follow the name of the resource. In my case, the app uses "dotnet", but even if i changed from isolated to just dotnet the function app ignores this change.

@kshyju
Copy link
Member

kshyju commented Mar 24, 2025

The notification should disappear within 24 hours. Are you experiencing something different? At the moment, it doesn't disappear immediately after you resolve the issue.

@rpetersson
Copy link
Author

The notification should disappear within 24 hours. Are you experiencing something different? At the moment, it doesn't disappear immediately after you resolve the issue.

Right - Maybe that's just the issue then. It can get abit confusing so if theres a way to more clear notify the user that the notification might persist would increase the user friendlyness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants