fix(editor): Implement dirty nodes for partial executions (#11739)

Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
Raúl Gómez Morales
2024-11-28 14:04:55 +01:00
committed by GitHub
parent 57d3269e40
commit b8da4ff9ed
14 changed files with 270 additions and 18 deletions

View File

@@ -4,6 +4,7 @@
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
import * as assert from 'assert/strict';
import { setMaxListeners } from 'events';
import { omit } from 'lodash';
import get from 'lodash/get';
import type {
ExecutionBaseError,
@@ -319,8 +320,9 @@ export class WorkflowExecute {
runPartialWorkflow2(
workflow: Workflow,
runData: IRunData,
pinData: IPinData = {},
dirtyNodeNames: string[] = [],
destinationNodeName?: string,
pinData?: IPinData,
): PCancelable<IRun> {
// TODO: Refactor the call-site to make `destinationNodeName` a required
// after removing the old partial execution flow.
@@ -349,7 +351,8 @@ export class WorkflowExecute {
const filteredNodes = subgraph.getNodes();
// 3. Find the Start Nodes
let startNodes = findStartNodes({ graph: subgraph, trigger, destination, runData });
runData = omit(runData, dirtyNodeNames);
let startNodes = findStartNodes({ graph: subgraph, trigger, destination, runData, pinData });
// 4. Detect Cycles
// 5. Handle Cycles