-
Notifications
You must be signed in to change notification settings - Fork 54
Description
TaskOrchestrationContext.ContinueAsNew does not support specifying a new version:
public abstract void ContinueAsNew(object? newInput = null, bool preserveUnprocessedEvents = true);The underlying DurableTask.Core.OrchestrationContext supports it via ContinueAsNew(string newVersion, object input), but the shim's TaskOrchestrationContextWrapper.ContinueAsNew always calls the version-less overload.
ContinueAsNew is the safest version migration point for eternal orchestrations — history is fully reset, so there's no replay conflict risk. Without version support, users can't leverage the framework's built-in version-based dispatch for eternal orchestrations and must resort to workarounds (version tracking in input state, or reflection to access the internal innerContext).
Version property and CompareVersionTo already exist on TaskOrchestrationContext, so versioning is already part of the abstraction's design intent.
Note: I suppose that the gRPC/out-of-process path would also need a ContinueAsNewEvent proto update to include a version field. The shim layer (backed by DurableTask.Core.OrchestrationContext) can be updated independently.