-
Notifications
You must be signed in to change notification settings - Fork 11
Description
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) exists in the proto definition, but the TypeScript SDK never populates it.
Problem
OrchestrationContext.continueAsNew() only accepts (newInput: any, saveEvents: boolean). There is no parameter to pass a new version.
In src/utils/pb-helper.util.ts, newCompleteOrchestrationAction() does not accept a newVersion parameter and never calls .setNewversion() on the CompleteOrchestrationAction — the field is always left unset.
This prevents version migration scenarios for long-running/eternal orchestrations.
What exists today
- Proto layer:
CompleteOrchestrationAction.newVersion(field 4) is defined inorchestrator_service.protoand supported by all backends - TS API:
continueAsNew(newInput: any, saveEvents: boolean)— no version parameter - pb-helper:
newCompleteOrchestrationAction()doesn't accept or setnewVersion
Proposed fix
Follow the pattern from the .NET SDK (microsoft/durabletask-dotnet#682):
- Add a
ContinueAsNewOptionsinterface withnewInput,saveEvents, andnewVersionproperties - Add a
continueAsNew(options: ContinueAsNewOptions)overload (or add optionalnewVersionparameter) - In
pb-helper.util.ts, updatenewCompleteOrchestrationAction()to accept and setnewVersionvia.setNewversion() - Wire through from
runtime-orchestration-context.tssetContinuedAsNew()
Related
- .NET SDK implementation: Add ContinueAsNewOptions with NewVersion support durabletask-dotnet#682
- Proto field:
CompleteOrchestrationAction.newVersion(field 4) inorchestrator_service.proto