{"record":{"id":"004c4680d12c8c44","repo":"windmill-labs/windmill","slug":"name-collides-with-the-run-argument","errorCode":null,"errorMessage":"`{{{{ {name} }}}}` collides with the run argument `{name}` this runtime already defines ({}); rename the placeholder","messagePattern":"`(.+?) \\}\\}\\}\\}` collides with the run argument `(.+?)` this runtime already defines \\((.+?)\\); rename the placeholder","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/parsers/windmill-parser-yaml/src/dbt.rs","lineNumber":274,"sourceCode":"    \"command\",\n    \"select\",\n    \"exclude\",\n    \"vars\",\n    \"full_refresh\",\n    \"dbt_command\",\n    \"dbt_retry_job\",\n    \"model\",\n    \"limit\",\n];\n\npub fn parse_dbt_descriptor(inner_content: &str) -> anyhow::Result<DbtDescriptor> {\n    let d = serde_yml::from_str::<DbtDescriptor>(inner_content)\n        .map_err(|e| anyhow::anyhow!(\"Failed to parse dbt descriptor: {e}\"))?;\n    if let Some(name) = placeholders(&d)\n        .into_iter()\n        .find(|n| RESERVED_ARG_NAMES.contains(&n.as_str()))\n    {\n        return Err(anyhow::anyhow!(\n            \"`{{{{ {name} }}}}` collides with the run argument `{name}` this runtime already \\\n             defines ({}); rename the placeholder\",\n            RESERVED_ARG_NAMES.join(\", \")\n        ));\n    }\n    Ok(d)\n}\n\n/// The workspace warehouse a descriptor gets when it names none — spelled like\n/// the default lake (`ducklake://main.orders`), so one workspace concept reads\n/// the same across kinds.\npub const DBT_DEFAULT_WAREHOUSE: &str = \"main\";\n\n/// The single argument holding the command and the overrides it takes. Its\n/// variant IS the command, so a run cannot carry an override the command\n/// ignores: `retry` rebuilds the failed run's nodes with the arguments that run\n/// had, and `full_refresh` means nothing to a `show`.\npub const DBT_COMMAND_ARG: &str = \"command\";","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/parsers/windmill-parser-yaml/src/dbt.rs#L256-L292","documentation":"When parsing a dbt descriptor YAML, windmill collects the `{{ ... }}` placeholder names used in the descriptor and refuses any placeholder whose name is one of the reserved run-argument names (RESERVED_ARG_NAMES, listed in the message). Such a placeholder would collide with a run argument the dbt runtime defines itself, so parse_dbt_descriptor rejects the descriptor with this error.","triggerScenarios":"parse_dbt_descriptor is called by parse_dbt_sig, dbt_arg_schema and related descriptor parsing (also exercised by tests like a_placeholder_may_not_take_a_run_argument_name); it errors whenever a `{{{{ name }}}}` placeholder in the dbt descriptor YAML matches an entry of RESERVED_ARG_NAMES, e.g. naming a placeholder after a built-in run argument.","commonSituations":"A developer writes a dbt script whose descriptor uses `{{ dbt }}`, `{{ target }}` or similar, not realizing the runtime already injects that name as a run argument; often a copy-paste from docs using a reserved word as a variable name.","solutions":["Rename the placeholder in the descriptor YAML to a non-reserved name (and update its references in the code).","Check the list of reserved names printed in the error message and pick a name outside it.","Use the dedicated descriptor fields/options instead of a placeholder when you intend to override a built-in run argument."],"exampleFix":"// before\ndescriptor: \"run --select {{{{ dbt }}}}_model\"\n// after\ndescriptor: \"run --select {{{{ model_name }}}}\"","handlingStrategy":"validation","validationCode":"fn placeholder_ok(name: &str, reserved: &[&str]) -> bool { !reserved.contains(&name) }\n// scan descriptor YAML for {{{{ name }}}} placeholders and reject reserved names before parse","typeGuard":"fn is_reserved(name: &str, reserved: &[&str]) -> bool { reserved.contains(&name) }","tryCatchPattern":"match parse_dbt_descriptor(yaml) {\n    Ok(d) => d,\n    Err(e) if e.to_string().contains(\"collides with the run argument\") => {\n        // rename the placeholder listed in the message and retry\n        Err(e)\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Keep a list of RESERVED_ARG_NAMES and lint descriptor YAML in CI","Never name placeholders after runtime-injected arguments","Re-run the parser locally after renaming variables in dbt scripts"],"tags":["dbt","yaml","reserved-name","windmill-parser"],"backgroundTag":"reserved-identifier-collision","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}