microsoft / microsoft/durabletask-java
Workaround for issue with hosting Durable Functions app on preview Flex Consumption plan
還沒有人認領這個 Issue。
- 主要語言
- Java
- 星號
- 29
- 分支
- 18
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 2
描述
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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 host.json 中的 extension-bundle 設定以及由 func extensions install 產生的 extensions.csproj 開始。在 Flex Consumption 方案上重現 Durable Functions 應用程式,然後檢查與回報的 NetheriteProviderFactory 建構函式錯誤相關的擴充功能載入行為。在保留建議的 Extension Bundles 方法的同時,應用程式能夠成功部署且不再出現該錯誤,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- azure, java
- 領域
- backend, cloud
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100