Skip to content

Commit

Permalink
Merge branch '464-fix-runtime-err' into release/next
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjclark committed Nov 12, 2023
2 parents 85c93f6 + c448a23 commit 0e9abd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-poets-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openfn/runtime': patch
---

Fix an issue where expression result state is not serialized before being broadcast, causing blowups
6 changes: 4 additions & 2 deletions packages/runtime/src/execute/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ export default (

duration = Date.now() - duration;

const finalState = prepareFinalState(opts, result);

notify(NOTIFY_JOB_COMPLETE, {
duration,
state: result,
state: finalState,
jobId: id,
});

// return the final state
resolve(prepareFinalState(opts, result));
resolve(finalState);
} catch (e: any) {
duration = Date.now() - duration;
let finalError;
Expand Down

0 comments on commit 0e9abd1

Please sign in to comment.