{"record":{"id":"7e281ef8087b3196","repo":"dbt-labs/dbt-core","slug":"unsupported-target-triple","errorCode":null,"errorMessage":"unsupported target triple {:?}","messagePattern":"unsupported target triple (.+?)","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"crates/dbt-ci/src/pack.rs","lineNumber":127,"sourceCode":"    dist_normalized: &str,\n    version_pep440: &str,\n    python_tag: &str,\n    abi_tag: &str,\n    platform_tag: &str,\n) -> String {\n    format!(\"{dist_normalized}-{version_pep440}-{python_tag}-{abi_tag}-{platform_tag}.whl\")\n}\n\n/// Packs one binary into a wheel under `out_dir`, returning the wheel path.\nfn pack_wheel(\n    spec: &Spec,\n    version_pep440: &str,\n    bin_name: &str,\n    bin: &Binary,\n    out_dir: &Path,\n) -> Result<PathBuf> {\n    let platform_tag = target_to_platform_tag(&bin.target_triple)\n        .ok_or_else(|| anyhow!(\"unsupported target triple {:?}\", bin.target_triple))?;\n    let dist = normalize_wheel_name(&spec.wheel_name);\n    // The CLI wheel wraps a prebuilt binary — interpreter-agnostic, so `py3-none`.\n    let wheel_filename = wheel_filename(&dist, version_pep440, \"py3\", \"none\", &platform_tag);\n    let wheel_path = out_dir.join(&wheel_filename);\n    let dist_info = format!(\"{dist}-{version_pep440}.dist-info\");\n    let data_scripts = format!(\"{dist}-{version_pep440}.data/scripts\");\n\n    let bin_bytes = fs::read(&bin.path).with_context(|| format!(\"read {}\", bin.path.display()))?;\n    let script_name = if bin.is_windows {\n        format!(\"{bin_name}.exe\")\n    } else {\n        bin_name.to_string()\n    };\n\n    let mut entries: Vec<(String, Vec<u8>, u32)> = Vec::new();\n    entries.push((format!(\"{data_scripts}/{script_name}\"), bin_bytes, 0o755));\n    entries.push((\n        format!(\"{dist_info}/METADATA\"),","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-ci/src/pack.rs#L109-L145","documentation":"`pack_wheel` in crates/dbt-ci/src/pack.rs maps a Rust target triple to a PEP 425 wheel platform tag via `target_to_platform_tag`. If the triple is not in the mapping table, packing cannot proceed (the wheel filename would be wrong) and it bails with this error. Called by `run` for each binary being packaged into a `py3-none-<platform>` wheel.","triggerScenarios":"Building/packing a wheel for a target triple not covered by `target_to_platform_tag`, e.g. `aarch64-apple-darwin` if only x86_64 macOS/Linux/Windows triples were mapped, a typo like `x86_64-pc-windows-msvc1`, or a custom/less-common triple such as `x86_64-unknown-freebsd`.","commonSituations":"Adding a new release target to CI without extending the triple-to-platform-tag table; retargeting the build (e.g. ARM64 Windows/Mac) for the first time; typos in the `--target` flag value.","solutions":["Add the missing triple to the `target_to_platform_tag` mapping with its correct PEP 425 platform tag (e.g. `aarch64-apple-darwin` -> `macosx_11_0_arm64`).","Use one of the already-supported triples in the build config.","Fix typos in the target triple passed via the build/pack configuration."],"exampleFix":"// before\nfn target_to_platform_tag(triple: &str) -> Option<&'static str> {\n    match triple {\n        \"x86_64-apple-darwin\" => Some(\"macosx_10_12_x86_64\"),\n        _ => None,\n    }\n}\n// after\nfn target_to_platform_tag(triple: &str) -> Option<&'static str> {\n    match triple {\n        \"x86_64-apple-darwin\" => Some(\"macosx_10_12_x86_64\"),\n        \"aarch64-apple-darwin\" => Some(\"macosx_11_0_arm64\"),\n        _ => None,\n    }\n}","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[&str] = &[\n    \"x86_64-unknown-linux-gnu\", \"aarch64-unknown-linux-gnu\",\n    \"x86_64-apple-darwin\", \"aarch64-apple-darwin\",\n    \"x86_64-pc-windows-msvc\",\n];\nif !SUPPORTED.contains(&bin.target_triple.as_str()) {\n    return Err(format!(\"unsupported target triple {}\", bin.target_triple));\n}","typeGuard":null,"tryCatchPattern":"match pack_wheel(&args) {\n    Err(e) if e.to_string().contains(\"unsupported target triple\") => {\n        eprintln!(\"add the triple to target_to_platform_tag or fix --target\")\n    }\n    Err(e) => return Err(e),\n    Ok(p) => p,\n}","preventionTips":["Keep the release CI target matrix in sync with target_to_platform_tag entries.","When adding a new arch/OS, extend the mapping and test pack locally first.","Centralize the supported-triples list so build configs import it instead of duplicating strings."],"tags":["wheel","packaging","target-triple","platform"],"backgroundTag":"unsupported-platform","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"}