Uh oh!
There was an error while loading. Please reload this page.
[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs - #4037
Conversation
40b7c4d to
f410d06Comparef410d06 to
36c3dc0CompareThere was a problem hiding this comment.
Pull request overview
This PR implements a breaking change to decouple checkpointing from the workflow execution APIs. Instead of passing a CheckpointManager as a parameter to RunAsync and StreamAsync methods, checkpointing is now configured as an intrinsic property of the IWorkflowExecutionEnvironment using the new WithCheckpointing() method on InProcessExecutionEnvironment.
Changes:
- Removes
CheckpointManagerparameters from allRunAsync,StreamAsync, andResumeAsyncmethods inIWorkflowExecutionEnvironment - Introduces
WithCheckpointing()method onInProcessExecutionEnvironmentto configure checkpointing - Replaces
Checkpointed<T>wrapper class withCheckpointableRunBasebase class that bothRunandStreamingRunnow inherit from - Updates
WorkflowHostAgentandWorkflowSessionto manage checkpointing configuration internally - Adds
IsCheckpointingEnabledproperty to the execution environment interface
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
IWorkflowExecutionEnvironment.cs | Removes checkpointing-related method overloads and adds IsCheckpointingEnabled property |
InProcessExecutionEnvironment.cs | Adds WithCheckpointing() method and internal checkpoint manager configuration |
InProcessExecution.cs | Updates static helper methods to use WithCheckpointing() pattern |
Checkpointed.cs | Converts from generic wrapper to base class CheckpointableRunBase |
Run.cs / StreamingRun.cs | Changes to inherit from CheckpointableRunBase instead of being wrapped by Checkpointed<T> |
WorkflowSession.cs | Updates to configure checkpointing on the execution environment rather than passing it to run methods |
WorkflowHostAgent.cs | Removes checkpointing parameter from constructor and validation logic |
InProcessRunner.cs | Adds checkpoint index restoration and IsCheckpointingEnabled property |
CheckpointManager.cs / ICheckpointManager.cs | Adds RetrieveIndexAsync method for retrieving checkpoint collections |
| Test files | Updates all test code to use new checkpointing pattern |
| Sample files | Updates all sample code to use new checkpointing pattern |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
36c3dc0 to
2592bbbCompare2592bbb to
6152cd8Compare6152cd8 to
666f3c1CompareUh oh!
There was an error while loading. Please reload this page.
666f3c1 to
0023a26Compare
Motivation and Context
To support execution environments that do not support bring-your-own Checkpointing, we need to remove the ability to introduce
CheckpointManagerduring aRunAsync/StreamAsynccall.Description
Change Checkpointing to be a configuration of
IWorkflowExecutionEnvironmentintrinsically. This changes how checkpointing is configured forInProcessExecutionEnvironment(now usingWithCheckpointing)BREAKING: Changes how Checkpointing is attached for InMemory execution.
Currently in draft form pending #3792
Contribution Checklist