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