{"record":{"id":"870e88f1d223d03e","repo":"vectordotdev/vector","slug":"shutdown-force-trigger-for-source-id-not-found-in-the","errorCode":null,"errorMessage":"shutdown_force_trigger for source \"{id}\" not found in the ShutdownCoordinator","messagePattern":"shutdown_force_trigger for source \"(.+?)\" not found in the ShutdownCoordinator","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/vector-common/src/shutdown.rs","lineNumber":280,"sourceCode":"    ) -> impl Future<Output = bool> + use<> {\n        let (_, begin_shutdown_trigger) = self.begun_triggers.remove(id).unwrap_or_else(|| {\n            panic!(\n                \"shutdown_begun_trigger for source \\\"{id}\\\" not found in the ShutdownCoordinator\"\n            )\n        });\n        // This is what actually triggers the source to begin shutting down.\n        begin_shutdown_trigger.cancel();\n\n        let shutdown_complete_tripwire = self\n            .complete_tripwires\n            .remove(id)\n            .unwrap_or_else(|| {\n                panic!(\n                \"shutdown_complete_tripwire for source \\\"{id}\\\" not found in the ShutdownCoordinator\"\n            )\n            });\n        let shutdown_force_trigger = self.force_triggers.remove(id).unwrap_or_else(|| {\n            panic!(\n                \"shutdown_force_trigger for source \\\"{id}\\\" not found in the ShutdownCoordinator\"\n            )\n        });\n        SourceShutdownCoordinator::shutdown_source_complete(\n            shutdown_complete_tripwire,\n            shutdown_force_trigger,\n            id.clone(),\n            Some(deadline),\n        )\n    }\n\n    /// Returned future will finish once all *current* sources have finished.\n    #[must_use]\n    pub fn shutdown_tripwire(&self) -> future::BoxFuture<'static, ()> {\n        let futures = self\n            .complete_tripwires\n            .values()\n            .cloned()","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/lib/vector-common/src/shutdown.rs#L262-L298","documentation":"Panic from `.expect(\"all required builder parameters specified\")` in `delete_messages` (src/sources/aws_sqs/source.rs:207), on the aws-sdk-sqs `DeleteMessageBatchRequestEntry` builder. The builder's `build()` errs only when required setters (`id`, `receipt_handle`) are missing; here `id` is the loop index stringified and the receipt comes from the caller, so a failure means a None/empty receipt slipped through or an SDK change added required fields.","triggerScenarios":"Calling `delete_messages` with a receipts vector containing values, then building entries — fires if `receipt_handle` is empty/None coerced, or if an aws-sdk-sqs upgrade makes additional fields required on `DeleteMessageBatchRequestEntry`.","commonSituations":"aws-sdk-sqs version mismatch after a dependency bump; callers passing empty-string receipts collected from partially-processed messages; refactor renaming fields so a setter chain silently drops `.receipt_handle()`.","solutions":["Filter out empty receipts before calling `delete_messages` (`receipts.retain(|r| !r.is_empty())`).","Confirm `.id(id.to_string())` and `.receipt_handle(receipt)` are both chained before `.build()`.","Pin the aws-sdk-sqs version expected by vector and review its builder's required fields after upgrades.","Replace the expect with error handling that emits `SqsMessageDeleteError` and skips the entry."],"exampleFix":"// before\nbatch = batch.entries(\n    DeleteMessageBatchRequestEntry::builder()\n        .id(id.to_string())\n        .receipt_handle(receipt)\n        .build()\n        .expect(\"all required builder parameters specified\"),\n);\n// after\nlet receipts: Vec<_> = receipts.into_iter().filter(|r| !r.is_empty()).collect();\n// and on build failure:\n.unwrap_or_else(|e| panic!(\"SQS delete entry invalid: {e}\"))","handlingStrategy":"validation","validationCode":"receipts.retain(|r| !r.is_empty());\n// then build with .ok() and skip failures","typeGuard":"fn non_empty(r: &str) -> Option<&str> { (!r.is_empty()).then_some(r) }","tryCatchPattern":"match DeleteMessageBatchRequestEntry::builder().id(id.to_string()).receipt_handle(receipt).build() {\n    Ok(entry) => batch = batch.entries(entry),\n    Err(e) => emit!(SqsMessageDeleteError { error: &e.into() }),\n}","preventionTips":["Sanitize receipts (drop empty strings) before batching deletes.","Review aws-sdk-sqs builder requirements on dependency upgrades.","Unit test delete_messages with mixed valid/empty receipts."],"tags":["aws","sqs","rust","panic","builder-pattern"],"backgroundTag":"missing-required-argument","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"}