Skip to content

fix(try): remove the call to a child workflow - #550

Draft
mrsimonemms wants to merge 2 commits into
mainfrom
sje/remove-child-workflows
Draft

fix(try): remove the call to a child workflow#550
mrsimonemms wants to merge 2 commits into
mainfrom
sje/remove-child-workflows

Conversation

@mrsimonemms

@mrsimonemms mrsimonemms commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Description

This is now a closure function in the same workflow. More Temporal idiomatic and improves capacity and memory usage.

Related issue

Fixes #525

How to test

Checklist

  • This PR links to an issue using Fixes #..., Closes #... or Relates to #...
  • All tests pass
  • Tests have been added or updated where behaviour changed
  • Documentation has been updated where needed

This is now a closure function in the same workflow. More
Temporal idiomatic and improves capacity and memory usage.

Signed-off-by: Simon Emms <[email protected]>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codex PR Review

  • High: pkg/zigflow/tasks/task_builder_try.go#L57-L70 replaces child-workflow commands with inline execution without Temporal versioning. Replaying any in-flight workflow whose history contains the former child-workflow command will become non-deterministic after deployment. Preserve the old implementation behind workflow.GetVersion, including child workflow registration, or introduce a new workflow type/version.

  • Medium: pkg/zigflow/tasks/task_builder_try.go#L215-L220 executes the try body against the parent state directly. Successful tasks before a later failure can now mutate $data, $context, and $output visible to the catch and subsequent parent tasks. Child-workflow serialisation previously isolated those mutations. Clone the parent state before executing tryFn, and construct the catch state from the original parent state. Add a regression test with a mutating task followed by a failing task.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🚀 Preview deployed
🔗 https://zigflow.dev/preview/sje-remove-child-workflows

@ShlomitSibony

Copy link
Copy Markdown
Contributor

please let me know when the fix is ready and I can start testing it, thanks for addressing this!

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.

for and try blocks compile to child workflows — fan-in read/lock amplification on hot parents at scale

2 participants