Skip to content

Commit

Permalink
chore(core): Add check to help diagnose PAY-2100 (#11282)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored Oct 17, 2024
1 parent 0dd15cb commit d2266c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/cli/src/workflow-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
IWorkflowExecutionDataProcess,
} from 'n8n-workflow';
import {
ApplicationError,
ErrorReporterProxy as ErrorReporter,
ExecutionCancelledError,
Workflow,
Expand Down Expand Up @@ -381,6 +382,17 @@ export class WorkflowRunner {
let job: Job;
let hooks: WorkflowHooks;
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 });

hooks = WorkflowExecuteAdditionalData.getWorkflowHooksWorkerMain(
Expand Down

0 comments on commit d2266c9

Please sign in to comment.