dbt-labs/dbt-core · error
configure
Error message
configure
What it means
A test-only panic: `run_config_test` calls `auth.configure(&AdapterConfig::new(config)).expect("configure")`, which panics if `SnowflakeAuth::configure` returns an `Err`. The `expect` message is simply "configure", so the panic surfaces the underlying `AuthError` display text. It is raised by the test harness for simple-pass and timeout/log-level override scenarios, not by library code in production paths.
Source
Thrown at crates/dbt-auth/src/snowflake/mod.rs:806
])
}
fn assert_parse_auth_config_error(config: Mapping, expected_msg: &str) {
let cfg = AdapterConfig::new(config);
let result = parse_auth(&cfg, &NoopAuthWarningPrinter);
match result {
Err(AuthError::Config(msg)) => assert_eq!(msg, expected_msg),
other => panic!("Expected AuthError::Config({expected_msg:?}), got {other:?}"),
}
}
fn run_config_test(config: Mapping, expected: &[(&str, &str)]) {
let auth = SnowflakeAuth {
warning_printer: Box::new(NoopAuthWarningPrinter),
};
let auth_result = auth
.configure(&AdapterConfig::new(config))
.expect("configure");
let mut results = Mapping::default();
for (k, v) in auth_result.into_iter() {
let key = match k {
OptionDatabase::Username => "user".to_owned(),
OptionDatabase::Password => "password".to_owned(),
OptionDatabase::Other(name) => name.to_owned(),
_ => continue,
};
if key == snowflake::CLIENT_TIMEOUT || key == snowflake::LOGIN_TIMEOUT {
continue;
}
results.insert(key.into(), option_str_value(&v).into());
}
for &(key, expected_val) in expected {
assert_eq!(View on GitHub (pinned to 0267ce9170)
Solutions
- Run the failing configure against the test Mapping and read the wrapped AuthError message for the rejected key
- Fix the configure/validation regression so the fixture config is accepted again
- If the new rejection is intentional, update the test fixtures in `run_config_test` call sites
Example fix
// before (regression: new required field)
Err(AuthError::config("missing 'account'"))
// after: keep defaults for optional fields or update fixture
let mut config = base_config();
config.insert("account".into(), "acct".into()); Defensive patterns
Strategy: try-catch
Validate before calling
// no user-side guard; library test harness assertion
let auth_result = auth.configure(&AdapterConfig::new(config)).expect("configure"); Try / catch
let auth_result = auth.configure(&AdapterConfig::new(config)).unwrap_or_else(|e| panic!("configure failed: {e}")); Prevention
- Run `cargo test -p dbt-auth` after touching snowflake config parsing
- Keep test fixtures in sync with any new required fields
- Snapshot AuthError messages to catch validation drift early
When it happens
Trigger: Any change to `SnowflakeAuth::configure` that makes it reject the test fixture configs (simple connect args, application name override, driver log level override, connect/request timeout variants) — e.g. a new required field or stricter validation added to the parser.
Common situations: Developers modifying snowflake auth config validation or key extraction hit this while running `cargo test -p dbt-auth` after breaking previously-accepted config combinations.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- configure
- valid regex
- column name normalization preserves schema compatibility
- metadata query plan always includes metadata SQL
- bare vs wrapped CREATE VIEW body should compare as equal (or
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/bd76cfa3add6122a.
Report an issue: GitHub.