{"record":{"id":"434d293e74dc9513","repo":"vectordotdev/vector","slug":"should-not-fail-to-get-empty-tls-settings","errorCode":null,"errorMessage":"should not fail to get empty TLS settings","messagePattern":"should not fail to get empty TLS settings","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/validation/runner/io.rs","lineNumber":165,"sourceCode":") where\n    S: Service<Request<Body>, Response = Response<BoxBody>, Error = Infallible>\n        + NamedService\n        + Clone\n        + Send\n        + 'static,\n    S::Future: Send + 'static,\n{\n    let started = task_coordinator.track_started();\n    let completed = task_coordinator.track_completed();\n    let mut shutdown_handle = task_coordinator.register_for_shutdown();\n\n    tokio::spawn(async move {\n        started.mark_as_done();\n\n        let (trigger_shutdown, shutdown_signal, _) = ShutdownSignal::new_wired();\n        let mut trigger_shutdown = Some(trigger_shutdown);\n        let tls_settings = MaybeTlsSettings::from_config(None, true)\n            .expect(\"should not fail to get empty TLS settings\");\n\n        let server = run_grpc_server(\n            listen_addr.as_socket_addr(),\n            tls_settings,\n            None,\n            service,\n            GrpcKeepaliveConfig::default(),\n            shutdown_signal,\n        );\n        pin!(server);\n\n        loop {\n            select! {\n                // Propagate our shutdown signal to the shutdown signal that `run_grpc_server` needs.\n                _ = shutdown_handle.wait(), if trigger_shutdown.is_some() => {\n                    trigger_shutdown.take().unwrap().cancel();\n                },\n                // TODO: Should we check the return value here to see if its an `Err`?","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/components/validation/runner/io.rs#L147-L183","documentation":"spawn_grpc_server constructs MaybeTlsSettings::from_config(None, true) — i.e. TLS disabled — purely to satisfy the API, and expects it to succeed because there are no TLS options to validate. A panic here indicates the \"empty\" TLS config path itself failed, which can only happen if the TLS machinery rejects a default/empty configuration (a code-level bug or feature-gating issue).","triggerScenarios":"spawn_output_server or into_collector starts the validation gRPC server and MaybeTlsSettings::from_config(None, true) returns Err despite None being passed.","commonSituations":"Regression in the tls crate's handling of empty configs; building without required TLS features so the default path errors; platform-specific TLS initialization failure.","solutions":["Check for recent changes to MaybeTlsSettings::from_config affecting the None case and fix the regression.","Rebuild with the TLS features enabled that the validation framework expects.","Surface the underlying error in the panic message to identify which default setting failed."],"exampleFix":"// before\nMaybeTlsSettings::from_config(None, true).expect(\"should not fail to get empty TLS settings\")\n// after\nMaybeTlsSettings::from_config(None, true).unwrap_or_else(|e| panic!(\"empty TLS settings rejected: {e}\"))","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let tls = MaybeTlsSettings::from_config(None, true)\n    .unwrap_or_else(|e| panic!(\"empty TLS settings rejected: {e}\"));","preventionTips":["Keep TLS feature flags enabled when building the validation framework.","Watch for upstream changes to MaybeTlsSettings::from_config's None handling.","Include the underlying error text in any panic to speed diagnosis."],"tags":["tls","grpc","panic","internal"],"backgroundTag":"internal-invariant-violation","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"}