microsoft / microsoft/durabletask-java
Workaround for issue with hosting Durable Functions app on preview Flex Consumption plan
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 29
- Fork
- 18
- Merge medio
- 1g 10h
- PR unite (30g)
- 2
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con la configurazione extension-bundle di host.json e con extensions.csproj generato da func extensions install. Riproduci l'app Durable Functions nel piano Flex Consumption, quindi esamina il comportamento di caricamento delle estensioni relativo all'errore segnalato del costruttore NetheriteProviderFactory. Il lavoro è completato quando l'app viene distribuita senza l'errore mantenendo l'approccio consigliato di Extension Bundles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, java
- Ambito
- backend, cloud
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100