fix(editor): Don't send run data for full manual executions (#12687)

This commit is contained in:
Danny Martini
2025-01-22 15:18:25 +01:00
committed by GitHub
parent 3049cf85a6
commit 9139dc3c29
3 changed files with 81 additions and 43 deletions

View File

@@ -264,14 +264,23 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
// 0 is the old flow
// 1 is the new flow
const partialExecutionVersion = useLocalStorage('PartialExecution.version', -1);
// partial executions must have a destination node
const isPartialExecution = options.destinationNode !== undefined;
const startRunData: IStartRunData = {
workflowData,
// With the new partial execution version the backend decides what run
// data to use and what to ignore.
runData: partialExecutionVersion.value === 1 ? (runData ?? undefined) : newRunData,
runData: !isPartialExecution
? // if it's a full execution we don't want to send any run data
undefined
: partialExecutionVersion.value === 1
? // With the new partial execution version the backend decides
//what run data to use and what to ignore.
(runData ?? undefined)
: // for v0 we send the run data the FE constructed
newRunData,
startNodes,
triggerToStartFrom,
};
if ('destinationNode' in options) {
startRunData.destinationNode = options.destinationNode;
}