mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Don't store insights for sub workflow executions (#14384)
This commit is contained in:
@@ -153,9 +153,11 @@ describe('workflowExecuteAfterHandler', () => {
|
||||
expect(allInsights).toHaveLength(0);
|
||||
});
|
||||
|
||||
test.each<{ mode: WorkflowExecuteMode }>([{ mode: 'internal' }, { mode: 'manual' }])(
|
||||
'does not store events for executions with the mode `$mode`',
|
||||
async ({ mode }) => {
|
||||
test.each<{ mode: WorkflowExecuteMode }>([
|
||||
{ mode: 'internal' },
|
||||
{ mode: 'manual' },
|
||||
{ mode: 'integrated' },
|
||||
])('does not store events for executions with the mode `$mode`', async ({ mode }) => {
|
||||
// ARRANGE
|
||||
const ctx = mock<ExecutionLifecycleHooks>({ workflowData: workflow });
|
||||
const startedAt = DateTime.utc();
|
||||
@@ -175,8 +177,7 @@ describe('workflowExecuteAfterHandler', () => {
|
||||
const allInsights = await insightsRawRepository.find();
|
||||
expect(metadata).toBeNull();
|
||||
expect(allInsights).toHaveLength(0);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
test.each<{ mode: WorkflowExecuteMode }>([
|
||||
{ mode: 'evaluation' },
|
||||
@@ -185,7 +186,6 @@ describe('workflowExecuteAfterHandler', () => {
|
||||
{ mode: 'retry' },
|
||||
{ mode: 'trigger' },
|
||||
{ mode: 'webhook' },
|
||||
{ mode: 'integrated' },
|
||||
])('stores events for executions with the mode `$mode`', async ({ mode }) => {
|
||||
// ARRANGE
|
||||
const ctx = mock<ExecutionLifecycleHooks>({ workflowData: workflow });
|
||||
|
||||
@@ -37,13 +37,17 @@ const shouldSkipStatus: Record<ExecutionStatus, boolean> = {
|
||||
const shouldSkipMode: Record<WorkflowExecuteMode, boolean> = {
|
||||
cli: false,
|
||||
error: false,
|
||||
integrated: false,
|
||||
retry: false,
|
||||
trigger: false,
|
||||
webhook: false,
|
||||
evaluation: false,
|
||||
|
||||
// sub workflows
|
||||
integrated: true,
|
||||
|
||||
// error workflows
|
||||
internal: true,
|
||||
|
||||
manual: true,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user