-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): Remove run data of utility nodes for partial executions v2 #12673
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||||||||||||||||||||||||||
import type { INode, IRunData } from 'n8n-workflow'; | ||||||||||||||||||||||||||||||
import { NodeConnectionType, type INode, type IRunData } from 'n8n-workflow'; | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
import type { DirectedGraph } from './directed-graph'; | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
@@ -16,10 +16,22 @@ export function cleanRunData( | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
for (const startNode of startNodes) { | ||||||||||||||||||||||||||||||
delete newRunData[startNode.name]; | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
const children = graph.getChildren(startNode); | ||||||||||||||||||||||||||||||
for (const node of [startNode, ...children]) { | ||||||||||||||||||||||||||||||
delete newRunData[node.name]; | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
// Delete runData for subNodes | ||||||||||||||||||||||||||||||
const subNodeConnections = graph.getParentConnections(node); | ||||||||||||||||||||||||||||||
for (const subNodeConnection of subNodeConnections) { | ||||||||||||||||||||||||||||||
// Sub nodes never use the Main connection type, so this filters our | ||||||||||||||||||||||||||||||
// the connection that goes upstream of the startNode. | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
if (subNodeConnection.type === NodeConnectionType.Main) { | ||||||||||||||||||||||||||||||
continue; | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Subnodes can use any connection type other than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK n8n/packages/workflow/src/Interfaces.ts Lines 1856 to 1869 in b66a9dc
@OlegIvaniv is that correct? |
||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
for (const child of children) { | ||||||||||||||||||||||||||||||
delete newRunData[child.name]; | ||||||||||||||||||||||||||||||
delete newRunData[subNodeConnection.from.name]; | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth it to test for multi-root case?