{"record":{"id":"417ba4e27839da78","repo":"dbt-labs/dbt-core","slug":"two-binaries-map-to-platform-tag-the-sdist-m","errorCode":null,"errorMessage":"two binaries map to platform tag {:?}; the sdist manifest can only reference one wheel per platform","messagePattern":"two binaries map to platform tag (.+?); the sdist manifest can only reference one wheel per platform","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"crates/dbt-ci/src/sdist.rs","lineNumber":330,"sourceCode":"    let major = release.split('.').next()?.parse().ok()?;\n    Some((major, release_end != version_pep440.len()))\n}\n\nfn render_assets_json(\n    spec: &Spec,\n    version_pep440: &str,\n    base_url: &str,\n    wheels: &[WheelAsset],\n    notice: Option<&str>,\n) -> Result<String> {\n    let mut map: BTreeMap<&str, AssetEntry> = BTreeMap::new();\n    for w in wheels {\n        let entry = AssetEntry {\n            filename: &w.filename,\n            sha256: &w.sha256_hex,\n        };\n        if map.insert(w.platform_tag.as_str(), entry).is_some() {\n            bail!(\n                \"two binaries map to platform tag {:?}; the sdist manifest can only \\\n                 reference one wheel per platform\",\n                w.platform_tag\n            );\n        }\n    }\n    let manifest = AssetsManifest {\n        name: &spec.wheel_name,\n        version: version_pep440,\n        base_url,\n        notice,\n        wheels: map,\n    };\n    let mut json = serde_json::to_string_pretty(&manifest).context(\"serialize assets.json\")?;\n    json.push('\\n');\n    Ok(json)\n}\n","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-ci/src/sdist.rs#L312-L348","documentation":"render_assets_json builds a map from platform tag to a single wheel asset for the sdist manifest. Because the manifest can reference only one wheel per platform tag, a second wheel with the same platform tag causes this bail — an internal consistency check on the release inputs.","triggerScenarios":"build_sdist -> render_assets_json receives a wheels list where two binaries/wheels share the same platform_tag, e.g. passing both a glibc and a musl build that normalize to the same tag, or duplicate target entries in --target.","commonSituations":"Duplicate --target flags, two python ABI variants mapping to the same platform tag, a copy-pasted target in CI matrix config, or a tag-normalization bug in normalize_wheel_name/spec.wheel_name.","solutions":["Deduplicate the --target list so each platform tag appears at most once.","If two binaries genuinely target the same platform, keep only the intended one in the release inputs.","Check wheel naming/tag computation so distinct binaries produce distinct platform tags (e.g. manylinux vs musllinux)."],"exampleFix":"# before\n--target x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu\n# after\n--target x86_64-unknown-linux-gnu --target aarch64-unknown-linux-gnu","handlingStrategy":"validation","validationCode":"# ensure every target maps to a unique platform tag\nfunction assert_unique_targets() { printf '%s\\n' \"$@\" | sort | uniq -d | grep . && { echo \"duplicate targets\" >&2; exit 1; } || true; }\nassert_unique_targets \"$TARGETS\"","typeGuard":null,"tryCatchPattern":"if let Err(e) = build_sdist(...) {\n    if e.to_string().contains(\"platform tag\") {\n        eprintln!(\"duplicate platform in release inputs: {e:#}\");\n    }\n    return Err(e);\n}","preventionTips":["Deduplicate the --target list in CI config generation.","Ensure wheel naming produces distinct platform tags per binary.","Review release manifests for repeated platform entries before building the sdist."],"tags":["build","platform","manifest","validation"],"backgroundTag":"invalid-config-value","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"}