@onlineapps/conn-orch-orchestrator 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/WorkflowOrchestrator.js +3 -27
package/package.json
CHANGED
|
@@ -253,33 +253,9 @@ class WorkflowOrchestrator {
|
|
|
253
253
|
// Ignore - use default 0
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
//
|
|
257
|
-
//
|
|
258
|
-
|
|
259
|
-
try {
|
|
260
|
-
await publishToMonitoringWorkflow(this.mqClient, {
|
|
261
|
-
event_type: 'progress',
|
|
262
|
-
workflow_id: workflow_id,
|
|
263
|
-
service_name: serviceName,
|
|
264
|
-
step_index: failedStepIndex,
|
|
265
|
-
step_id: current_step,
|
|
266
|
-
cookbook: cookbookDef,
|
|
267
|
-
context: context,
|
|
268
|
-
output: null,
|
|
269
|
-
error: {
|
|
270
|
-
message: error.message,
|
|
271
|
-
attempt: attemptNumber
|
|
272
|
-
},
|
|
273
|
-
status: 'failed',
|
|
274
|
-
timestamp: new Date().toISOString()
|
|
275
|
-
}, this.logger, { workflow_id, step_id: current_step });
|
|
276
|
-
} catch (monitoringError) {
|
|
277
|
-
// Don't fail workflow if monitoring publish fails
|
|
278
|
-
this.logger.warn('Failed to publish failed step progress to monitoring', {
|
|
279
|
-
workflow_id,
|
|
280
|
-
error: monitoringError.message
|
|
281
|
-
});
|
|
282
|
-
}
|
|
256
|
+
// NOTE: We do NOT publish workflow_progress on every retry attempt.
|
|
257
|
+
// Instead, we publish ONE progress event at the end (either success or final failure with DLQ entry).
|
|
258
|
+
// This keeps the trace clean - one entry per step, with complete _dlq_history in context.
|
|
283
259
|
|
|
284
260
|
// Add attempt to DLQ history
|
|
285
261
|
const attemptRecord = {
|