Repository navigation
feat: add opt-in sequential HTTP checkpointing - #393
Draft
MundVetter wants to merge 3 commits into
Draft
MundVetter wants to merge 3 commits into
MundVetter wants to merge 3 commits into
Conversation
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.
Adds opt-in, per-step checkpointing for executor-initiated HTTP runs. After each sequential
step.run(), the SDK sends its result to the checkpoint API and waits for acknowledgement, then continues to the next step in the same handler invocation. Acknowledged results are available for replay after a retry or worker restart.We run the underlying implementation in production at Chainfill against a self-hosted Inngest instance. We are sharing this draft for feedback, and would also be happy for it to serve as inspiration or a starting point for a separate implementation that better fits your plans. We would love to see checkpointing supported upstream so we no longer need to maintain a fork.
The main missing checkpointing optimization is buffering/batching: this implementation does not accumulate several step results or flush them on a timer. It waits for each checkpoint acknowledgement before continuing, so there is still one checkpoint HTTP request per completed step.
Separate scope limits: checkpointing applies to sequential steps in executor-initiated HTTP runs, not Connect or SDK-initiated durable HTTP endpoints. Parallel discovery, sleeps, waits, and function invocations retain normal executor scheduling. Retry invocations conservatively use ordinary execution, and custom input middleware must support repeated calls with newly persisted memos.
Local validation on Python 3.12: 238 unit tests plus 40 subtests, 24 real-server tests against Inngest v1.45.1, and 200 generated property-test cases per sync/async mode passed, along with Ruff and mypy. Inngest Cloud compatibility and the full framework/Python-version matrix have not been verified locally.