{"record":{"id":"c68c6a7554af2bd5","repo":"dbt-labs/dbt-core","slug":"unsupported-target-triple-c68c6a","errorCode":null,"errorMessage":"unsupported --target {triple:?}","messagePattern":"unsupported --target (.+?)","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"crates/dbt-ci/src/sdist.rs","lineNumber":114,"sourceCode":"    targets: &[String],\n    python_tag: &str,\n    abi_tag: &str,\n    out_dir: &Path,\n) -> Result<PathBuf> {\n    if targets.is_empty() {\n        bail!(\"--download-base-url requires at least one --target\");\n    }\n    // Reject a non-https base url before any fetch, so we never pull wheels over\n    // an insecure transport (the assembly-time check in `build_sdist` is too late).\n    require_https(base_url)?;\n    let version_pep440 = semver_to_pep440(version)?;\n    let dist = normalize_wheel_name(&spec.wheel_name);\n    let base = base_url.trim_end_matches('/');\n\n    let mut wheels = Vec::with_capacity(targets.len());\n    for triple in targets {\n        let platform_tag = target_to_platform_tag(triple)\n            .ok_or_else(|| anyhow!(\"unsupported --target {triple:?}\"))?;\n        let filename = wheel_filename(&dist, &version_pep440, python_tag, abi_tag, &platform_tag);\n        let url = format!(\"{base}/{filename}\");\n        eprintln!(\"→ GET {url}\");\n        let bytes = download(http, &url).await?;\n        let digest = sha256_hex(bytes.as_ref());\n        eprintln!(\"✓ {filename} ({} bytes, sha256={digest})\", bytes.len());\n        check_wheel_metadata_agrees(spec, &filename, bytes.as_ref())?;\n        wheels.push(WheelAsset {\n            platform_tag,\n            filename,\n            sha256_hex: digest,\n        });\n    }\n\n    build_sdist(spec, &version_pep440, &wheels, base_url, out_dir)\n}\n\n/// Fails the release when the sdist's static metadata disagrees with a wheel it","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-ci/src/sdist.rs#L96-L132","documentation":"When fetching published wheels, each `--target` triple is mapped to a Python platform tag via target_to_platform_tag; if the triple has no mapping this error is raised. The library cannot construct a wheel filename/URL for an unknown platform.","triggerScenarios":"Calling build_release_sdist (via build_only_sdist or run_publish) with a targets list containing a triple like `aarch64-unknown-linux-gnu` or a Windows/macOS triple not in the mapping table.","commonSituations":"Adding new CI runner architectures (linux-arm64, musl/alpine) without updating the platform mapping; typos in the triple passed on the CLI; copying targets from another project with different platform support.","solutions":["Use a supported --target triple (check the target_to_platform_tag mapping in sdist.rs).","Remove the unsupported target from the targets list for this run.","If the platform must be supported, add the triple-to-platform-tag mapping in target_to_platform_tag."],"exampleFix":"// before\nrun_publish(&[\"x86_64-unknown-freebsd\"])?;\n\n// after\nrun_publish(&[\"x86_64-unknown-linux-gnu\"])?;","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"x86_64-unknown-linux-gnu\", \"aarch64-apple-darwin\", \"x86_64-pc-windows-msvc\"}  # extend from target_to_platform_tag\nassert all(t in SUPPORTED for t in targets), [t for t in targets if t not in SUPPORTED]","typeGuard":"fn is_supported_target(t: &str) -> bool {\n    matches!(t, \"x86_64-unknown-linux-gnu\" | \"aarch64-apple-darwin\" | \"x86_64-pc-windows-msvc\")\n}","tryCatchPattern":"match build_release_sdist(&spec, &targets) {\n    Err(e) if e.to_string().starts_with(\"unsupported --target\") => eprintln!(\"drop or map this target; see target_to_platform_tag\"),\n    other => other?,\n}","preventionTips":["Keep the --target list in sync with the platform-tag mapping","Check new CI runner architectures against the mapping before enabling them","Fail fast in CI by validating target triples before publishing"],"tags":["cli","cross-compilation","wheels","platform"],"backgroundTag":"invalid-cli-argument","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}