Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

Silent error when extensionBundle is misconfigured in host.json #10221

Open Strandfelt opened 5 months ago

Strandfelt commented 5 months ago

We upgraded a .NET 6 in-process Azure Function to a .NET 8 isolated function running on Windows. Following this, our function was unable to run when depolyed to Azure, but was able to run locally. All settings in Azure were updated correctly, e.g. netFrameworkVersion set to v8.0 and FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated.

When starting the function, we would only see that it did not index any functions. There were no error messages or anything to help us diagnose the issue. The diag and troubleshooting steps in the portal gave no error descriptions either.

Eventually, we figured that this was caused by the extensionBundle property in our host.json file, which had the following value:

"extensionBundle": {
  "id": "Microsoft.Azure.Functions.ExtensionBundle",
  "version": "[3.3.0, 4.0.0)"
}

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

Related information

Provide any related information

soninaren commented 4 months ago

@Strandfelt what was the change that was made to the bundle configuration to fix the issue.

Strandfelt commented 1 month ago

I am sorry for the late response @soninaren. We changed it to the following for a .NET 8 Isolated function app:

{
    "version": "2.0",
    "extensionBundle": {
        "id": "Microsoft.Azure.Functions.ExtensionBundle",
        "version": "[4.0.0, 5.0.0)"
    }
}

This is also documented here . However, the issue is that when the above is misconfigured as described in my first post, the host silently fails.