windmill-labs/windmill · error
The elements of the vault_id field should be strings in the
Error message
The elements of the vault_id field should be strings in the format: `label@filename`
What it means
When `vault_id` is an array, every element must itself be a YAML string in `label@filename` format. If an element parses as a number, bool, list or hash instead of a string, parse_ansible_reqs throws this element-level error before validate_vault_id is reached.
Source
Thrown at backend/parsers/windmill-parser-yaml/src/lib.rs:561
ret.additional_inventories
.extend(parse_additional_inventories(value)?);
}
Yaml::String(key) if key == "vault_password" => {
let Yaml::String(filename) = value else {
return Err(anyhow!(
"Vault Password File expects a String containing the file name"
));
};
ret.vault_password = Some(filename.to_string());
}
Yaml::String(key) if key == "vault_id" => {
let Yaml::Array(filenames) = value else {
return Err(anyhow!("Vault ID field expects an array of strings in the format: `label@filename`"));
};
for f in filenames {
let Yaml::String(filename) = f else {
return Err(anyhow!("The elements of the vault_id field should be strings in the format: `label@filename`"));
};
validate_vault_id(filename)?;
ret.vault_id.push(filename.to_string());
}
}
Yaml::String(key) if key == "options" => {
if let Yaml::Array(opts) = &value {
ret.options = parse_ansible_options(opts);
}
}
Yaml::String(key) if key == "git_repos" => {
let Yaml::Array(repos) = &value else {
return Err(anyhow!("git_repos field expects an array of repos"));
};
for r in repos {
ret.git_repos.push(
parse_git_repo(r)View on GitHub (pinned to e474e8803c)
Solutions
- Quote each element: `- "123@vault.txt"` so YAML parses it as a string.
- Remove or flatten any nested mapping/list elements.
- After the type is fixed, also satisfy validate_vault_id's character rules (letters, digits, `.`, `_`, `-`, `/`, `@`).
Example fix
# before vault_id: - 123@file # after vault_id: - "123@file"
Defensive patterns
Strategy: type-guard
Validate before calling
fn vault_id_elems_are_strings(doc: &Yaml) -> bool {
match yaml_lookup(doc, "vault_id") {
Some(Yaml::Array(items)) => items.iter().all(|i| matches!(i, Yaml::String(_))),
_ => false,
}
} Type guard
fn all_strings(v: &Yaml) -> bool {
matches!(v, Yaml::Array(items) if items.iter().all(|i| matches!(i, Yaml::String(_))))
} Try / catch
match parse_ansible_reqs(content) {
Ok(r) => r,
Err(e) if e.to_string().contains("elements of the vault_id field should be strings") => {
eprintln!("Quote every vault_id list element");
Err(e)
}
Err(e) => Err(e),
} Prevention
- Quote every vault_id element in YAML
- Avoid labels that YAML coerces to numbers/bools
- Lint the list shape before saving the script
When it happens
Trigger: A list item under `vault_id:` is a non-string scalar or nested structure, e.g. `vault_id: [123]` or an entry indented as a mapping.
Common situations: Unquoted numeric or boolean-looking labels (e.g. `vault_id: [123@file]`-like typos, `yes@file` parsed as bool), or entries accidentally indented as sub-mappings.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Vault Password File expects a String containing the file nam
- Vault ID field expects an array of strings in the format: `l
- Failed to parse yaml: {}
- Invalid inventory definition
- Invalid vault_id `{value}`: expected `label@filename` using
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/ce0bcf8ce228beb9.
Report an issue: GitHub.