{"record":{"id":"7a27f687ad526319","repo":"vectordotdev/vector","slug":"invalid-short-volume-mount-format-s","errorCode":null,"errorMessage":"Invalid short volume mount format: {s}","messagePattern":"Invalid short volume mount format: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/testing/integration.rs","lineNumber":443,"sourceCode":"\n    /// Unix permissions mask to allow everybody to read a file\n    const ALL_READ: u32 = 0o444;\n    /// Unix permissions mask to allow everybody to read a directory\n    const ALL_READ_DIR: u32 = 0o555;\n\n    /// Fix up potential issues before starting a compose container\n    pub fn prepare_compose_volumes(\n        config: &ComposeConfig,\n        test_dir: &Path,\n        environment: &Environment,\n    ) -> Result<()> {\n        for service in config.services.values() {\n            if let Some(volumes) = &service.volumes {\n                for volume in volumes {\n                    let source = match volume {\n                        VolumeMount::Short(s) => {\n                            s.split_once(':').map(|(s, _)| s).ok_or_else(|| {\n                                anyhow::anyhow!(\"Invalid short volume mount format: {s}\")\n                            })?\n                        }\n                        VolumeMount::Long { source, .. } => source,\n                    };\n                    let source = resolve_placeholders(source, environment);\n                    if !config.volumes.contains_key(&source)\n                        && !source.starts_with('/')\n                        && !source.starts_with('$')\n                    {\n                        let path: PathBuf = [test_dir, Path::new(&source)].iter().collect();\n                        add_read_permission(&path)?;\n                    }\n                }\n            }\n        }\n        Ok(())\n    }\n","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/testing/integration.rs#L425-L461","documentation":"Thrown while preparing Docker Compose volumes for integration tests. Short-form volume mounts (strings) must contain a `:` separator so the host source side can be extracted and validated against the top-level `volumes:` map. A short mount string without any colon cannot be parsed, so vdev rejects it with this message.","triggerScenarios":"A compose service in the integration config declares `volumes: [\"mydata\"]` (or any string without `:`) and `prepare_compose_volumes` iterates it: `s.split_once(':')` returns None, triggering the error.","commonSituations":"Hand-editing a docker-compose test file and adding an anonymous/named volume as a bare string instead of `name:/container/path`; copy-pasting a long-form mount into the short list; YAML quoting issues collapsing `a:b` incorrectly.","solutions":["Rewrite the offending short mount to include both parts, e.g. `mydata:/var/lib/data`.","Or convert the mount to long-form syntax `{ type: volume, source: mydata, target: /var/lib/data }` which takes the `source` field path instead.","Ensure the volume source (left side of `:`) is declared in the compose top-level `volumes:` map, since the parsed source is looked up there next."],"exampleFix":"# before\nservices:\n  test:\n    volumes:\n      - mydata\n\n# after\nservices:\n  test:\n    volumes:\n      - mydata:/var/lib/data","handlingStrategy":"validation","validationCode":"def valid_short_mount(v):\n    return isinstance(v, str) and ':' in v and v.split(':', 1)[0]\n\nfor s in service_volumes:\n    assert valid_short_mount(s), f\"short volume mount needs 'source:target': {s}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never list a bare volume name in compose `volumes:`; always include the container target path.","Lint compose files (docker compose config) before feeding them to integration tooling.","Ensure every short mount source exists in the top-level `volumes:` map."],"tags":["docker-compose","integration-testing","volumes","rust"],"backgroundTag":"invalid-argument-format","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}