Conversation
|
@taylordowns2000 I'm going to put out a worker patch today but I'm going to exclude this as we're waiting on the Lightning PR. I'll get this reviewed properly with a clear head tomorrow. |
|
that's perfect @josephjclark , thank you! if you do get the chance, a review before Thursday morning (730am Paris time) would be great as it would allow @stuartc and I to review your review when we talk about OpenFn/lightning#4531 |
2502ac0 to
5b0a869
Compare
josephjclark
left a comment
There was a problem hiding this comment.
Looks good. Works against lightning main without any complaints or errors, so it's safe to merge and deploy.
I read this as an optimisation @taylordowns2000, nothing more. Does that seem fair, or am I missing something?
|
That's correct @josephjclark , but there's a bit of fancy footwork... basically it has to determine (based on its knowledge of the graph) whether or not the (And the lightning change will now track the final state of a run, either simply setting an FK on run or by creating a new dataclip and then setting the FK on run.) Have added Stu here and we can click merge together tomorrow AM assuming we're happy with the Lightning side. |
yeah this is fine. I think there's an argument that we need to do some Deep Thinking on output state and how we handle this multiple leaf stuff. We're building on a best-guess from 3 (?) years ago, and maybe there are better ways to handle this. But I'm happy to keep building for now and the solution looks good to me. You can merge when you like but remember:
If you like you can just give me a greenlight when you're ready and I'll handle the release for you |
Short Description
When a workflow ends with a single leaf step whose dataclip is already persisted, send
final_dataclip_idinstead offinal_stateinrun:completeto avoid re-uploading state Lightning already has.Closes #1309 and best served after OpenFn/lightning#4531 is merged.
Implementation Details
lastDataclipIdwithleafDataclipIds[]onRunState, populated in step-complete only for steps with no downstream edges.final_dataclip_id; otherwise fall back to sendingfinal_stateas before.QA Notes
Branching workflows (multiple leaves) should still send final_state.
AI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy
Release branch checklist
Delete this section if this is not a release PR.
If this IS a release branch:
pnpm changeset versionfrom root to bump versionspnpm installpnpm changeset tagto generate tagsgit push --tagsTags may need updating if commits come in after the tags are first generated.