{"record":{"id":"77f9fe762786bef9","repo":"windmill-labs/windmill","slug":"vault-id-field-expects-an-array-of-strings-in-the","errorCode":null,"errorMessage":"Vault ID field expects an array of strings in the format: `label@filename`","messagePattern":"Vault ID field expects an array of strings in the format: `label@filename`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/parsers/windmill-parser-yaml/src/lib.rs","lineNumber":556,"sourceCode":"                }\n                Yaml::String(key) if key == \"inventory\" => {\n                    ret.inventories.extend(parse_inventories(value)?);\n                }\n                Yaml::String(key) if key == \"additional_inventories\" => {\n                    ret.additional_inventories\n                        .extend(parse_additional_inventories(value)?);\n                }\n                Yaml::String(key) if key == \"vault_password\" => {\n                    let Yaml::String(filename) = value else {\n                        return Err(anyhow!(\n                            \"Vault Password File expects a String containing the file name\"\n                        ));\n                    };\n                    ret.vault_password = Some(filename.to_string());\n                }\n                Yaml::String(key) if key == \"vault_id\" => {\n                    let Yaml::Array(filenames) = value else {\n                        return Err(anyhow!(\"Vault ID field expects an array of strings in the format: `label@filename`\"));\n                    };\n\n                    for f in filenames {\n                        let Yaml::String(filename) = f else {\n                            return Err(anyhow!(\"The elements of the vault_id field should be strings in the format: `label@filename`\"));\n                        };\n                        validate_vault_id(filename)?;\n                        ret.vault_id.push(filename.to_string());\n                    }\n                }\n                Yaml::String(key) if key == \"options\" => {\n                    if let Yaml::Array(opts) = &value {\n                        ret.options = parse_ansible_options(opts);\n                    }\n                }\n                Yaml::String(key) if key == \"git_repos\" => {\n                    let Yaml::Array(repos) = &value else {\n                        return Err(anyhow!(\"git_repos field expects an array of repos\"));","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/parsers/windmill-parser-yaml/src/lib.rs#L538-L574","documentation":"Raised by parse_ansible_reqs in the YAML parser while validating an Ansible playbook's vault_id entries: each entry must be a `label@vault-password-file` string collected in an array, and the YAML value did not match that shape. This fires at script parse/deploy time, not during job execution — the playbook's metadata is the input at fault.","triggerScenarios":"parse_ansible_reqs sees `vault_id:` with a scalar or mapping value, e.g. `vault_id: label@file` (a plain string instead of a list).","commonSituations":"Providing a single vault id without the list dash, or nesting the entries under a wrong key so they parse as a mapping.","solutions":["Convert the value to a YAML array: one `- label@filename` entry per vault id.","Keep each element a plain string; per-element type errors produce the related element-specific error.","Validate with a YAML linter to confirm it parses as a sequence."],"exampleFix":"# before\nvault_id: prod@vault-pass.txt\n# after\nvault_id:\n  - prod@vault-pass.txt","handlingStrategy":"type-guard","validationCode":"fn vault_id_is_array(doc: &Yaml) -> bool {\n    matches!(yaml_lookup(doc, \"vault_id\"), Some(Yaml::Array(_)))\n}","typeGuard":"fn is_yaml_array(v: &Yaml) -> bool { matches!(v, Yaml::Array(_)) }","tryCatchPattern":"match parse_ansible_reqs(content) {\n    Ok(r) => r,\n    Err(e) if e.to_string().contains(\"Vault ID field expects an array\") => {\n        eprintln!(\"Wrap vault_id entries in a YAML list\");\n        Err(e)\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Provide vault_id as a list even for a single entry","Verify with a YAML parser that the value is a sequence","Use `- label@filename` list syntax"],"tags":["ansible","vault","yaml","type-mismatch"],"backgroundTag":"schema-validation-failed","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"}