ContinueAsNew does not support specifying a new orchestration version
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- java
调研方向
首先定位 TaskOrchestrationContext 和 TaskOrchestrationExecutor,然后检查现有的 continueAsNew 重载以及 CompleteOrchestrationAction 的构造。使用描述中链接的 .NET SDK issue 作为拟议 options 形状的参考。当 Java 调用方可以提供新版本,并且 executor 在保留当前行为的同时填充 CompleteOrchestrationAction.newVersion 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary
The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field 4) has existed since the initial proto commit, but the Java SDK never populates it.
Problem
TaskOrchestrationContext.continueAsNew() only accepts (Object input, boolean preserveUnprocessedEvents). There is no parameter to pass a new version. In TaskOrchestrationExecutor, when building the CompleteOrchestrationAction, setNewVersion() is never called — the field is always left empty.
This prevents version migration scenarios for long-running/eternal orchestrations (e.g., monitoring loops that need to evolve their logic over time via continueAsNew with a new version).
What exists today
- Proto layer:
CompleteOrchestrationAction.newVersion(field 4) is defined and supported by all backends (DurableTask.Core since 2014, DTS/Beskar, gRPC sidecar) - Java API:
continueAsNew(Object input)andcontinueAsNew(Object input, boolean preserveUnprocessedEvents)— no version parameter - Java executor:
CompleteOrchestrationAction.Buildernever callssetNewVersion()
Proposed fix
Follow the pattern from the .NET SDK (microsoft/durabletask-dotnet#682):
- Add a
ContinueAsNewOptionsclass withnewInput,preserveUnprocessedEvents, andnewVersionproperties - Add a
continueAsNew(ContinueAsNewOptions options)overload toTaskOrchestrationContext - In
TaskOrchestrationExecutor, whennewVersionis non-null, callbuilder.setNewVersion(StringValue.of(newVersion))on theCompleteOrchestrationAction
Related
- .NET SDK implementation: microsoft/durabletask-dotnet#682
- Azure Functions extension: Azure/azure-functions-durable-extension#3404
- Proto field:
CompleteOrchestrationAction.newVersion(field 4) inorchestrator_service.proto
- 主要语言
- Java
- 星标
- 29
- 派生
- 18
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/durabletask-java 的其他 Issue
-
Needs: Triage :mag:
难度 4/5 3-5 天 新手友好度 48/100
microsoft/durabletask-java#303 ·
-
Needs: Triage :mag:
难度 4/5 3-5 天 新手友好度 45/100
microsoft/durabletask-java#290 · 2 条评论 ·
-
Needs: Triage :mag:
难度 5/5 一周以上 新手友好度 35/100
microsoft/durabletask-java#285 ·
-
Enhancement
microsoft/durabletask-java#274 · 1 个 reaction · 已指派 2 人 ·
-
Needs: Triage :mag:
难度 4/5 3-5 天 新手友好度 42/100
microsoft/durabletask-java#270 ·
查看 microsoft/durabletask-java 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
-
bug needs triage p2
难度 2/5 1-3 小时 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 76/100