vectordotdev/vector · error
No valid semantic version tag found
Error message
No valid semantic version tag found
What it means
latest_release_version lists git tags sorted by version (ignoring `vdev-v…` tags) and parses the first tag matching `^vX.Y.Z$` into a semver Version. If the repository has no release-style tag at all, it bails with "No valid semantic version tag found". The tool depends on release tags existing to compute the latest release.
Solutions
- Fetch all tags: `git fetch --tags --force`, or re-clone without `--depth 1`
- Verify a tag like `v0.45.0` exists with `git tag --list 'v*'`; create/push one if this repo should have releases
- Run the command from the actual vector repository checkout rather than an empty/forked repo
Example fix
// before (fresh shallow clone, no tags) let v = latest_release_version()?; // Err: No valid semantic version tag found // after git fetch --tags --force let v = latest_release_version()?; // Ok(0.45.0)
Defensive patterns
Strategy: validation
Validate before calling
let has_tags = std::process::Command::new("git")
.args(["tag", "--list", "v[0-9]*.[0-9]*.[0-9]*"])
.output()?.stdout.iter().filter(|b| **b == b'\n').count() > 0;
if !has_tags { panic!("no vX.Y.Z tags; run git fetch --tags first"); } Prevention
- Clone with full history (avoid --depth 1) and run `git fetch --tags --force`
- Check `git tag --list 'v*'` before running release-dependent tooling
- In CI, explicitly fetch tags on the checkout step
When it happens
Trigger: Calling latest_release_version in a repo (often a fresh clone or fork) whose refs contain no tags matching `v<major>.<minor>.<patch>` — or where all tags are `vdev-v…` internal tags or non-semver names.
Common situations: Shallow clones (`git clone --depth 1`) or forks that omit tags; running the release/deprecation tooling in a brand-new repo before the first release; tags fetched but not local (no `git fetch --tags`).
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Error running `git describe
- On latest release channel and tag
- Commit title must end with
- Conflicting enacted entry for
- Could not find latest addition commit
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/25ccae0402ef4d17.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/utils/git.rs:152
.check_output()
}
/// Returns the latest semver release tag (e.g. `0.55.0`), ignoring `vdev-v…` tags.
pub fn latest_release_version() -> Result<semver::Version> {
let output = Command::new("git")
.args(["tag", "--list", "--sort=-v:refname"])
.check_output()?;
let re = regex::Regex::new(r"^v[0-9]+\.[0-9]+\.[0-9]+$").unwrap();
for tag in output.lines() {
if tag.starts_with("vdev-v") {
continue;
}
if re.is_match(tag) {
return semver::Version::parse(tag.trim_start_matches('v'))
.context("Failed to parse version from tag");
}
}
anyhow::bail!("No valid semantic version tag found")
}
/// Removes a file from the index (and working tree) using `git rm`.
pub fn rm(path: &str) -> Result<String> {
Command::new("git").args(["rm", path]).check_output()
}
/// Pushes changes from the current repo
pub fn push() -> Result<String> {
Command::new("git").args(["push"]).check_output()
}
pub fn push_and_set_upstream(branch_name: &str) -> Result<String> {
Command::new("git")
.args(["push", "-u", "origin", branch_name])
.check_output()
}
View on GitHub (pinned to bdb87aeaa4)