vectordotdev/vector · error
failed to read path
Error message
failed to read path: {e} What it means
The `vdev release github` command globs target/artifacts/* to collect release artifacts to upload. If any matched path fails to be read (e.g. the entry vanished between glob and iteration, or a permission error occurs), the glob iterator yields an Err which is converted into this error.
Solutions
- Re-run the release command after ensuring no concurrent process deletes target/artifacts (check CI jobs).
- Verify permissions on target/artifacts (`ls -la target/artifacts`) and fix unreadable entries.
- Rebuild artifacts (`cargo build` / artifact packaging step) so target/artifacts is freshly populated, then re-run.
Example fix
// before vdev release github & # concurrent with cargo clean // after cargo build --release && vdev release github # serialized steps
Defensive patterns
Strategy: try-catch
Validate before calling
for entry in std::fs::read_dir("target/artifacts")? {
entry?.metadata()?; // fails fast with a clearer error if unreadable
} Try / catch
match std::fs::metadata(path) {
Ok(_) => /* proceed with release */,
Err(e) => eprintln!("artifact unreadable, rebuilding: {e}"),
} Prevention
- Do not run `cargo clean` or other jobs concurrently with the release step
- Verify artifacts exist and are readable right before `vdev release github`
- Keep target/ on local, reliable storage rather than flaky network mounts
When it happens
Trigger: Running `vdev release github` while files under target/artifacts/ are deleted concurrently (e.g. a parallel clean) or a matched entry is unreadable due to permissions, causing glob's per-entry Result to be an Err.
Common situations: A `cargo clean` or CI job running concurrently with the release step; target/ on a network filesystem with transient permission issues; stale glob cache pointing at removed paths.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Failed to get metadata for
- already exists
- Bad fragment filename
- does not exist
- Failed to bind to listener socket at path
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/67068d415dae20c1.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/release/github.rs:16
use crate::{app::CommandExt as _, utils::cargo};
use anyhow::{Ok, Result, anyhow};
use glob::glob;
use std::process::Command;
/// Uploads target/artifacts to GitHub releases
#[derive(clap::Args, Debug)]
#[command()]
pub struct Cli {}
impl Cli {
pub fn exec(self) -> Result<()> {
let artifacts = glob("target/artifacts/*")
.expect("failed to read glob pattern")
.collect::<Result<Vec<_>, _>>()
.map_err(|e| anyhow!("failed to read path: {e}"))?
.into_iter()
.map(|p| p.into_os_string().into_string())
.collect::<Result<Vec<_>, _>>()
.map_err(|e| anyhow!("failed to turn path into string: {}", e.to_string_lossy()))?;
let version = cargo::get_version()?;
let mut command = Command::new("gh");
command.in_repo();
command.args(
[
"release",
"--repo",
"vectordotdev/vector",
"create",
&format!("v{version}"),
"--title",
&format!("v{version}"),
"--notes",View on GitHub (pinned to bdb87aeaa4)