vectordotdev/vector · error
No deprecation fragment found at
Error message
No deprecation fragment found at {} What it means
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.
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.
Example fix
// before cargo vdev deprecation enact azure-monitor-log-sink # typo // after cargo vdev deprecation enact azure-monitor-logs-sink
Defensive patterns
Strategy: validation
Validate before calling
let path = repo_root.join("deprecations").join(format!("{slug}.md"));
if !path.exists() { eprintln!("fragment {slug}.md not found; list the directory first"); return; } Type guard
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() } Try / catch
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 } Prevention
- 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
When it happens
Trigger: Calling enact with a slug whose '<stem>.md' file is absent from the deprecation directory: path.exists() returns false after dir.join(&filename).
Common situations: 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.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- expected a deprecation slug (e.g…
- Neither nor found; the deprecation fragment system is not…
- --version has prerelease or build metadata; only plain…
- already exists
- already exists. Delete it (or move it aside) and re-run.
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/9bd106ab9915f9b2.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/deprecation/enact.rs:39
impl Cli {
pub fn exec(self) -> Result<()> {
let repo_root = paths::find_repo_root()?;
let dir = repo_root.join(deprecation::DEPRECATION_DIR);
// Accept "slug" or "slug.md"; reject path-like inputs to keep the
// identifier unambiguous (and the file lookup safe).
if self.slug.contains('/') || self.slug.contains('\\') {
bail!(
"expected a deprecation slug (e.g. \"azure-monitor-logs-sink\"), not a path: {}",
self.slug
);
}
let stem = self.slug.strip_suffix(".md").unwrap_or(&self.slug);
let filename = format!("{stem}.md");
let path = dir.join(&filename);
if !path.exists() {
bail!("No deprecation fragment found at {}", path.display());
}
// Parse the fragment to get entry data.
let entries = deprecation::read_deprecation_fragments(&dir)?;
let entry = entries
.into_iter()
.find(|e| e.filename == filename)
.ok_or_else(|| anyhow::anyhow!("Could not parse {filename}"))?;
let version = if let Some(v) = self.version {
// Reject `--version 0.58.0-alpha` and friends: only release-shaped
// semver is valid here.
if !v.pre.is_empty() || !v.build.is_empty() {
bail!(
"--version {v} has prerelease or build metadata; only plain X.Y.Z is allowed"
);
}
vView on GitHub (pinned to bdb87aeaa4)