{"record":{"id":"780b8800b693c14c","repo":"vectordotdev/vector","slug":"event-will-be-set","errorCode":null,"errorMessage":"event will be set","messagePattern":"event will be set","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/transforms/remap.rs","lineNumber":649,"sourceCode":"                            emit!(RemapMappingAbort {\n                                event_dropped: self.drop_on_abort,\n                            });\n                        }\n                        (\"abort\", error, self.drop_on_abort)\n                    }\n                    Terminate::Error(error) => {\n                        if !self.reroute_dropped {\n                            emit!(RemapMappingError {\n                                error: error.to_string(),\n                                event_dropped: self.drop_on_error,\n                            });\n                        }\n                        (\"error\", error, self.drop_on_error)\n                    }\n                };\n\n                if !drop {\n                    let event = original_event.expect(\"event will be set\");\n\n                    push_default(event, output);\n                } else if self.reroute_dropped {\n                    let mut event = original_event.expect(\"event will be set\");\n\n                    self.annotate_dropped(&mut event, reason, error);\n                    push_dropped(event, output);\n                }\n            }\n        }\n    }\n}\n\n#[inline]\nfn push_default(event: Event, output: &mut TransformOutputsBuf) {\n    output.push(None, event)\n}\n","sourceCodeStart":631,"sourceCodeEnd":667,"githubUrl":"https://github.com/vectordotdev/vector/blob/99894c8d8885659cc16efc39bd71f9fb3b59e296/src/transforms/remap.rs#L631-L667","documentation":"remap clones the incoming event only when `(program fallible && forward_on_error) || (program abortable && forward_on_abort)` (src/transforms/remap.rs:598). On failure it does `original_event.expect(\"event will be set\")` at the `!drop` branch. The panic means the VRL runner returned `Terminate::Error` for a program compiled as infallible (or `Terminate::Abort` for a non-abortable program) while the event must be forwarded — a contract violation between the VRL runner and the compiled program metadata, not a configuration error.","triggerScenarios":"A VRL program whose compile-time fallibility analysis said \"cannot fail\" but which raises a runtime error (runner bug, e.g. after VRL compiler changes), while `drop_on_error` is false (the default) so the original event is needed for forwarding.","commonSituations":"Specific Vector/VRL versions where fallibility analysis disagrees with runtime behavior — programs with coerced/assumed-infallible operations that still error at runtime; reports typically include a program that 'cannot fail' yet errors.","solutions":["Upgrade Vector to a release fixing the VRL fallibility/runner mismatch; search the GitHub tracker for \"event will be set\" reports","Workaround: set `drop_on_error = true` (and `drop_on_abort = true`) without `reroute_dropped`, so neither expect branch runs","Reproduce with `vector vrl` using the program plus a sample event and file an issue with both","If embedding: replace the expect with a fallback that pushes the mutated target event and logs the invariant break"],"exampleFix":"# before\n[transforms.process]\ntype = \"remap\"\nsource = \"parsed\"\ndrop_on_error = false  # default; expect branch reachable on runner invariant break\n# after\n[transforms.process]\ntype = \"remap\"\nsource = \"parsed\"\ndrop_on_error = true\ndrop_on_abort = true","handlingStrategy":"fallback","validationCode":"# check your Vector version against the issue tracker before relying on\n# infallible-compiled programs that touch fallible operations\nvector --version","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin a Vector release known-good for your VRL programs; test upgrades with production programs via `vector vrl`","Set drop_on_error = true and drop_on_abort = true (without reroute_dropped) on critical pipelines as a workaround if this panic appears","Write VRL that handles errors explicitly (or is honestly fallible) rather than relying on compile-time infallibility"],"tags":["remap","vrl","fallibility","invariant","panic"],"backgroundTag":"invariant-violation-panic","analyzedSha":"99894c8d8885659cc16efc39bd71f9fb3b59e296","analyzedAt":"2026-08-20T07:02:18.786Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}