Azure / Azure/azure-functions-host

Silent error when extensionBundle is misconfigured in host.json

Open
#10,221 2 comments 0 reactions 0 assignees View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

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:

- Timestamp: 2024-06-10
- Function App version: ~4
- Region: West Europe

#### Repro steps

Provide the steps required to reproduce the problem:

#### Related information

Provide any related information

* C# .NET 8

Source
Host.json:
```json
{
"version": "2.0",
"logging": {
"logLevel": {
"default": "Information"
},
"applicationInsights": {
"samplingSettings": {
"isEnabled": true
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the host.json extensionBundle configuration shown in the issue and the Azure Functions host startup and function-indexing path. Reproduce the deployment-only failure using the stated bundle version range and compare local versus Azure behavior. Done means a misconfigured extensionBundle produces a useful error instead of silently indexing no functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.