{"record":{"id":"df862d529af378ad","repo":"dbt-labs/dbt-core","slug":"no-prefix-version-tar-gz-tarballs-found-in","errorCode":null,"errorMessage":"no `{prefix}{version}-*.tar.gz` tarballs found in {source_desc}","messagePattern":"no `(.+?)(.+?)-\\*\\.tar\\.gz` tarballs found in (.+?)","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"crates/dbt-ci/src/homebrew/render.rs","lineNumber":66,"sourceCode":"\n    // clap's `conflicts_with` + `required_unless_present` enforces that\n    // exactly one input is provided — but we exhaustively pattern-match\n    // anyway to make the source-of-truth obvious to readers.\n    let (tarballs, source_desc) = match (&args.tarballs_dir, &args.sha256sums) {\n        (Some(dir), None) => (\n            collect_tarballs_from_dir(dir, &args.tarball_prefix, &args.version)?,\n            format!(\"dir {}\", dir.display()),\n        ),\n        (None, Some(file)) => (\n            collect_tarballs_from_sha256sums(file, &args.tarball_prefix, &args.version)?,\n            format!(\"manifest {}\", file.display()),\n        ),\n        (None, None) | (Some(_), Some(_)) => {\n            unreachable!(\"clap should reject neither/both --tarballs-dir/--sha256sums\")\n        }\n    };\n    if tarballs.is_empty() {\n        bail!(\n            \"no `{prefix}{version}-*.tar.gz` tarballs found in {source_desc}\",\n            prefix = args.tarball_prefix,\n            version = args.version,\n        );\n    }\n\n    let platforms = resolve_platforms(&tarballs, &args.url_template, &args.version);\n    if platforms.is_empty() {\n        bail!(\n            \"no brew-supported targets found in {source_desc} (need at least one of: \\\n             aarch64-apple-darwin, x86_64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu)\",\n        );\n    }\n\n    // `install_as` defaults to the formula name — preserves the historic\n    // behavior where `bin.install \"X\"` is renamed to match the formula's\n    // filename when binary-name and formula-name differ.\n    let install_as = args","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-ci/src/homebrew/render.rs#L48-L84","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify --version exactly matches the artifact filenames (e.g. artifacts contain `mytool-1.2.3-...` so pass --version 1.2.3).","Point --tarballs-dir at the directory that actually contains the .tar.gz release artifacts and `ls` it to confirm.","Check --tarball-prefix matches the artifact naming convention.","Ensure the upstream build/download stage completed before rendering the formula."],"exampleFix":"// before\n$ dbt-ci homebrew render --tarballs-dir ./dist --version 1.2.4   # dist has only 1.2.3 tarballs\n\n// after\n$ dbt-ci homebrew render --tarballs-dir ./dist --version 1.2.3","handlingStrategy":"validation","validationCode":"// check artifacts before rendering\nlet pattern = format!(\"{}{}-*.tar.gz\", tarball_prefix, version);\nlet found: Vec<_> = std::fs::read_dir(tarballs_dir)?\n    .filter_map(Result::ok)\n    .map(|e| e.file_name().to_string_lossy().into_owned())\n    .filter(|n| n.starts_with(&format!(\"{tarball_prefix}{version}-\")) && n.ends_with(\".tar.gz\"))\n    .collect();\nif found.is_empty() {\n    return Err(format!(\"no artifacts matching {pattern} in {}\", tarballs_dir.display()));\n}","typeGuard":null,"tryCatchPattern":"match render() {\n    Err(e) if e.to_string().contains(\"tarballs found\") => {\n        eprintln!(\"artifacts missing or version mismatch; verify --version and --tarballs-dir\");\n    }\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Echo/verify artifact filenames and --version in CI before the render step.","Make the build stage upload/download artifacts into a dedicated directory and pass that exact path.","Keep tarball naming convention stable across releases.","Fail fast with a glob pre-check in the pipeline before invoking render."],"tags":["artifacts","file-not-found","ci","homebrew","versioning"],"backgroundTag":"file-not-found","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}