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

No-error-message: Setting extension bundle in dotnet-isolated results in 0 Functions started #9396

Closed
paulyuk opened this issue Jul 17, 2023 · 1 comment · Fixed by #9466 or #9526
Closed
Assignees

Comments

@paulyuk
Copy link
Member

paulyuk commented Jul 17, 2023

If I use one of the common host.json files that asserts extension bundles, the deployed app will silently fail to load with 0 functions started.

I expected to get an error message saying extension bundle config in host.json is invalid, and read to learn how to set properly for dotnet-isolated.

Repros in cloud and using Core Tools 4.0.5198.

Repro steps

  1. func init -> dotnet-isolated
  2. func new -> HTTP
  3. Change host.json to this:
{
    "version": "2.0",
    "logging": { "fileLoggingMode": "debugOnly", "logLevel": { "default": "Information", "Host.Results": "Error", "Function": "Error", "Host.Aggregator": "Trace" } },
    "extensionBundle": {
        "id": "Microsoft.Azure.Functions.ExtensionBundle",
        "version": "[4.0.0, 5.0.0)"
    }
}
  1. func start, or deploy

Expected behavior

In Application insights logs I would see a specific message after 0 Functions start:

"ExtensionsBundle config in host.json is invalid for dotnet-isolated. See for details."

@mattchenderson
Copy link
Contributor

This is the line of code that needs to be updated:

isPrecompiledFunctionApp = isPrecompiledFunctionApp || functionMetadata.Language == DotNetScriptTypes.DotNetAssembly;

An additional OR statement is needed to catch isolated as well. The value being looked for right now is just "DotNetAssembly", but I believe functionMetadata.Language will be "dotnet-isolated" in this case.

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