[runtime][python] Add Python durable reconciler support#614
Open
joeyutong wants to merge 5 commits intoapache:mainfrom
Open
[runtime][python] Add Python durable reconciler support#614joeyutong wants to merge 5 commits intoapache:mainfrom
joeyutong wants to merge 5 commits intoapache:mainfrom
Conversation
This was referenced Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue: #612
Purpose of change
This PR adds Python-side durable reconcile support based on a reconciler callable.
It builds on the Java durable reconciler runtime introduced in #600 and adds the Python API and runtime wiring needed to use the same recovery model from Python actions.
This PR includes:
reconcilerkeyword-only argument on PythonRunnerContext.durable_execute(...)anddurable_execute_async(...)FlinkRunnerContextfor replaying previously completed durable results and recovering successful outcomes through a reconciler callablereconcilerargument and degrades to the existing non-durable behaviorAgentPlanin Python runner modules, so lightweight runner tests do not eagerly pull in the heavier plan/action/PyFlink dependency chainRunnerContextImplso the Python runtime can read the current durable call result fields during recoveryThe detailed design discussion is available here:
Tests
This change is covered by:
test_durable_execution.py: verifies durable execution helpers and reconciler callable validationtest_flink_runner_context_reconcilable.py: verifies recovered success, terminal replay, and exception propagation in the Flink runner contexttest_local_runner_reconcilable.py: verifies that local runner accepts the newreconcilerargument and degrades to the existing non-durable behaviorAPI
Yes.
This PR introduces Python public API changes:
RunnerContext.durable_execute(...)adds an optional keyword-onlyreconciler: Callable[[], Any] | None = NoneRunnerContext.durable_execute_async(...)adds the same optionalreconcilerkeyword-only argumentDocumentation
doc-neededdoc-not-neededdoc-included