Skip to content

Fix redispatch bug#2018

Open
cjao wants to merge 2 commits into
AgnostiqHQ:developfrom
cjao:casey/fix-redispatch
Open

Fix redispatch bug#2018
cjao wants to merge 2 commits into
AgnostiqHQ:developfrom
cjao:casey/fix-redispatch

Conversation

@cjao

@cjao cjao commented May 21, 2026

Copy link
Copy Markdown
Contributor

When users redispatch a previously run workflow, the server performs server-side copies of some data from the previous run to the new run to save clients from having to re-upload task definitions that haven't changed from the previous workflow.

In the interest of efficiency, deep copies were changed some time ago to shallow copies (DB references only). Unfortunately, this also introduced a bug as demonstrated by the included test case: unless all functions in the workflow are pure, shallow copies are only safe for immutable artifacts.

Unless the user specifies reuse_previous_results=True, only shallow-copy task definitions to prevent the next run from overwriting artifacts generated by the previous workflow run.

  • I have added the tests to cover my changes.
  • I have updated the documentation and CHANGELOG accordingly.
  • I have read the CONTRIBUTING document.

@cjao cjao requested a review from a team as a code owner May 21, 2026 10:48
cjao added 2 commits May 21, 2026 11:08
When the user elects to rerun tasks that haven't
changed from the original workflow, only
shallow-copy the task definitions and not the
generated artifacts to the redispatch b/c the next
run will overwrite artifacts from the previous
workflow run.

Added redispatch test
@cjao cjao force-pushed the casey/fix-redispatch branch from 8be7b82 to a5f0da6 Compare May 21, 2026 11:08
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.

1 participant