microsoft / microsoft/durabletask-java

Workaround for issue with hosting Durable Functions app on preview Flex Consumption plan

Offen
#197 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

known-regression
Vorherrschende Sprache
Java
Sterne
29
Forks
18
Ø Merge
1 T. 10 Std.
Gemergte PRs (30 T.)
2

Beschreibung

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

  1. Remove the reference to Extension Bundles in host.json.
  2. 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.

  1. If you're using other Azure Functions extensions, you'll also need to manually install them.
  2. Run your app locally to make sure it's working as expected.
  3. 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der extension-bundle-Konfiguration in host.json und der extensions.csproj, die von func extensions install generiert wird. Reproduziere die Durable Functions-App im Flex Consumption-Plan und untersuche anschließend das Verhalten beim Laden der Erweiterung im Zusammenhang mit dem gemeldeten NetheriteProviderFactory-Konstruktorfehler. Als erledigt gilt die Aufgabe, wenn die App ohne den Fehler bereitgestellt wird und dabei der empfohlene Ansatz mit Extension Bundles beibehalten wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, java
Bereich
backend, cloud
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.