{"record":{"id":"9bd106ab9915f9b2","repo":"vectordotdev/vector","slug":"no-deprecation-fragment-found-at","errorCode":null,"errorMessage":"No deprecation fragment found at {}","messagePattern":"No deprecation fragment found at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/deprecation/enact.rs","lineNumber":39,"sourceCode":"impl Cli {\n    pub fn exec(self) -> Result<()> {\n        let repo_root = paths::find_repo_root()?;\n        let dir = repo_root.join(deprecation::DEPRECATION_DIR);\n\n        // Accept \"slug\" or \"slug.md\"; reject path-like inputs to keep the\n        // identifier unambiguous (and the file lookup safe).\n        if self.slug.contains('/') || self.slug.contains('\\\\') {\n            bail!(\n                \"expected a deprecation slug (e.g. \\\"azure-monitor-logs-sink\\\"), not a path: {}\",\n                self.slug\n            );\n        }\n        let stem = self.slug.strip_suffix(\".md\").unwrap_or(&self.slug);\n        let filename = format!(\"{stem}.md\");\n\n        let path = dir.join(&filename);\n        if !path.exists() {\n            bail!(\"No deprecation fragment found at {}\", path.display());\n        }\n\n        // Parse the fragment to get entry data.\n        let entries = deprecation::read_deprecation_fragments(&dir)?;\n        let entry = entries\n            .into_iter()\n            .find(|e| e.filename == filename)\n            .ok_or_else(|| anyhow::anyhow!(\"Could not parse {filename}\"))?;\n\n        let version = if let Some(v) = self.version {\n            // Reject `--version 0.58.0-alpha` and friends: only release-shaped\n            // semver is valid here.\n            if !v.pre.is_empty() || !v.build.is_empty() {\n                bail!(\n                    \"--version {v} has prerelease or build metadata; only plain X.Y.Z is allowed\"\n                );\n            }\n            v","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/deprecation/enact.rs#L21-L57","documentation":"Thrown by `cargo vdev deprecation enact` when the resolved fragment file (DEPRECATION_DIR joined with '<slug>.md') does not exist on disk. The command needs the fragment to parse entry data for enactment.","triggerScenarios":"Calling enact with a slug whose '<stem>.md' file is absent from the deprecation directory: path.exists() returns false after dir.join(&filename).","commonSituations":"Happens with a typo'd slug, a fragment already enacted and deleted, running in the wrong repo/branch, or enacting on a fork missing the deprecation directory.","solutions":["Check the exact slug: list fragments in the deprecation directory and re-run with the correct name.","Confirm the fragment was not already enacted and removed (check git log / the deprecations JSON).","Run from the correct repository root/branch that contains the fragment.","Optionally omit --version so it defaults to next release if the slug was fine but other flags confused the invocation."],"exampleFix":"// before\ncargo vdev deprecation enact azure-monitor-log-sink  # typo\n// after\ncargo vdev deprecation enact azure-monitor-logs-sink","handlingStrategy":"validation","validationCode":"let path = repo_root.join(\"deprecations\").join(format!(\"{slug}.md\"));\nif !path.exists() { eprintln!(\"fragment {slug}.md not found; list the directory first\"); return; }","typeGuard":"fn fragment_exists(repo_root: &Path, slug: &str) -> bool { let stem = slug.strip_suffix(\".md\").unwrap_or(slug); repo_root.join(\"deprecations\").join(format!(\"{stem}.md\")).exists() }","tryCatchPattern":"match result { Err(e) if e.to_string().contains(\"No deprecation fragment found\") => { eprintln!(\"Check slug spelling and that the fragment is not already enacted\"); } Err(e) => return Err(e), Ok(v) => v }","preventionTips":["List the deprecation directory to confirm exact slug names before enacting","Check git history in case the fragment was already enacted and deleted","Run from the correct repo root and branch"],"tags":["deprecation","file-not-found","cli"],"backgroundTag":"file-not-found","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"}