mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix: Sync partial execution version of FE and BE, also allow enforcing a specific version (#12840)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ import { isEmpty } from '@/utils/typesUtils';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { get } from 'lodash-es';
|
||||
import { useExecutionsStore } from '@/stores/executions.store';
|
||||
import { useLocalStorage } from '@vueuse/core';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
|
||||
const getDirtyNodeNames = (
|
||||
runData: IRunData,
|
||||
@@ -260,18 +260,18 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// -1 means the backend chooses the default
|
||||
// 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 settingsStore = useSettingsStore();
|
||||
const version = settingsStore.partialExecutionVersion;
|
||||
const startRunData: IStartRunData = {
|
||||
workflowData,
|
||||
// With the new partial execution version the backend decides what run
|
||||
// data to use and what to ignore.
|
||||
runData: !isPartialExecution
|
||||
? // if it's a full execution we don't want to send any run data
|
||||
undefined
|
||||
: partialExecutionVersion.value === 1
|
||||
: version === 2
|
||||
? // With the new partial execution version the backend decides
|
||||
//what run data to use and what to ignore.
|
||||
(runData ?? undefined)
|
||||
|
||||
Reference in New Issue
Block a user