{"record":{"id":"6773e811de77055e","repo":"vectordotdev/vector","slug":"output-driver-task-should-not-have-panicked","errorCode":null,"errorMessage":"output driver task should not have panicked","messagePattern":"output driver task should not have panicked","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/validation/runner/mod.rs","lineNumber":368,"sourceCode":"            //\n            // We'll trigger each phase to shutdown, in order, to deterministically ensure each\n            // section has completed. We additionally wait for the input driver task to complete\n            // first, and the output driver task to complete last, as those tasks are freerunning\n            // and don't require special shutdown coordination.\n            input_driver\n                .await\n                .expect(\"input driver task should not have panicked\");\n\n            // Synchronize the shutdown of all tasks, and get the resulting output events.\n            // We drive the shutdown by ensuring that the output events have been\n            // processed by the external resource, which ensures that the input events have travelled\n            // all the way through the pipeline, and that the telemetry events have been processed\n            // before shutting down the telemetry and topology tasks.\n            input_task_coordinator.shutdown().await;\n\n            let output_events = output_driver\n                .await\n                .expect(\"output driver task should not have panicked\");\n\n            // Now that all output events have been received, we can shutdown the controlled edge/sink\n            output_task_coordinator.shutdown().await;\n\n            // as well as the telemetry and topology\n            telemetry_task_coordinator.shutdown().await;\n            topology_task_coordinator.shutdown().await;\n\n            info!(\"Collected runner metrics: {runner_metrics:?}\");\n            let final_runner_metrics = runner_metrics.lock().await;\n\n            // Run the relevant data -- inputs, outputs, telemetry, etc -- through each validator to\n            // get the validation results for this test.\n            let TestCase {\n                name: test_name,\n                expectation,\n                events: input_events,\n                ..","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/components/validation/runner/mod.rs#L350-L386","documentation":"run_validation joins the output driver task and expects it to finish without panicking; its result is the collected output events. A panic here means the task collecting/validating events from the external resource crashed, so the validation run cannot produce results.","triggerScenarios":"The output driver panics while draining events — typically a decode/parse failure on received events, an assertion in the comparison logic, or the external resource connection erroring in a way the driver asserts cannot happen.","commonSituations":"A sink emitting events in an unexpected shape that the driver's decoder asserts on; network interruptions to the output resource; regressions in the output collection code.","solutions":["Read the upstream panic message from the JoinError to locate the failing driver code.","Fix the sink/output configuration so emitted events match the expected schema.","Make the driver return Result instead of panicking on recoverable collection errors."],"exampleFix":"// before\nlet output_events = output_driver.await.expect(\"output driver task should not have panicked\");\n// after\nlet output_events = output_driver.await.unwrap_or_else(|e| panic!(\"output driver panicked: {e}\"));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match output_driver.await {\n    Ok(events) => events,\n    Err(join_err) => panic!(\"output driver panicked: {join_err}\"),\n}","preventionTips":["Ensure the sink under test emits events matching the expected schema before validating.","Avoid assertions on network behavior in the output collector; return Results instead.","Inspect the JoinError message first — the root cause is in the child task's panic."],"tags":["tokio","task-panic","validation","join"],"backgroundTag":"thread-interrupted","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}