Skip to content

Support restarting without state in leader mode - #1111

Merged
mwylde merged 1 commit into
masterfrom
skip_epoch_leader
Jul 27, 2026
Merged

Support restarting without state in leader mode#1111
mwylde merged 1 commit into
masterfrom
skip_epoch_leader

Conversation

@mwylde

@mwylde mwylde commented Jul 24, 2026

Copy link
Copy Markdown
Member

This PR adds support for restart without state to leader mode. The existing implementation for controller mode relies on querying the most recent epoch for the job from the checkpoints table, and then setting that as the "ignore_before_epoch" field in the config. This approach is awkward for leader mode though, as we don't have a checkpoints table, and determining the latest epoch involves going to object storage.

There are several principled approaches we could take here—for example, introducing a "state version" field, which could be bumped to start a new state lineage for the pipeline, which would require a number of changes throughout the controller, worker, and state system. However, long-term this will be solved by a more sophisticated system of pipelines and jobs, where we create a new job for a new state lineage.

While that redesign remains in the future, this PR implements the same idea in a somewhat hacky way: when restarting a leader-mode pipeline without state, we simply replace the existing job with a new one. As checkpoints are stored by job_id, this addresses the need here without any worker or state specific code. There is some risk of introducing multiple running jobs as there is no explicit synchronization with the controller, however we mitigate by restricting these operations to pipelines in Failed or Stopped.

This PR also adds a "start without state" option and button the UI, so this is not just limited to failed pipelines.


Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread webui/src/routes/pipelines/PipelineDetails.tsx
@mwylde
mwylde force-pushed the skip_epoch_leader branch 3 times, most recently from 3f4169c to 9e3a755 Compare July 24, 2026 22:43
@mwylde
mwylde merged commit fab1668 into master Jul 27, 2026
14 checks passed
mwylde added a commit that referenced this pull request Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants