dbt-labs/dbt-core · error · anyhow

no `{prefix}{version}-*.tar.gz` tarballs found in {source_de

Error message

no `{prefix}{version}-*.tar.gz` tarballs found in {source_desc}

What it means

The Homebrew formula renderer in crates/dbt-ci/src/homebrew/render.rs requires at least one release tarball matching the pattern `{tarball_prefix}{version}-*.tar.gz` in the provided directory (--tarballs-dir) or source listing. When the glob resolves to an empty set, run() bails with this message describing the source. It is a guard so the formula is never rendered from zero artifacts.

Source

Thrown at crates/dbt-ci/src/homebrew/render.rs:66

    // clap's `conflicts_with` + `required_unless_present` enforces that
    // exactly one input is provided — but we exhaustively pattern-match
    // anyway to make the source-of-truth obvious to readers.
    let (tarballs, source_desc) = match (&args.tarballs_dir, &args.sha256sums) {
        (Some(dir), None) => (
            collect_tarballs_from_dir(dir, &args.tarball_prefix, &args.version)?,
            format!("dir {}", dir.display()),
        ),
        (None, Some(file)) => (
            collect_tarballs_from_sha256sums(file, &args.tarball_prefix, &args.version)?,
            format!("manifest {}", file.display()),
        ),
        (None, None) | (Some(_), Some(_)) => {
            unreachable!("clap should reject neither/both --tarballs-dir/--sha256sums")
        }
    };
    if tarballs.is_empty() {
        bail!(
            "no `{prefix}{version}-*.tar.gz` tarballs found in {source_desc}",
            prefix = args.tarball_prefix,
            version = args.version,
        );
    }

    let platforms = resolve_platforms(&tarballs, &args.url_template, &args.version);
    if platforms.is_empty() {
        bail!(
            "no brew-supported targets found in {source_desc} (need at least one of: \
             aarch64-apple-darwin, x86_64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu)",
        );
    }

    // `install_as` defaults to the formula name — preserves the historic
    // behavior where `bin.install "X"` is renamed to match the formula's
    // filename when binary-name and formula-name differ.
    let install_as = args

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Verify --version exactly matches the artifact filenames (e.g. artifacts contain `mytool-1.2.3-...` so pass --version 1.2.3).
  2. Point --tarballs-dir at the directory that actually contains the .tar.gz release artifacts and `ls` it to confirm.
  3. Check --tarball-prefix matches the artifact naming convention.
  4. Ensure the upstream build/download stage completed before rendering the formula.

Example fix

// before
$ dbt-ci homebrew render --tarballs-dir ./dist --version 1.2.4   # dist has only 1.2.3 tarballs

// after
$ dbt-ci homebrew render --tarballs-dir ./dist --version 1.2.3
Defensive patterns

Strategy: validation

Validate before calling

// check artifacts before rendering
let pattern = format!("{}{}-*.tar.gz", tarball_prefix, version);
let found: Vec<_> = std::fs::read_dir(tarballs_dir)?
    .filter_map(Result::ok)
    .map(|e| e.file_name().to_string_lossy().into_owned())
    .filter(|n| n.starts_with(&format!("{tarball_prefix}{version}-")) && n.ends_with(".tar.gz"))
    .collect();
if found.is_empty() {
    return Err(format!("no artifacts matching {pattern} in {}", tarballs_dir.display()));
}

Try / catch

match render() {
    Err(e) if e.to_string().contains("tarballs found") => {
        eprintln!("artifacts missing or version mismatch; verify --version and --tarballs-dir");
    }
    Err(e) => return Err(e),
    Ok(v) => v,
}

Prevention

When it happens

Trigger: Calling the render/execute flow where the glob over --tarballs-dir (or the equivalent remote source) finds no files matching `{prefix}{version}-*.tar.gz`: wrong directory passed, artifacts not yet downloaded/uploaded, version string mismatch (e.g. directory has 1.2.3 artifacts but --version 1.2.4), or tarball_prefix mismatch.

Common situations: Pointing --tarballs-dir at the repo root instead of the release artifact directory; typo in --version; artifacts named without the expected prefix after a build-script change; CI stage ordering issue where publish/render runs before the artifact download step; release assets not yet uploaded.

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


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/df862d529af378ad. Report an issue: GitHub.