{"record":{"id":"54b919327355d20e","repo":"dbt-labs/dbt-core","slug":"configure-54b919","errorCode":null,"errorMessage":"configure","messagePattern":"configure","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-auth/src/spark/mod.rs","lineNumber":425,"sourceCode":"\n        for (auth, option, extra_keys) in cases {\n            let config = Mapping::from_iter(\n                [\n                    (\"host\".into(), \"myhost\".into()),\n                    (\"method\".into(), \"thrift\".into()),\n                    (\"auth\".into(), auth.into()),\n                ]\n                .into_iter()\n                .chain(\n                    extra_keys\n                        .iter()\n                        .map(|(k, v)| ((*k).to_string().into(), (*v).to_string().into())),\n                ),\n            );\n\n            let builder = SparkAuth::new(Box::new(crate::NoopAuthWarningPrinter))\n                .configure(&AdapterConfig::new(config))\n                .expect(\"configure\");\n\n            assert_eq!(other_option_value(&builder, spark::AUTH_TYPE), Some(option));\n        }\n    }\n\n    #[test]\n    fn thrift_auth_err() {\n        let config = Mapping::from_iter([\n            (\"host\".into(), \"myhost\".into()),\n            (\"method\".into(), \"thrift\".into()),\n            (\"auth\".into(), \"invalid\".into()),\n        ]);\n        let err = SparkAuth::new(Box::new(crate::NoopAuthWarningPrinter))\n            .configure(&AdapterConfig::new(config))\n            .expect_err(\"configure should fail\");\n        assert_eq!(err.msg(), \"invalid 'auth' for Spark Thrift\");\n    }\n","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-auth/src/spark/mod.rs#L407-L443","documentation":"Test panic from `.configure(&AdapterConfig::new(config)).expect(\"configure\")` in the `thrift_auth_ok` test of `SparkAuth`. It panics when `SparkAuth::configure` returns an `Err` for one of the thrift auth method fixtures (e.g. LDAP, Kerberos variants), unwrapping the underlying `AuthError` message into the panic. This is a regression guard, not production behavior.","triggerScenarios":"Modifying Spark auth validation/extraction so a previously-valid thrift auth config fixture (method: thrift with an `auth` value) is now rejected by configure.","commonSituations":"Developers renaming spark auth option keys (AUTH_TYPE etc.), adding required fields, or tightening enum validation for thrift auth types run `cargo test -p dbt-auth` and hit this panic.","solutions":["Read the wrapped AuthError message from the panic to see which key/value configure rejected","Restore acceptance of the fixture in the spark thrift parser/validation","If the rejection is intentional, update the thrift_auth_ok fixture list to match the new contract"],"exampleFix":"// before\nErr(AuthError::config(\"unsupported auth type\"))\n// after: accept the fixture or update it\nconfig.insert(\"auth\".into(), \"LDAP\".into()); // matches supported auth enum","handlingStrategy":"try-catch","validationCode":"// fixture-level guard\nassert!(SUPPORTED_THRIFT_AUTHS.contains(&auth.as_str()), \"unsupported auth: {auth}\");","typeGuard":null,"tryCatchPattern":"let builder = spark_auth.configure(&AdapterConfig::new(config)).unwrap_or_else(|e| panic!(\"configure failed: {e}\"));","preventionTips":["Run `cargo test -p dbt-auth` spark tests after auth-key refactors","Keep AUTH_TYPE/session-kind constants and fixtures in one module","Update fixtures whenever thrift auth validation changes"],"tags":["rust","tests","spark","thrift","configure"],"backgroundTag":"internal-invariant-violation","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}