dbt-labs/dbt-core · error
args should parse
Error message
args should parse
What it means
Test-helper assertion in parse_core_command: the argument list under test must parse into a CliParser command. Fires only when a CLI parsing regression makes previously valid argument combinations fail.
Solutions
- Inspect which flag combination fails to parse and fix the clap definition
- Re-run the CLI parsing tests to find the offending change
- Treat failure as a CLI compatibility regression
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/dbt-clap-core/src/lib.rs:3703 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/75a8b8cfc3e3bfe9.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-clap-core/src/lib.rs:3703
);
}
fn test_system_args(command: FsCommand) -> SystemArgs {
SystemArgs {
command,
io: IoArgs::default(),
from_main: false,
exit_process_on_panic: false,
num_threads: None,
no_parallel: false,
target: None,
}
}
fn parse_core_command(args: &[&str]) -> CoreCommand {
let cli = CliParser::new("dbt-fusion", "2.0.0", Box::new(NoopParser))
.try_parse_from(std::iter::once("dbt").chain(args.iter().copied()))
.expect("args should parse");
match cli.command {
Command::Core(cmd) => cmd,
Command::Extension(_) => panic!("expected a core command"),
}
}
#[test]
fn top_level_freshness_command_parses_and_is_not_sources_only() {
let cmd = parse_core_command(&["freshness", "--select", "stg_orders+"]);
let CoreCommand::Freshness(args) = &cmd else {
panic!("expected CoreCommand::Freshness, got {cmd:?}");
};
assert_eq!(
args.common_args.select.as_deref(),
Some(["stg_orders+".to_string()].as_slice())
);
assert!(!cmd.as_command().is_sources_only_freshness());View on GitHub (pinned to 0267ce9170)