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 in orchestrator_service.proto and supported by all backends
- TS API:
continueAsNew(newInput: any, saveEvents: boolean) — no version parameter
- pb-helper:
newCompleteOrchestrationAction() doesn't accept or set newVersion
Proposed fix
Follow the pattern from the .NET SDK (microsoft/durabletask-dotnet#682):
- Add a
ContinueAsNewOptions interface with newInput, saveEvents, and newVersion properties
- Add a
continueAsNew(options: ContinueAsNewOptions) overload (or add optional newVersion parameter)
- In
pb-helper.util.ts, update newCompleteOrchestrationAction() to accept and set newVersion via .setNewversion()
- Wire through from
runtime-orchestration-context.ts setContinuedAsNew()
Related
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 anewVersionparameter and never calls.setNewversion()on theCompleteOrchestrationAction— the field is always left unset.This prevents version migration scenarios for long-running/eternal orchestrations.
What exists today
CompleteOrchestrationAction.newVersion(field 4) is defined inorchestrator_service.protoand supported by all backendscontinueAsNew(newInput: any, saveEvents: boolean)— no version parameternewCompleteOrchestrationAction()doesn't accept or setnewVersionProposed fix
Follow the pattern from the .NET SDK (microsoft/durabletask-dotnet#682):
ContinueAsNewOptionsinterface withnewInput,saveEvents, andnewVersionpropertiescontinueAsNew(options: ContinueAsNewOptions)overload (or add optionalnewVersionparameter)pb-helper.util.ts, updatenewCompleteOrchestrationAction()to accept and setnewVersionvia.setNewversion()runtime-orchestration-context.tssetContinuedAsNew()Related
CompleteOrchestrationAction.newVersion(field 4) inorchestrator_service.proto