microsoft / microsoft/durabletask-java
Workaround for issue with hosting Durable Functions app on preview Flex Consumption plan
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 29
- Forks
- 18
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
Problem today
If you deploy a Java Durable Functions app to the Flex Consumption plan (currently in preview), you'll see the following error message on Portal when the app starts:
Microsoft.Extensions.DependencyInjection: Unable to activate type 'DurableTask.Netherite.AzureFunctions.NetheriteProviderFactory'. The following constructors are ambiguous: Void .ctor(Microsoft.Extensions.Options.IOptions1[Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskOptions], Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Azure.WebJobs.Host.Executors.IHostIdProvider, Microsoft.Azure.WebJobs.INameResolver, System.IServiceProvider, DurableTask.Netherite.ConnectionResolver, Microsoft.Azure.WebJobs.Extensions.DurableTask.IPlatformInformation) Void .ctor(Microsoft.Extensions.Options.IOptions1[Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskOptions], Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Azure.WebJobs.Extensions.DurableTask.IConnectionStringResolver, Microsoft.Azure.WebJobs.Host.Executors.IHostIdProvider, Microsoft.Azure.WebJobs.INameResolver, Microsoft.Azure.WebJobs.Extensions.DurableTask.IPlatformInformation).
Workaround
- Remove the reference to Extension Bundles in
host.json. - Instead of using bundles, manually install the latest stable version of Durable Functions extension to your function app:
func extensions install -p Microsoft.Azure.WebJobs.Extensions.DurableTask -v 2.13.4
This should add an extensions.csproj file to your app directory.
- If you're using other Azure Functions extensions, you'll also need to manually install them.
- Run your app locally to make sure it's working as expected.
- Redeploy app to Azure and you should no longer see the error message.
Notes
Use this workaround only if you need to deploy your app to the Flex Consumption plan.
We're fixing this issue now so customers can continue to use the Extension Bundles, which is the recommended approach, instead of manually installing extension(s). The reason is bundles will ensure that you're automatically on the latest version of extensions, which often contain critical bug and security fixes. Moreover, all extensions in bundles are tested to ensure that they're compatible with each other, saving you from having to deal with .NET errors when extensions you use are incompatible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the host.json extension-bundle configuration and the extensions.csproj generated by func extensions install. Reproduce the Durable Functions app on the Flex Consumption plan, then inspect the extension-loading behavior around the reported NetheriteProviderFactory constructor error. Done means the app deploys without the error while retaining the recommended Extension Bundles approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, java
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100