chore(core): Add check to help diagnose PAY-2100 (#11282)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run

This commit is contained in:
Iván Ovejero 2024-10-17 12:56:37 +02:00 committed by GitHub
parent 0dd15cbe8d
commit d2266c93a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,
@ -381,6 +382,17 @@ 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 &&
config.getEnv('deployment.type') === 'internal'
) {
await this.executionRepository.setRunning(executionId); // set `startedAt` so we display it correctly in UI
throw new ApplicationError('Execution to enqueue has empty node execution stack', {
extra: { executionData: data.executionData },
});
}
job = await this.scalingService.addJob(jobData, { priority: realtime ? 50 : 100 }); job = await this.scalingService.addJob(jobData, { priority: realtime ? 50 : 100 });
hooks = WorkflowExecuteAdditionalData.getWorkflowHooksWorkerMain( hooks = WorkflowExecuteAdditionalData.getWorkflowHooksWorkerMain(