refactor(core): Debug malformed execution at 1.61.0

This commit is contained in:
Iván Ovejero 2024-10-23 13:12:50 +02:00
parent 9e18a31208
commit 36055032ba
No known key found for this signature in database
2 changed files with 11 additions and 1 deletions

View file

@ -4,7 +4,9 @@ import { Config, Env } from '../decorators';
export class SentryConfig { export class SentryConfig {
/** Sentry DSN for the backend. */ /** Sentry DSN for the backend. */
@Env('N8N_SENTRY_DSN') @Env('N8N_SENTRY_DSN')
backendDsn: string = ''; backendDsn: string =
// https://n8nio.sentry.io/issues/?project=4504016528408576
'https://a257ce801ae971a3883d69c2e7c5e431@o1420875.ingest.us.sentry.io/4504016528408576';
/** Sentry DSN for the frontend . */ /** Sentry DSN for the frontend . */
@Env('N8N_FRONTEND_SENTRY_DSN') @Env('N8N_FRONTEND_SENTRY_DSN')

View file

@ -15,6 +15,7 @@ import type {
IWorkflowExecutionDataProcess, IWorkflowExecutionDataProcess,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { import {
ApplicationError,
ErrorReporterProxy as ErrorReporter, ErrorReporterProxy as ErrorReporter,
ExecutionCancelledError, ExecutionCancelledError,
Workflow, Workflow,
@ -391,6 +392,13 @@ export class WorkflowRunner {
let job: Job; let job: Job;
let hooks: WorkflowHooks; let hooks: WorkflowHooks;
try { try {
// check to help diagnose PAY-2100
if (data.executionData?.executionData?.nodeExecutionStack?.length === 0) {
throw new ApplicationError('Execution to enqueue has empty node execution stack', {
extra: { executionData: data.executionData },
});
}
job = await this.scalingService.addJob(jobData, jobOptions); job = await this.scalingService.addJob(jobData, jobOptions);
hooks = WorkflowExecuteAdditionalData.getWorkflowHooksWorkerMain( hooks = WorkflowExecuteAdditionalData.getWorkflowHooksWorkerMain(