From 39e875478488f3c81147944bd6b52dc1f9def958 Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Wed, 31 Jan 2024 11:21:15 +0100 Subject: [PATCH] fix(core): Don't report executions that have been paused as failed to rudderstack and log streams (#8501) --- packages/cli/src/InternalHooks.ts | 5 +++++ packages/cli/src/WorkflowExecuteAdditionalData.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/InternalHooks.ts b/packages/cli/src/InternalHooks.ts index 33f0d16e23dcb..1db38561b2122 100644 --- a/packages/cli/src/InternalHooks.ts +++ b/packages/cli/src/InternalHooks.ts @@ -301,6 +301,11 @@ export class InternalHooks { return; } + if (runData?.status === 'waiting') { + // No need to send telemetry or logs when the workflow hasn't finished yet. + return; + } + const promises = []; const telemetryProperties: IExecutionTrackProperties = { diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index 9eef7ab40af04..f9bbb83c8b593 100644 --- a/packages/cli/src/WorkflowExecuteAdditionalData.ts +++ b/packages/cli/src/WorkflowExecuteAdditionalData.ts @@ -583,7 +583,7 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks { const workflowStatusFinal = determineFinalExecutionStatus(fullRunData); - if (workflowStatusFinal !== 'success') { + if (workflowStatusFinal !== 'success' && workflowStatusFinal !== 'waiting') { executeErrorWorkflow( this.workflowData, fullRunData,