Skip to content

[sgl-kernel] Fix MUSA wheel METADATA version to match +musa<suffix> filename#25573

Closed
Kangyan-Zhou wants to merge 1 commit into
sgl-project:mainfrom
Kangyan-Zhou:fix-musa-wheel-metadata
Closed

[sgl-kernel] Fix MUSA wheel METADATA version to match +musa<suffix> filename#25573
Kangyan-Zhou wants to merge 1 commit into
sgl-project:mainfrom
Kangyan-Zhou:fix-musa-wheel-metadata

Conversation

@Kangyan-Zhou
Copy link
Copy Markdown
Collaborator

@Kangyan-Zhou Kangyan-Zhou commented May 18, 2026

Summary

The MUSA wheel rename script only renames the .whl file (inserting +musa43 into the filename) but leaves the dist-info METADATA Version: field untouched. pip 22.2+ rejects such wheels with:

inconsistent version: expected '0.4.2.post1+musa43', but metadata has '0.4.2.post1'

This means pip install sglang-kernel --index-url https://docs.sglang.io/whl/musa43 currently fails for every published MUSA wheel (v0.4.1.post1, v0.4.2, v0.4.2.post1).

The CUDA companion sgl-kernel/rename_wheels.sh already handles this correctly (unpack → patch METADATA + WHEEL → wheel pack to regenerate RECORD). This PR ports that flow to scripts/ci/musa/rename_wheels_musa.sh.

Changes

  • scripts/ci/musa/rename_wheels_musa.sh:
    • Unpack each wheel via python -m wheel unpack.
    • Patch WHEEL Tag: line so linux_* is rewritten to manylinux2014_* in lockstep with the filename.
    • Patch METADATA Version: line to append +musa<suffix>.
    • Rename the .dist-info directory.
    • Repack via python -m wheel pack (regenerates RECORD checksums).
    • Idempotent: a rerun on an already-suffixed wheel skips it.
    • Defensive assertions on each step (non-empty Version:, substitution actually landed, dist-info dir actually renamed) so a malformed wheel surfaces a clear error instead of a misleading sed: /WHEEL failure downstream.

Test Plan

Local sanity-check (cannot run the full MUSA CI from this environment):

  • Built a synthetic sglang-kernel-0.4.2.post2-cp310-none-linux_x86_64.whl and ran the script with 43 as the suffix arg.
  • Verified the resulting dist/ wheel:
    • Filename: sglang_kernel-0.4.2.post2+musa43-cp310-none-manylinux2014_x86_64.whl
    • METADATA Version: 0.4.2.post2+musa43
    • WHEEL Tag: cp310-none-manylinux2014_x86_64
    • RECORD regenerated, hashes consistent.
  • pip install --platform manylinux2014_x86_64 --python-version 3.10 --only-binary=:all: ... accepts the wheel — no "inconsistent version" complaint.
  • Rerunning the script on the already-patched wheel correctly skips it (idempotency).

For the next release, this script needs to run as part of build-musa43 in .github/workflows/release-whl-kernel.yml:444-450 (it already does — no workflow change needed).

Follow-up

The already-published wheels in sgl-project/whl releases (v0.4.1.post1, v0.4.2, v0.4.2.post1) still have stale METADATA. They will need either re-uploaded assets or a new patch release before pip install sglang-kernel --index-url ... works for existing MUSA tags.


CI States

Latest PR Test (Base): ❌ Missing run-ci label — add it to run CI tests.
Latest PR Test (Extra): ❌ Blockedrun-ci is required first.

…ilename

The MUSA rename script only renamed the .whl file (e.g. inserting
+musa43), leaving the dist-info METADATA Version untouched. pip 22.2+
rejects such wheels with "inconsistent version" because the filename
and METADATA disagree. The CUDA rename script (sgl-kernel/rename_wheels.sh)
already handles this correctly by unpacking, patching METADATA + WHEEL
tags, and repacking via `wheel pack`. Port the same flow to the MUSA
script so MUSA wheels are installable via the wheel index.

The change is also idempotent: a rerun on an already-suffixed wheel
detects the existing +musa tag in METADATA and skips it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@yeahdongcn
Copy link
Copy Markdown
Collaborator

@johnnycxm Please take a look. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants