{"record":{"id":"e40f119b16745c07","repo":"dbt-labs/dbt-core","slug":"a-desired-component-with-no-current-state-must-pro","errorCode":null,"errorMessage":"a desired component with no current state must produce a change","messagePattern":"a desired component with no current state must produce a change","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/config_v2.rs","lineNumber":326,"sourceCode":"        mut changes: IndexMap<&'static str, ComponentConfigChange>,\n    ) -> IndexMap<&'static str, ComponentConfigChange> {\n        let Some(changeset_key) = self.complete_changeset_key_fn else {\n            return changes;\n        };\n        if changes.is_empty() {\n            return changes;\n        }\n\n        let mut complete = IndexMap::new();\n        for (type_name, desired_component) in &self.components {\n            let Some(key) = changeset_key(type_name) else {\n                continue;\n            };\n            let change = changes.shift_remove(type_name).unwrap_or_else(|| {\n                ComponentConfigChange::Some(\n                    desired_component\n                        .diff_from(None)\n                        .expect(\"a desired component with no current state must produce a change\"),\n                )\n            });\n            complete.insert(key, change);\n        }\n        complete.extend(changes);\n        complete\n    }\n\n    fn sparse_diff(\n        &self,\n        current_state: &RelationConfig,\n    ) -> IndexMap<&'static str, ComponentConfigChange> {\n        let changed = self.components.iter().filter_map(|(type_name, desired)| {\n            desired\n                .diff_from(current_state.get(type_name))\n                .map(|diff| (*type_name, ComponentConfigChange::Some(diff)))\n        });\n        let dropped = current_state","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/config_v2.rs#L308-L344","documentation":"Test-only invariant expect in complete_changeset: when completing a changeset, a desired component that exists with no prior change entry must produce a newly created change; unwrap on that path failed. Fires only if the change-production logic in config_v2 relation diffing regresses.","triggerScenarios":"Thrown at crates/dbt-adapter/src/relation/config_v2.rs:326 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Debug why the desired-component branch returned None instead of a created change","Re-run the config_v2 diff tests to isolate which component type fails","Treat as a regression in complete_changeset, not a user-facing error"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}