Skip to content

Fix state growing exponentially on empty cron tasks#1371

Merged
josephjclark merged 1 commit intorelease/nextfrom
fix-empty-multi-leaf-state
Apr 14, 2026
Merged

Fix state growing exponentially on empty cron tasks#1371
josephjclark merged 1 commit intorelease/nextfrom
fix-empty-multi-leaf-state

Conversation

@josephjclark
Copy link
Copy Markdown
Collaborator

@josephjclark josephjclark commented Apr 14, 2026

A simple fix: ignore empty state objects on final state

This prevents empty workflows with mutliple leaves on a cron from getting into an infinite growth state.

Cron jobs with multiple leaves will need to do manual state reconcilation anyway, and users can fix this on their own terms.

This is about ensuring that empty workflows, particularly those generated by AI, are stable.

closes half of #1367

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

@github-project-automation github-project-automation bot moved this to New Issues in Core Apr 14, 2026
@josephjclark josephjclark marked this pull request as ready for review April 14, 2026 16:23
@josephjclark josephjclark changed the base branch from main to release/next April 14, 2026 16:24
@josephjclark josephjclark merged commit 69a7e0e into release/next Apr 14, 2026
8 checks passed
@github-project-automation github-project-automation bot moved this from New Issues to Done in Core Apr 14, 2026
josephjclark added a commit that referenced this pull request Apr 14, 2026
* engine: Set max-old-space-size on child process

#1368

---------

Co-authored-by: Joe Clark <jclark@openfn.org>

* fix(project): include trigger reply fields in version hash (#1362)

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>

* fix state growth (#1371)

* versions

---------

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Co-authored-by: Taylor Downs <taylor@openfn.org>
Co-authored-by: Asish Kumar <87874775+officialasishkumar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Empty cron workflows recurse forever

2 participants