From 2da15d02646bc14fe8014e4634d6d4e0d9123e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Fri, 15 Dec 2023 12:50:09 +0100 Subject: [PATCH] refactor(core): Remove ID-less workflow reporting (no-changelog) (#8038) We added ID-less workflow reporting at #8031, which has already produced multiple reports coming from internal, enough info to tackle [this story](https://linear.app/n8n/issue/PAY-1147). To prevent an overwhelming number of reports from cloud, this PR removes the reporting for now. --- packages/cli/src/commands/worker.ts | 15 +-------------- packages/workflow/src/Workflow.ts | 8 -------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/packages/cli/src/commands/worker.ts b/packages/cli/src/commands/worker.ts index 07b4ce98fe..586a5079ea 100644 --- a/packages/cli/src/commands/worker.ts +++ b/packages/cli/src/commands/worker.ts @@ -13,13 +13,7 @@ import type { INodeTypes, IRun, } from 'n8n-workflow'; -import { - Workflow, - NodeOperationError, - sleep, - ApplicationError, - ErrorReporterProxy as EventReporter, -} from 'n8n-workflow'; +import { Workflow, NodeOperationError, sleep, ApplicationError } from 'n8n-workflow'; import * as Db from '@/Db'; import * as ResponseHelper from '@/ResponseHelper'; @@ -138,13 +132,6 @@ export class Worker extends BaseCommand { } const workflowId = fullExecutionData.workflowData.id!; // @tech_debt Ensure this is not optional - if (!workflowId) { - EventReporter.report('Detected ID-less workflow', { - level: 'info', - extra: { execution: fullExecutionData }, - }); - } - this.logger.info( `Start job: ${job.id} (Workflow ID: ${workflowId} | Execution: ${executionId})`, ); diff --git a/packages/workflow/src/Workflow.ts b/packages/workflow/src/Workflow.ts index f09256d8ca..7531eb7491 100644 --- a/packages/workflow/src/Workflow.ts +++ b/packages/workflow/src/Workflow.ts @@ -52,7 +52,6 @@ import { RoutingNode } from './RoutingNode'; import { Expression } from './Expression'; import { NODES_WITH_RENAMABLE_CONTENT } from './Constants'; import { ApplicationError } from './errors/application.error'; -import * as EventReporter from './ErrorReporterProxy'; function dedupe(arr: T[]): T[] { return [...new Set(arr)]; @@ -95,13 +94,6 @@ export class Workflow { settings?: IWorkflowSettings; pinData?: IPinData; }) { - if (!parameters.id) { - EventReporter.report('Detected ID-less workflow', { - level: 'info', - extra: { parameters }, - }); - } - this.id = parameters.id as string; // @tech_debt Ensure this is not optional this.name = parameters.name; this.nodeTypes = parameters.nodeTypes;